Commit Graph

46875 Commits

Author SHA1 Message Date
Eino-Ville Talvala
0493044503 Merge "Add BufferItemConsumer, a simple BufferQueue consumer." into jb-mr1-dev 2012-08-21 16:46:05 -07:00
Eino-Ville Talvala
e232fdca2a Add BufferItemConsumer, a simple BufferQueue consumer.
BufferItemConsumer allows for acquiring BufferQueue's BufferItems,
which contain all the data and metadata the BufferQueue has for a
given graphics buffer.

This consumer is useful when direct access to the native buffer_handles
is needed by the client.

Also includes a minor cleanup of CpuConsumer's use of 'virtual'.

Bug: 6243944
Change-Id: If7dc4192b15ac499555f1eda42a85140f2434795
2012-08-21 15:46:35 -07:00
Andy McFadden
3f3956236a Added display initialization method
The primary display device was being configured to "blank" by
default, which prevented the boot animation from appearing
(unless you got lucky with the hardware composer state).

Bug 6975688

Change-Id: Idaa0d0b98ebb331a17d1b16774c6b05bfa1e8728
2012-08-21 13:11:51 -07:00
Mathias Agopian
a4cb35a286 fix various issues in SF's EventThread
- one issues caused most timestamps to be reported as 0
- on rare occasions an uninitialized variable could be used
- vsync counts per connection were accessed unthreadsafely

we now have 2 lists of connections in the main loop, one just
keeps a list of strong refs to the connections because once
we have a strong ref we're not allowed to release it while
holding the lock.

the 2nd list holds the connections that have a vsync event to
be reported. all the calculations are made with the lock held.

Change-Id: Iacfad3745b05df79d9ece3719bd4c34ddbfd5b83
2012-08-20 21:41:29 -07:00
Mathias Agopian
1648d4c13b put back the unused virtuals in Vector<>
some binaries are using these private APIs and broke
(as they should!) with this change. Temporarily restore the
virtuals to work around this.

Bug: 6977550
Change-Id: I7c37f24b16e4d586b89205c493db5169cf87e024
2012-08-20 21:23:15 -07:00
Mathias Agopian
317357fdf7 Merge "get rid of mirrorItemAt() which isn't used anywhere" into jb-mr1-dev 2012-08-20 16:48:07 -07:00
Eino-Ville Talvala
84a9a3c0ec Merge "CpuConsumer: inherit from ConsumerBase" into jb-mr1-dev 2012-08-20 16:18:11 -07:00
Eino-Ville Talvala
f57e7540d4 CpuConsumer: inherit from ConsumerBase
Change-Id: I55178b1d673ffa0fbc6e63ef47642c64d4d03228
2012-08-20 15:44:40 -07:00
Mathias Agopian
f4ce7803fe get rid of mirrorItemAt() which isn't used anywhere
Change-Id: Id6f2dbeed21cabc127d39538c0ff464077ada83f
2012-08-20 15:25:19 -07:00
Jamie Gennis
729f48082e Merge "Revert "SurfaceTexture: inherit from ConsumerBase"" into jb-mr1-dev 2012-08-20 14:33:24 -07:00
Jamie Gennis
f7f6345068 Merge "Revert "SurfaceTexture: call ConsumerBase::freeBufferLocked"" into jb-mr1-dev 2012-08-20 14:33:16 -07:00
Jamie Gennis
ce7a6c0fc9 Revert "SurfaceTexture: inherit from ConsumerBase"
This reverts commit ed059a8d75

Change-Id: I72542c2595771a40c2c88251e0d6eb54e305b99b
2012-08-20 14:28:53 -07:00
Jamie Gennis
483bccd0d9 Revert "SurfaceTexture: call ConsumerBase::freeBufferLocked"
This reverts commit f8d33c652b

Change-Id: I1ff2e1cc85824a8fac1051f573d2931db81af511
2012-08-20 14:28:21 -07:00
Mathias Agopian
b3d68efa7e Merge "Fix deadlock in SF." into jb-mr1-dev 2012-08-20 14:20:17 -07:00
Jamie Gennis
220ef10c5f Merge "SurfaceTexture: call ConsumerBase::freeBufferLocked" into jb-mr1-dev 2012-08-20 12:39:38 -07:00
Jamie Gennis
f8d33c652b SurfaceTexture: call ConsumerBase::freeBufferLocked
This change fixes SurfaceTexture::freeBufferLocked so that it calls the base
class implementation.

Change-Id: I45d76fb2eb02c1fa6e4e917823ead83e2086bd15
2012-08-20 11:30:44 -07:00
Jean-Baptiste Queru
d3bbcaff6f resolved conflicts for merge of 21938749 to jb-mr1-dev
Change-Id: I17da10797736f3772a143e2015fe25df0bb3eb3f
2012-08-20 10:22:33 -07:00
Jean-Baptiste Queru
0adc8f2600 am 6e820eec: am 6f89ebde: Merge "EGL: do not use sparse files for shader"
* commit '6e820eec21917f8e25c40dbc8b972468535af0e8':
  EGL: do not use sparse files for shader
