Commit Graph

47154 Commits

Author SHA1 Message Date
Jamie Gennis
a1d49ce1f1 EGL_ANDROID_fence_sync: make it more generic
This change updates the extension spec to refer to generic "native fence sync
objects" rather than "Android fence sync objects."

Change-Id: I15a79f08571586431845b54c58c8420b652f40ef
2012-09-04 19:49:51 -07:00
Mathias Agopian
00e8c7a88a display projection API now has a single function instead of 3
Change-Id: I9bf46d372b77d547486d4bbe6f1953ec8c65e98f
2012-09-04 19:30:46 -07:00
Mathias Agopian
da8d0a5c0c implement display viewport and frame
note: viewport clipping is not implemented yet

Change-Id: I7fde7c4de075d409d95c48bb20ba8ee017f6f00a
2012-09-04 16:59:06 -07:00
Jamie Gennis
493db47929 Merge "BufferQueue: add a setMaxAcquiredBufferCount check" into jb-mr1-dev 2012-09-04 14:58:51 -07:00
Jamie Gennis
e84ec393bb Merge "libgui: add BufferQueue test infrastructure" into jb-mr1-dev 2012-09-04 14:55:59 -07:00
Jamie Gennis
374850cf16 Merge "libgui: disable CpuConsumer tests" into jb-mr1-dev 2012-09-04 14:55:38 -07:00
Fabrice Di Meglio
13e1257838 Merge "Add support for "-rtl" in resources" into jb-mr1-dev 2012-09-04 14:55:03 -07:00
Jamie Gennis
c68f2ecfa0 BufferQueue: add a setMaxAcquiredBufferCount check
This change adds a check to verify the validity of the value passed to
setMaxAcquiredBufferCount.

Change-Id: I39730557aa58261e678bd6e4fce11bab78e98362
2012-09-04 14:54:34 -07:00
Andy McFadden
6b09f280e5 Merge "Add timeout when waiting for HW vsync" into jb-mr1-dev 2012-09-04 09:38:39 -07:00
Keun young Park
63f165fd6b add libsurfaceflinger_ddmconnection for PDK build
- the library is dlopened from libsurfaceflinger
- the library built only when libnativehelper exists

Bug: 7089510
Change-Id: Ib3ea1029d7e8f6e055f4b759d0bf68f5123fa8a1
2012-08-31 20:08:33 -07:00
Mathias Agopian
c397360883 the visible region sent to HWC was garbage
we used to have a visibleRegion object per layer, but now
it's per screen; so at somepoint the code got changed to
calculate the per-screen visible region on the stack and that's
what got passed to HWC.

we're now setting the visibleRegionScreen at each frame and
freeing at after the HWC set() call. We use the underlaying
SharedBuffer so that in most cases we don't have to allocate,
free or copy memory around.

Bug: 7089478
Change-Id: I24fa556c76613a225d9fe7a6c6b727bb476144d8
2012-08-31 18:41:22 -07:00
Mathias Agopian
50f262fe56 minor SharedBuffer clean-up
Change-Id: If38b7ce85806ae628c00f2c938de4e3f75142543
2012-08-31 18:41:21 -07:00
Mathias Agopian
2401ead700 Add a way to retrieve a Region as a SharedBuffer
Change-Id: Ia53cb905fbc88f899521658545f990fb9217b1e1
2012-08-31 18:38:22 -07:00
Mathias Agopian
3ab68558fa change how we store Region data internally
We used to keep the bounds of the region as a
separate rectangle. Instead we now store it as the last
element of the Vector<> of Rects.

This has the benefit of being slightly more efficient when
copying regions and reduces the overhead of small regions,
but more importantly will allow us to export the underlaying
SharedBuffer (eventually).

Change-Id: I80790e4fb1a09a747a5616000cfef852ac4ce9e9
2012-08-31 18:38:22 -07:00
Mathias Agopian
4c0a170585 don't generate a new Region when translating by 0,0
since regions are copy-on-write, this prevents to
duplicate the region entirely and offseting by 0,0 is
fairly common.

