Commit Graph

2251 Commits

Author SHA1 Message Date
Andy McFadden
3c25621ad7 Re-enable frame dropping for non-auto timestamps
This change adds an entire field to note whether the timestamp was
auto-generated by Surface or supplied by the application.

The value is used when deciding whether or not to drop frames based
on buffer presentation timestamps.  If a desired presentation time
was set explicitly, BufferQueue will use that value to decide if a
frame should be dropped.  If the timestamp was generated by Surface
at the time the buffer was queued, the timestamp is ignored.

Bug 10151804

Change-Id: Ibd571a7578351063b813cbdad2ddbeed70655ba5
2013-08-16 15:15:16 -07:00
Igor Murashkin
a5b7513711 gui: CpuConsumer::lockNextBuffer change return code when too many bufs acquired
- Return NOT_ENOUGH_DATA instead of INVALID_OPERATION when too many
  buffers have already been locked.
- INVALID_OPERATION is nominally used when something irrecoverable happens,
  but in this case the client just needs to call unlockBuffer to go back into a
  good state.

Bug: 10333400
Change-Id: I3a034d77de85741429f832a90eedd670afa1dc94
2013-08-14 20:17:17 -07:00
Mathias Agopian
c6bae007e6 Fix build. optional tests were broken.
Change-Id: Iba9f5cb57f134559e1f9c55e293578d9f5d8cb96
2013-08-14 16:27:19 -07:00
Mathias Agopian
3f84483382 SurfaceFlinger now uses GLES 2.x when available
Bug: 8679321

Change-Id: I2b152d01fb4e2de2ea9fe87f1ddbd6826d7520d7
2013-08-13 16:07:45 -07:00
Mathias Agopian
45155969dc make sure GLConsumer::releaseTexImage() works after detachFromContext()
Change-Id: I27e0bc57e927d47b2b98113ee37b5396bcc72019
2013-08-12 23:45:28 -07:00
Mathias Agopian
9870c9b66c make GLConsumer's debug texture static
this is so that we don't burn a gralloc handle and a bit
of memory per GLConsumer.

Change-Id: I30c3e7ec45d7f1b5426aca8e06c7716870877706
2013-08-08 17:46:48 -07:00
Jesse Hall
6c913be9ca Add ISurfaceComposer::destroyDisplay
Bug: 10191053
Change-Id: Ia89286f95421344a60ffedaaca5825c4e3cd7f9e
2013-08-08 13:12:29 -07:00
Mathias Agopian
45263e2475 don't hardcode debug texture dimensions
Change-Id: I356333801d246a8cafb3e977a77dc7325e8b822d
2013-08-07 13:35:20 -07:00
Mathias Agopian
5f51ed9499 fix tests more
Change-Id: I05c3dd6a22440844f8bd071f4c2b620b2bd8c720
2013-08-06 16:47:04 -07:00
Mathias Agopian
3dce3360e7 fix tests
Change-Id: I0f4d613481eda2c44a2d631a81d75de7e52e7a62
2013-08-06 16:42:05 -07:00
Mathias Agopian
3ca76f416b remove support for glReadPixels screenshot path
this was only needed on some chipset we're not
supporting in KLP.

Change-Id: I2e8fc07f135030bd61d2e241a8e426f1a4316425
2013-08-06 16:07:33 -07:00
Mathias Agopian
126b9c8e95 Fix build. 3rd attempt
Change-Id: I4317b34fd07890ea7cf9db51be42d72ef21aca89
2013-08-06 15:19:15 -07:00
Mathias Agopian
db89edc94b All consumers now take an IGraphicBufferConsumer instead of a BufferQueue
this means they only have access to the consumer end of
the interface. we had a lot of code that assumed consumers
where holding a BufferQueue (i.e.: both ends), so most of
this change is untangling in fix that

Bug: 9265647
Change-Id: Ic2e2596ee14c7535f51bf26d9a897a0fc036d22c
2013-08-06 20:05:36 +00:00
Eino-Ville Talvala
687821c05b Merge "BufferQueue: Support query of consumer usage bits" 2013-08-05 21:10:45 +00:00
Andy McFadden
d9ba9707b0 Merge "Roll back recent change" 2013-08-02 22:34:13 +00:00
Andy McFadden
4b49e08385 Roll back recent change
Disable dropping of frames based on timestamp.  Resume auto-
generating timestamps in Surface.

Bug 10151804