2012-08-20 09:42:32 -07:00
Jean-Baptiste Queru
21938749fa am 349149b5: Merge "Fix error trap in SurfaceTexture Client"
* commit '349149b52a424c212e33d165bc146bc0337ea4c4':
  Fix error trap in SurfaceTexture Client
2012-08-20 09:40:11 -07:00
Jean-Baptiste Queru
6e820eec21 am 6f89ebde: Merge "EGL: do not use sparse files for shader"
* commit '6f89ebded650406818b5fc5e9eaf096a06a2798c':
  EGL: do not use sparse files for shader
2012-08-20 09:40:11 -07:00
Jean-Baptiste Queru
349149b52a Merge "Fix error trap in SurfaceTexture Client" 2012-08-20 08:55:05 -07:00
Jean-Baptiste Queru
6f89ebded6 Merge "EGL: do not use sparse files for shader" 2012-08-20 08:54:42 -07:00
Mathias Agopian
10125f00a5 Fix deadlock in SF.
problem was that we were acquiring a strong reference
on Connection object with a lock held, when those
got out of scope (lock still held) their dtor
could be called if all other refs had dropped,
the dtor would acquire the lock again to
remove the Connection from the main list. boom.

we rearange the code so this doesn't happen.

Bug: 6942208

Change-Id: I0a0ebabce2842d29d60d645b64aac2f26640e59b
2012-08-17 18:48:56 -07:00
Jamie Gennis
2c7eb92b63 Merge "SurfaceTexture: inherit from ConsumerBase" into jb-mr1-dev 2012-08-17 15:35:17 -07:00
Mathias Agopian
cd60f99aba refactor compositing code to avoid multiple eglMakeCurrent() calls
when multiple displays are connected, we ended-up having to
call eglMakeCurrent() twice per display due to a limitation
in EGL. this fixes that.

Change-Id: I11e4584df50f8c24bbecee74e37b28b3ee031d2f
2012-08-16 20:58:58 -07:00
Mathias Agopian
5f20e2d446 reimplement wifi display hack with new external display SF framework
fix a few bugs with external displays

- HWComposer doesn't really handle multiple displays yet
  so there is a lot of ugliness there

- We also need to make sure that external displays are not
  blanked by default

- due to some EGL limitations surfaces being swapped need
  to be current

Change-Id: I82bff05b43bcebd8da863c7c76b4edbc3bc223a9
2012-08-16 20:58:58 -07:00
Mathias Agopian
818b46058a display states can't share the dirty flags
Change-Id: Ifade9f2f1a0df9a36aede77a6cf5eee4be534f98
2012-08-16 20:58:57 -07:00
Mathias Agopian
111b2d8922 binder interfaces can't be compared directly
we always need to compare their binder

Change-Id: I70d554ebc5009fe81e87923235f91451f32e1a30
2012-08-16 20:55:28 -07:00
Jamie Gennis
ed059a8d75 SurfaceTexture: inherit from ConsumerBase
This change makes SurfaceTexture inherit from ConsumerBase.  It removes all of
the functionality from SurfaceTexture that is now provided by the base class.

Change-Id: I4a881df42810a14ee32d4ef7c8772a8f2510f4c7
2012-08-16 18:11:02 -07:00
Siva Velusamy
c21fc05af7 Merge "gltrace: flush trace buffer on createContext & makeCurrent" into jb-mr1-dev 2012-08-16 16:26:59 -07:00
Siva Velusamy
ad9693f4f0 gltrace: flush trace buffer on createContext & makeCurrent
Certain apps (e.g. chrome) seem to create contexts which are unused
for long periods of time. If tracing is stopped before those contexts
are used, then the debugger never gets to know that these contexts
were created. Flushing the trace after these calls ensures that
the debugger knows about all created/used contexts.

Change-Id: I01baa11aa56ac89eddce3c2851e4bf01076984d1
2012-08-16 14:41:20 -07:00
Mathias Agopian
13233e067b oopsie, missed a spot when fixing b/6970310
Change-Id: Ia320fddc7cc4b0666a4fee678af710ecf5f83ff5
2012-08-15 16:14:33 -07:00
Mathias Agopian
3559b07a88 we were mistakenly optimizing out SF's main transactions in some cases
due to a typo, SF's main transaction was conditional to having a
display transaction.

more correct fix for 6970310