Change-Id: I9b8c286315a2e00dda01c2456397d72b5e12006b
2012-08-31 18:38:22 -07:00
Mathias Agopian
2098517e3e make sure Parcel handles 0-sized LightFlatenables
Change-Id: Ib30a1c0228f8a938abaa0c7c8a6ba32ffd971121
2012-08-31 18:09:51 -07:00
Jamie Gennis
9e75ddda93 libgui: add BufferQueue test infrastructure
This change adds some infrastructure for testing the BufferQueue class.  It
also includes a test that tests the new check in BufferQueue::acquireBuffer
that prevents the consumer from acquiring more than one buffer beyond the max
acquired buffer count that was set.

Change-Id: I38554ad3f9a53d2ddeba7ef0deee35ec2e2f9775
2012-08-31 17:02:49 -07:00
Andy McFadden
6bf552ee02 Add timeout when waiting for HW vsync
This way we don't get stuck if, say, the driver decides not
to send us vsync events.

Change-Id: I4af6358b3a1f304eaae5fd926ed3403fa1091827
2012-08-31 16:47:44 -07:00
Jamie Gennis
fdb6b49dfa libgui: disable CpuConsumer tests
This change disables the CpuConsumer tests because they require a Gralloc
format that is not supported on all devices.

Change-Id: Ifaa618062c1dae53d9fcb9e16ba92c480d3dbd0c
2012-08-31 15:54:21 -07:00
Dianne Hackborn
8210185fe3 No longer need "original calling uid".
Change-Id: Ifc4a89dd088609a5a8553f6ac6553174e09e8222
2012-08-31 15:40:58 -07:00
Jesse Hall
9ca48916bc If there is no hwc, call eglSwapBuffers for the main display
Bug: 7068568
Change-Id: I6a0309613fe3619d065b9047af6c3fb32b510d97
2012-08-31 13:52:25 -07:00
Jesse Hall
f90883d6a5 Merge "HWC 1.1: hook up hotplug event, use new display config queries" into jb-mr1-dev 2012-08-31 12:57:07 -07:00
Jesse Hall
1bd20e0f9e HWC 1.1: hook up hotplug event, use new display config queries
Change-Id: I2fd359e5fc7e1948072c6bc6b6fe47ea5e8025c1
2012-08-31 09:25:24 -07:00
Jamie Gennis
4697528eac SurfaceTexture: fix a few tests
Change-Id: Ic74fe8791361f8fe91ad7149720fafd4cc154ac1
2012-08-30 18:38:11 -07:00
Jamie Gennis
d69097f936 libgui: add some error checks
This change adds a few error checks both in the framework and in some tests.

Change-Id: I2baf2676942a0dc15866e75852a775a0091ed16d
2012-08-30 18:38:11 -07:00
Jamie Gennis
5e5efde787 BufferQueue: add a check for the max acquired bufs
This change adds an error check to ensure that consumers don't acquire more
buffers than the maximum that they set.

Change-Id: I026643564bde52732e4ee6146972b207ddbbba77
2012-08-30 18:38:11 -07:00
Jamie Gennis
72f096fb1a BufferQueue: use max acquired buffer count
This change makes BufferQueue derive the min undequeued buffer count from a max
acquired buffer count that is set by the consumer.  This value may be set at
any time that a producer is not connected to the BufferQueue rather than at
BufferQueue construction time.

Change-Id: Icf9f1d91ec612a079968ba0a4621deffe48f4e22
2012-08-30 18:26:09 -07:00
Jamie Gennis
1847f7fd79 Merge "BufferQueue: simplify max buffer count handling" into jb-mr1-dev 2012-08-30 18:23:27 -07:00
Jamie Gennis
2b97769823 Merge "BufferQueue: clean up buffer counting" into jb-mr1-dev 2012-08-30 18:21:11 -07:00
Wink Saville
f196b56d70 Merge "Revert "A vendor ril depends on a native screen shot code."" into jb-mr1-dev 2012-08-30 17:31:47 -07:00
Jesse Hall
ec34af4144 Merge "Handle new device api version encoding" into jb-mr1-dev 2012-08-30 14:24:53 -07:00
Wink Saville
94f261556c Revert "A vendor ril depends on a native screen shot code."
This reverts commit 9b5782baf0.

A new ril for toro, hack no longer needed.
2012-08-30 11:53:55 -07:00
Mathias Agopian
93997a8a75 fix a crasher when setting a display to a null surface
Bug: 7076303
Change-Id: I843dd4ee4a603b8ad51bc1ad14e429db15050bec
2012-08-29 18:22:23 -07:00
Mathias Agopian
c9ea4c8b58 Merge "we were sometimes not setting fences properly" into jb-mr1-dev 2012-08-29 17:24:54 -07:00
Mathias Agopian
85d751cba5 we were sometimes not setting fences properly
this would happen when the composition was handled
entirely in h/w composer, in this case, we would
not set the fences for any involved layers.