Change-Id: I15de26158e1d7ef22a5b150e685a126dc48ae2b4
2013-08-02 15:31:45 -07:00
Mathias Agopian
c1c39f8807 Merge "Binderize the consumer side of BufferQueue" 2013-08-02 20:35:26 +00:00
Andy McFadden
86cd09d388 Merge "Drop frames based on presentation timestamp" 2013-08-02 16:53:11 +00:00
Mathias Agopian
a4e19521ac Binderize the consumer side of BufferQueue
While currently untested, this should allow to move the
BuffereQueue in the consumer process and have everything
work as usual.

Bug: 9265647

Change-Id: I9ca8f099f7c65b9a27b7e7a3643b46d1b58eacfc
2013-08-01 17:20:08 -07:00
Andy McFadden
14fab7dd79 Drop frames based on presentation timestamp
If there are two or more buffers pending that are ready for
immediate presentation, drop all but the last one.

Any code that didn't explicitly specify timestamps for buffers
was using the default value (auto-generated "now").  As a result,
surfaceflinger would drop frames whenever more than one buffer
was queued.  We now use zero as the auto-generated timestamp,
and we don't set the timestamp in eglBeginFrame().

Change-Id: I187f42d33de227cd3411ff0dcd3b9ce1961457eb
2013-08-01 15:58:08 -07:00
Mathias Agopian
ba93b3f8e4 log an error when dequeueBuffer gets a NULL Fence
Bug: 9858745
Change-Id: If35d6a7d770bf0a42d55bc55880a9ddb721fcfd0
2013-08-01 15:48:40 -07:00
Mathias Agopian
87f9b87796 remove unused code form GraphicBuffer
Change-Id: I0dd67f1f93f654331e8f17b55730931dbc695ca7
2013-07-31 20:10:10 -07:00
Alex Ray
b304edb0b1 remove libutils
libutils is being moved from frameworks/native/ to system/core/ in order
to facilitate native C++ platform (non-frameworks) code.

Change-Id: I44089fb960591a40b8a9c30faabb10459d107d71
2013-07-31 13:48:57 -07:00
Brian Carlstrom
8776c34ca2 Fix BlobCache_test
Change-Id: I5b20aeb4dcff80f1e18e1165b8461d20034dc1ac
2013-07-31 01:08:36 -07:00
Mathias Agopian
e142428a9c Make Flattenable not virtual
Fallout from the Flattenable change, update all its uses.

Additionnaly, fix/tighten size checks when (un)flatten()ing
things.

Removed the assumption by some flattenables (e.g.: Fence)
that the size passed to them would be exact (it can
and will be larger in some cases)

The code in Parcel is a bit complicated so that we don't
have to expose the full implementation (and also to
keep the code smallish).

Change-Id: I0bf1c8aca2a3128491b4f45510bc46667e566dde
2013-07-30 21:19:13 -07:00
Mathias Agopian
1d76781b7a Make Flattenable not virtual (libutils)
Making an object Flattenable doesn't force it to
become virtual anymore. For instance, Fence and GraphicBuffer
are now non-virtual classes.

Also change Flatennable protocol a bit so that it updates
its parameters (pointers, sizes) to make it easier
to implement a flattenable in terms of other flattenables.

Change-Id: Ie81dc7637180b3c2cfcbaf644f8987ca804eb891
2013-07-30 21:19:02 -07:00
Eino-Ville Talvala
f7c6087bcc BufferQueue: Support query of consumer usage bits
Bug: 9592202
Change-Id: I61a17758200e61adaca695b426db3df0f6637d4c
2013-07-30 21:38:34 +00:00
Mathias Agopian
ad678e18b6 single buffer mode for BufferQueue
Bug: 9891035
Change-Id: Id1ab5f911a6dc4c1d8235e65775b3d3635231ad4
2013-07-26 18:45:02 -07:00
Mathias Agopian
bf5b849ec7 fix build
Change-Id: I04df8ec96510b16e84054089f7c02609d8fe2b0c
2013-07-26 17:26:16 -07:00
Mathias Agopian
c2414bb098 get rid of HAL pixelformats 5551 and 4444
Change-Id: I39409103144c1ba09078c4ddc323a58987fb09ea
2013-07-26 15:43:33 -07:00
Mathias Agopian
5773d3f5b2 get rid of PixelFormatInfo and simplify things
Change-Id: I025a362cc12d5b9b794fac14be500e25aab65396
2013-07-25 19:24:31 -07:00
Mathias Agopian
9642dba110 Merge "Fix a race in BufferQueue" 2013-07-25 02:17:52 +00:00
Todd Poynor
a7b0f04aaf defaultServiceManager wait for service manager ready
If the service manager is not ready when we attempt to create a local
proxy, fail and retry.