Bug: 6970310
Change-Id: Iafd8c4e02afa5db829cc1c65950cfcc74754c6af
2012-08-15 13:46:03 -07:00
Jeff Brown
ac1f70bb71 Use new PowerManager API.
Change-Id: I66165d9954e2d1da9204216382a05a873f1393f4
2012-08-15 01:16:39 -07:00
Jeff Brown
01eb979243 Fix layer removal transaction.
Layers were not properly being removed because we were
setting the wrong transaction type flag at the time of
removal.

When layers are removed, we must use eDisplayTransactionNeeded,
not eTransactionNeeded, to ensure that the mLayersRemoved
flag is checked and the appropriate cleanup occurs.

Bug: 6970310
Change-Id: Id4b2897a34d4ac00aa0f92349c0ec6db95c1aaf7
2012-08-15 01:16:16 -07:00
Jesse Hall
ea599dfff0 Don't crash when recovering from WM death
Bug: 6956162
Change-Id: I27244b960c77187b4c4cd7297989c4c872e94a3a
2012-08-14 15:33:04 -07:00
Jeff Brown
f0083bf528 Merge "Add a very simple helper function to log slow functions." into jb-mr1-dev 2012-08-13 23:35:08 -07:00
Mathias Agopian
20128300e0 make sure to repaint the screen when unblank()ing
Change-Id: I38e3a8e6bb31ef3d2f1fcaec7490cb92a4427db2
2012-08-13 18:32:13 -07:00
Mathias Agopian
8b736f138c xdpi / ydpi were reported as 0
Bug: 6975723
Change-Id: Ia7fa37ec11e2308804f5034959a37e508d292d31
2012-08-13 17:54:26 -07:00
Mathias Agopian
670d24a8ae Merge "improve [un]marshalling of non-binder objects" into jb-mr1-dev 2012-08-13 14:28:25 -07:00
Jesse Hall
7e5099a9ec Add compile-time option to systrace GL-ES calls
Change-Id: Ibec103bbf159626ad9745d0e071192ad424bc0e9
2012-08-13 12:13:05 -07:00
Mathias Agopian
8683fca395 improve [un]marshalling of non-binder objects
this change introduces a new class LightFlattenable<> which is
a protocol to flatten simple objects that don't require
binders or file descriptors; the benefit of this protocol is that
it doesn't require the objects to have a virtual table and give us
a consitant way of doing this.

we also introduce an implementation of this protocol for
POD structures, LightFlattenablePod<>.

Parcel has been update to handle this protocol automatically.

Sensor, Rect, Point and Region now use this new protocol.

Change-Id: Icb3ce7fa1d785249eb666f39c2129f2fc143ea4a
2012-08-13 02:46:05 -07:00
Jeff Brown
6f12d57325 Add a very simple helper function to log slow functions.
Change-Id: I2e2e072206d02b572a330dd25857c161b5b563bf
2012-08-10 22:03:55 -07:00
Mathias Agopian
e57f292595 make multi-display more real
- displays are represented by a binder on the client side
- c++ clients can now create and modify displays

Change-Id: I203ea5b4beae0819d742ec5171c27568f4e8354b
2012-08-10 17:32:33 -07:00
Mathias Agopian
ef7b9c7eac screenshots could stop working after camera was used
once a secure window is put on screen the display
would retain its "secure" flag forever, preventing
screenshots from being taken.

Bug: 6933967
Change-Id: I5be8355145ca7d580d84552311642f8fa912fe6a
2012-08-10 15:23:41 -07:00
Mathias Agopian
748f3df66f avoid crashing when we don't have an h/w composer
should fix the emulator

Bug: 6956162
Change-Id: I38247b59d276b8db078c4dc2caba7d3fb545912c
2012-08-10 14:36:40 -07:00
Mathias Agopian
3165cc21cf libgui includes refactoring
Change-Id: I1d24ec17f5003ec2abab5f7472daaff4cc4cc2d3
2012-08-10 13:18:24 -07:00
Mathias Agopian
1e26087493 Add a display parameter to HWComposer where needed
- also replace C casts with C++ casts
- only the interface is changed, HWComposer still doesn't
  fully handle multiple displays

Change-Id: I48eb89bff2edb76bf1d4d41f46802b9b2a7166a8
2012-08-10 13:18:24 -07:00
Mathias Agopian
28947d7fbf now able to set the layer stack on a DisplayDevice
Change-Id: Ia9691cf221b9444c243eb468d9e276a30e600b6b
2012-08-10 13:18:23 -07:00
Mathias Agopian
69973992d5 improve Vector<> safety checks
- make errors that will always cause a memory corruption always fatal
  (for eg: KeyedVector<>::editValue{For|At}() failure)
- make other errors fatal in debug mode, those that can be caught by
  the caller.
- fix typos

Change-Id: I65cc7d81035c37ce2906fc4500c50e5d5b5c49eb
2012-08-10 13:15:00 -07:00