Bug: 7049373
Change-Id: I1439dc156ce23c24041cdfbbebfe8ff4fdf790f8
2012-08-29 16:59:24 -07:00
Jamie Gennis
e191e6c348 BufferQueue: simplify max buffer count handling
This change reworks how the maximum buffer count is computed.

Change-Id: I7d3745814b9bd6f6f447f86bfea8eb7729914ebf
2012-08-29 15:35:34 -07:00
Jamie Gennis
31a353da22 BufferQueue: clean up buffer counting
This change is a clean up of some of the handling of the maximum number of
buffers that are allowed at once.  It mostly renames a few member variables and
methods, but it includes a couple small refactorings.

Change-Id: I9959310f563d09583548d4291e1050a7bbc7d87d
2012-08-29 15:35:34 -07:00
Andreas Huber
c1396dd145 Merge "initial checkin of a preliminary HDCP API for vendors to implement." into jb-mr1-dev 2012-08-29 13:32:15 -07:00
Andreas Huber
a8fc772b5b initial checkin of a preliminary HDCP API for vendors to implement.
Change-Id: If98277efdec1bc8f1e9f4af1ca73324e4c3d469b
2012-08-29 13:26:55 -07:00
Jesse Hall
9eb1eb5bb5 Handle new device api version encoding
Change-Id: I3d36058bd5d31c23b3cc4a7eb5aa033b6f3c1955
2012-08-29 10:39:38 -07:00
Wink Saville
b82af2a8ae Merge "A vendor ril depends on a native screen shot code." into jb-mr1-dev 2012-08-28 16:22:55 -07:00
Wink Saville
9b5782baf0 A vendor ril depends on a native screen shot code.
Add a temporary shim until the vendor fixes the ril.

Bug: 7073467
Change-Id: Ia95a58bd90677c03406c988d1c29ae785f8662f2
2012-08-28 16:20:50 -07:00
Mathias Agopian
7e7ed7f77a the layer list per display could contain non-visible layers
this happened because we didn't check that the visible
region was within the bounds of the display.

Bug: 7064121
Change-Id: I2e81850a3dc3d1474253520ad7f9e559c26d5a96
2012-08-28 14:20:00 -07:00
Mathias Agopian
55801e41e6 we were not always clearing the screen properly
Change-Id: I269dd866e965aebd9b3c4667095818202982f4a3
2012-08-27 18:54:24 -07:00
Mathias Agopian
525705c88f Merge "Eradicate DisplayID." into jb-mr1-dev 2012-08-27 18:45:34 -07:00
Jeff Brown
25e234f11a am f456d32d: (-s ours) am d7007cd4: Merge "Forward compatibility patch."
* commit 'f456d32d3c3aea966b5fba43e6d34f72df06c60d':
  Forward compatibility patch.
2012-08-27 18:03:45 -07:00
Jeff Brown
f456d32d3c am d7007cd4: Merge "Forward compatibility patch."
* commit 'd7007cd4bb2016a09ae8e8f746118f81fdd27f02':
  Forward compatibility patch.
2012-08-27 17:57:26 -07:00
Mathias Agopian
3ee454a7be Eradicate DisplayID.
DisplayDevices are now keyed of the wp<IBinder> the client uses.
DisplayID has now become DisplayType which is just used to identify
physical displays (as opposed to virtual displays such as wifi displays).

Change-Id: I0c5968f2c902dcd699a7e0afacf833ff070c12ea
2012-08-27 17:43:43 -07:00
Jeff Brown
d7007cd4bb Merge "Forward compatibility patch." 2012-08-27 17:26:06 -07:00
Jeff Brown
a50b51c03a Compatibility work around for bad graphics driver dependency.
This is a compatibility shim for one product whose drivers
are depending on SurfaceComposerClient::getDisplayInfo(
int, DisplayInfo*) when it really shouldn't.

Revert this patch when the problem has been resolved.

Bug: 7065398
Change-Id: I6542691b81fd1b1e1d79500a62e82d40a3d51db7
2012-08-27 17:20:53 -07:00