Change-Id: I7d7300bc07cd70608793479aa3da282d066da7f6
2013-07-24 16:18:12 -07:00
Alex Ray
a49a4a2e55 Merge "libutils: give BasicHashtableImpl a virtual destructor" 2013-07-24 20:00:36 +00:00
Alex Ray
194bc4ff7b libutils: give BasicHashtableImpl a virtual destructor
Change-Id: I4ec590b060d732af5fe525670becbe778684247b
2013-07-24 00:21:57 -07:00
Mathias Agopian
6bac363cbd Fix a race in BufferQueue
BufferQueue::dequeueBuffer() could incorrectly return
WOULD_BLOCK while in "cannot block" mode if it happened
while a consumer acquired the last allowed buffer
before releasing the old one (which is a valid thing
to do).

Change-Id: I318e5408871ba85e068ea9ef4dc9b578f1bb1043
2013-07-23 21:55:32 -07:00
Colin Cross
4afb57b5db add static dependency on liblog
Change-Id: Ibf8733142d52e4ffac2e3b26932d7196fb79c5a7
2013-07-23 18:07:47 -07:00
Alex Ray
0e0f10b561 Merge "libbinder: add libutils dependency" 2013-07-23 21:49:38 +00:00
Michael Wright
f52ca32724 Merge "Add controller numbers for gamepads / joysticks" 2013-07-23 20:52:42 +00:00
Alex Ray
894e178476 libbinder: add libutils dependency
Change-Id: I30c7291b04788c98faa43843a51b026b8a01932c
2013-07-23 13:43:00 -07:00
Mathias Agopian
325123238a Merge "fix log messages and bogus error message" 2013-07-23 01:06:00 +00:00
Mathias Agopian
207c1e287c fix log messages and bogus error message
also assert when releasing a buffer and it has
been queued

Change-Id: I6f78d9ceb406ec85ff46c7b6d0c047b14063e3d0
2013-07-22 18:00:53 -07:00
Zhijun He
6bbe39de66 Merge "Fix AppOsManager missing mutex unlock." 2013-07-23 00:15:28 +00:00
Zhijun He
20d0380594 Fix AppOsManager missing mutex unlock.
Need unlock the mutex after finish the getToken operation.

Change-Id: Icd83b383913d06e4d60976857aa314c3008ebea1
2013-07-22 17:13:12 -07:00
Michael Wright
0415d63b1a Add controller numbers for gamepads / joysticks
Change-Id: I5294aabbadb836a6a4c7ce76a670abcf50c1f885
2013-07-22 16:37:28 -07:00
Mathias Agopian
bdce817047 Merge changes Ic45929f3,Ic63f4f96,I1e703d36,I691f9507
* changes:
  make sure to reset the framenumber when a buffer is marked FREE
  Make ANW.setSwapInterval(0) work again
  BuffferQueue disconnect is now always asynchrnous
  BufferQueue improvements and APIs changes
2013-07-20 01:02:47 +00:00
Mathias Agopian
26a6f37cc0 make sure to reset the framenumber when a buffer is marked FREE
Change-Id: Ic45929f35553de209801f74e8006fb1bf0b25b45
2013-07-19 17:38:01 -07:00
Mathias Agopian
7cdd786fa8 Make ANW.setSwapInterval(0) work again
we can now queue/dequeue a buffer in asynchrnous mode by using the
async parameter to these calls. async mode is only specified
with those calls (it is not modal anymore).

as a consequence it can only be specified when the buffer count
is not overidden, as error is returned otherwise.

Change-Id: Ic63f4f96f671cb9d65c4cecbcc192615e09a8b6b
2013-07-19 17:38:01 -07:00
Michael Wright
e5bb2a45e0 Merge "Add input device property for buttons under touchpads" 2013-07-19 22:45:38 +00:00
Mathias Agopian
a3fbda3cef BuffferQueue disconnect is now always asynchrnous
we tag queued buffers with the "bufferqueue cannot block" flag
and use that bit to discard a buffer in the queue by new ones
comming in. this allows us to remove the buffer queue drain in
disconnect while maintaining the right behaviour if it gets
connected again (since each buffer remembers how it was enqueued).

Change-Id: I1e703d363a687b70b19ba49cef32213116e8bd3f
2013-07-18 22:28:18 -07:00