3861 Commits

Author SHA1 Message Date
John Grossman
36d372fb6a Explicitly manage common clock client lifetimes.
Change the CCHelper class to be an instanced instead of a static
pattern.  The CCHelper instances all share an interface to the common
clock service and register/unregister a callback handler in response
to there being CCHelper instance in the system or not.  This brings
usage of the CCHelper into like with the new auto-disable
functionality of the common time service.  For any given process,
whenever there are CCHelper instances active, the process will
maintain a callback target to the common clock service and will be
considered to be an active client.

Also change all of the users of the CCHelper interface to manage the
lifecycle of their new CCHelper instances.

Change-Id: I7c28c5d70d9b07ba7407b4ac706e7e7d7253001b
2012-02-06 18:02:33 -08:00
John Grossman
9387f4f800 Add native common time config service.
Define a native service interface for configuring and controlling the
common time service.  Implement the native marshallers and stub the
implementation of the new interface.

Change-Id: Ia6a6a20ef3d221e8829c55be1dd5f98ed996c610
2012-02-03 17:46:00 -08:00
John Grossman
2627965d61 Add marshallers for the new common clock methods.
Add marshallers and stub implementations for new methods in the common
clock interface to support new functionality being added in the
process of integrating the common time service more closely with the
Java level of Android.

Change-Id: Iac2d3fb405d1b64cea1d8e13f988160afb76a06d
2012-02-03 17:45:53 -08:00
John Grossman
573c84d43e Change ICommonClock marshallers to return explicit error codes.
Change the ICommonClock marshallers to return an explicit error with
each transaction.  This makes it easier to disambiguate between binder
errors (dead object due to the service crashing) vs. runtime errors
(cannot return common time due to lack of sync)

Change-Id: I2182cf0cfb2e11b4669f392554f104ef7c4bca8b
2012-02-03 17:45:30 -08:00
John Grossman
232f869c99 De-AAH-ify the common time service.
Bulk name change to remove references to Android@Home from the common time
service in preparation for cleanup and up-integration into the master
branch.  Basically, aah_timesrv is now common_time.

Change-Id: I3d3db212f96e8ba171aa36b9c58e27e4a336cb0a
2012-02-03 17:43:21 -08:00
Robert Ly
1f6aae1c54 am 6ad9ea7d: Merge "update overview page for rs api docs to open iframe links in parent" into ics-mr1
* commit '6ad9ea7deb669eca68c58f001c935255c3294cfe':
  update overview page for rs api docs to open iframe links in parent
2012-01-18 13:19:52 -08:00
Robert Ly
c9508b020d am 62472581: Merge "cherrypick from master - add overview description for RS API reference Change-Id: Id5554c607ad4c435f92bfa939e4ce4833a638f62" into ics-mr1
* commit '62472581c30a3202b7bbd86e644b4346d5a4e65c':
  cherrypick from master - add overview description for RS API reference Change-Id: Id5554c607ad4c435f92bfa939e4ce4833a638f62
2012-01-13 11:10:37 -08:00
Robert Ly
2eeb53c155 update overview page for rs api docs to open iframe links in parent
Change-Id: Ic0aa77192fa19b045a7fd9df5926255511fdc3be
2012-01-13 10:18:43 -08:00
Robert Ly
0272f1dfd7 cherrypick from master - add overview description for RS API reference Change-Id: Id5554c607ad4c435f92bfa939e4ce4833a638f62
Change-Id: Iff4b4bd171818208bb3be46dd3ef7e91b6cbd80f
2012-01-13 10:07:20 -08:00
Jamie Gennis
ff26bd8f4d am a1dee3f5: Merge "SurfaceTexture: fix a verbose-log compile error" into ics-mr1
* commit 'a1dee3f500eccedbf5e50d466315fb28ba812cfc':
  SurfaceTexture: fix a verbose-log compile error
2011-12-12 14:12:06 -08:00
Jamie Gennis
798b9cdf8c SurfaceTexture: fix a verbose-log compile error
Change-Id: I045231207e068d950bb0cb5085717af5d9454ed1
2011-12-09 15:07:44 -08:00
Ben Cheng
f04c71b9ed am e21dabf6: Merge "Initialize bwr.read_buffer in IPCThreadState::talkWithDriver." into ics-mr1
* commit 'e21dabf654e3d90e50e95174d5e9670bc930c194':
  Initialize bwr.read_buffer in IPCThreadState::talkWithDriver.
2011-12-01 22:06:35 -08:00
Ben Cheng
e21dabf654 Merge "Initialize bwr.read_buffer in IPCThreadState::talkWithDriver." into ics-mr1 2011-12-01 22:05:07 -08:00
Stephen Hines
e4323410f0 am 976ae272: Add support for handling a bitcode wrapper to librs.
* commit '976ae27270a64c5abeb380d6e61d6d71f29b9433':
  Add support for handling a bitcode wrapper to librs.
2011-12-01 18:11:16 -08:00
Ben Cheng
0450570879 Initialize bwr.read_buffer in IPCThreadState::talkWithDriver.
I/valgrind( 1309): ==1310== Syscall param
ioctl(BINDER_WRITE_READ).read_buffer points to uninitialised byte(s)
I/valgrind( 1309): ==1310==    at 0x480E670: __ioctl (__ioctl.S:10)
I/valgrind( 1309): ==1310==  Address 0xbda651b4 is on thread 1's stack

Change-Id: I02893df7b5786b6b2dbd9659f5706d7171295ab2
2011-12-01 17:11:32 -08:00
Stephen Hines
976ae27270 Add support for handling a bitcode wrapper to librs.
BUG=5425905

Change-Id: I75676060703df6d9043b287fea900c4379455ee2
2011-12-01 16:37:00 -08:00
Mathias Agopian
487e25edcb am bb1e7d43: Merge changes I7e973a35,Ib3386fcc into ics-mr1
* commit 'bb1e7d4324ff43491c526c77f405bbbf0cece611':
  SurfaceTexture: add EGL_KHR_fence_sync option
  SurfaceTexture: add a blit-to-FBO test
2011-11-29 17:48:12 -08:00
Jamie Gennis
77cec6132a SurfaceTexture: add EGL_KHR_fence_sync option
This change adds a compile-time option for SurfaceTexture to use the
EGL_KHR_fence_sync extension to synchronize access to Gralloc buffers.

Bug: 5122031
Change-Id: I7e973a358631fff5308acf377581b811911fe790
2011-11-29 17:09:01 -08:00
Jamie Gennis
d6c938f04e SurfaceTexture: add a blit-to-FBO test
This change adds a test for blitting (via GL rendering) from a
SurfaceTexture to an FBO.

Change-Id: Ib3386fcc3f37153277f3e37a26347441bb80ab58
2011-11-29 14:52:36 -08:00
Romain Guy
8b435d966a am 46685db9: Merge "Fix crash in existing applications Bug #5659476" into ics-mr1
* commit '46685db957cc01cef4ba198aafe44d99fe31f62c':
  Fix crash in existing applications Bug #5659476
2011-11-28 16:08:47 -08:00
Romain Guy
46685db957 Merge "Fix crash in existing applications Bug #5659476" into ics-mr1 2011-11-28 16:06:52 -08:00
Chet Haase
ec5f7df910 am 8990cb57: Merge "Fix flashing wifi dialog after rotating back from landscape." into ics-mr1
* commit '8990cb5768efba46bb1d7458377dd44498afcfdb':
  Fix flashing wifi dialog after rotating back from landscape.
2011-11-28 15:45:30 -08:00
Chet Haase
08837c246c Fix flashing wifi dialog after rotating back from landscape.
There was an error in some of the OpenGL layer logic such that we would
occasionally set up a layer for rendering and then not clean up when it was
done. This caused future OpenGL rendering to go into that layer instead of
to the buffers being displayed on the screen, resulting in artifacts including
flashes and displaying of stale content. This happened specifically when
using the wifi settings dialog with the InputMethod keyboard displayed,
but it was probably visible in other situations as well.

Issue #5628248: Flickering/flashing after entering password for WiFi

Change-Id: I38139f620b310f4309570fa7224552d2ee633999
2011-11-28 15:19:22 -08:00
Romain Guy
ff98fa5a84 Fix crash in existing applications
Bug #5659476

The FontRenderer was not cleaning up its temporary state, leading
to crashes when invoking renderDropShadow.

Change-Id: I43b24820dd5625af8c080bbe11b64de2f74164b2
2011-11-28 14:55:56 -08:00
Romain Guy
6490d01a3b am 303a0695: Merge "Draw in the correct FBO after invoking a GL functor Bug #5650514" into ics-mr1
* commit '303a0695b8fa0b8f0095c437145a28633a7a8d92':
  Draw in the correct FBO after invoking a GL functor Bug #5650514
2011-11-22 12:34:25 -08:00
Romain Guy
303a0695b8 Merge "Draw in the correct FBO after invoking a GL functor Bug #5650514" into ics-mr1 2011-11-22 12:33:17 -08:00
Mathias Agopian
74b653e754 am 07a2d831: Merge "don\'t report an error when disconnecting from an abandoned surfacetexture" into ics-mr1
* commit '07a2d831903774e07c1c6b6dd5c7c06bf8ca176a':
  don't report an error when disconnecting from an abandoned surfacetexture
2011-11-21 18:00:53 -08:00
Mathias Agopian
6d370ac037 am 8646cd42: Merge "enable ALLOW_DEQUEUE_CURRENT_BUFFER for tegra devices" into ics-mr1
* commit '8646cd42df5edc5f5b9c52d6ab5309821e875656':
  enable ALLOW_DEQUEUE_CURRENT_BUFFER for tegra devices
2011-11-21 17:58:42 -08:00
Mathias Agopian
07a2d83190 Merge "don't report an error when disconnecting from an abandoned surfacetexture" into ics-mr1 2011-11-21 17:57:31 -08:00
Mathias Agopian
8646cd42df Merge "enable ALLOW_DEQUEUE_CURRENT_BUFFER for tegra devices" into ics-mr1 2011-11-21 17:57:20 -08:00
Jamie Gennis
9173eef644 am 53cf2020: Merge changes I37fd43b5,I91eb29db,I0491ce35 into ics-mr1
* commit '53cf20202a3848a6c61b5229814268180a3d2f16':
  SurfaceTexture: fix a couple tests
  EGL: default to swap interval 1
  SurfaceTexture: clean up some tests
2011-11-21 15:56:15 -08:00
Romain Guy
421458aad7 Draw in the correct FBO after invoking a GL functor
Bug #5650514

After invoking a GL functor, libhwui restores a few OpenGL states
including the current FBO. The renderer was however making the
wrong assumption that the FBO to restore to was the base layer
instead of the FBO associated with the current canvas state.

Change-Id: Ie565500832ebffd673f6a43b83422d6cc05470a0
2011-11-21 15:14:37 -08:00
Jamie Gennis
caa4482a68 SurfaceTexture: fix a couple tests
This change fixes some robustness issues with the
EglDestroySurfaceUnrefsBuffers and
EglDestroySurfaceAfterAbandonUnrefsBuffers tests.  The tests previously
depended upon GL implementation details that should not have been relied
upon.

Change-Id: I37fd43b56568efe1dbe69d85e892be8a1cf44d20
2011-11-21 14:38:15 -08:00
Jamie Gennis
87f3265bb0 EGL: default to swap interval 1
This change explicitly sets swap interval 1 on the window when an
EGLSurface is created to render to it.

Change-Id: I91eb29dbee3ae4a55076b921f084d503fbe94e03
2011-11-21 14:37:29 -08:00
Jamie Gennis
c10a94c4b8 SurfaceTexture: clean up some tests
This change cleans a few things up in the SurfaceTexture tests:
- Wraps a few long lines.
- Refactors the multithreading portions of SurfaceTextureGLToGLTest into
  a new test fixture called SurfaceTextureGLThreadToGLTest.
- Changes some of the tests that were creating their own EGLSurface to
  use the SurfaceTextureGLToGLTest fixture.
- Reorders the test functions so that they are immediately below to the
  test fixture that they use.

Change-Id: I0491ce3528a7ff2b4f1e83602ba290269c087297
2011-11-21 11:52:02 -08:00
Mathias Agopian
b05bb17eeb don't report an error when disconnecting from an abandoned surfacetexture
this happens often with CPU Surfaces, which disconnect long
after their surfacetexture has been abandoned.

Change-Id: If49da03b72f99130e01b2b9bcbd444bb38f7ed4e
2011-11-18 14:32:35 -08:00
Mathias Agopian
e2fa30cba0 enable ALLOW_DEQUEUE_CURRENT_BUFFER for tegra devices
this flag should be enabled for all targets, but currently
some have issues with it, so we're turning it on only for
tested targets.

this will hopefully resolve some performance issues.

Bug: 5553562, 5631630
Change-Id: I54c7a9e2068586898ab13e405d95534669260537
2011-11-18 13:50:35 -08:00
Mathias Agopian
6166318fd5 am 4d71053b: Merge "attempt to fix bug 5313580" into ics-mr1
* commit '4d71053b0728b248d80d7d5a098df459722e2be0':
  attempt to fix bug 5313580
2011-11-18 12:13:55 -08:00
Mathias Agopian
4d71053b07 Merge "attempt to fix bug 5313580" into ics-mr1 2011-11-18 12:11:15 -08:00
Mathias Agopian
90cbbd1f7f attempt to fix bug 5313580
the working theory here is that a Surface object has become non-promotable
because it lost its last reference; later Surface::readFromParcel is called
the previous surface is found in the cache, but can't be promoted. this causes
a new Surface object to be created which will promptly try to connect to the
CPU_API -- this in turn will fail because the previous (now dead) surface is
still connected.

To fix this, we make sure to disconnect from the SurfaceTexture when
Surface[TextureClient] is destroyed.

Change-Id: I422234868a05d7b7d283e9d5a85f7ab79e65d8a9
2011-11-17 18:46:09 -08:00
Jamie Gennis
8bf35429f9 am 2ba13186: Merge "SurfaceTexture: fix a bug with buffer reallocation" into ics-mr1
* commit '2ba13186b268de3527af6da1933a4b65877548d9':
  SurfaceTexture: fix a bug with buffer reallocation
2011-11-17 17:12:45 -08:00
Jamie Gennis
2ba13186b2 Merge "SurfaceTexture: fix a bug with buffer reallocation" into ics-mr1 2011-11-17 17:10:47 -08:00
Jamie Gennis
e36d05483f SurfaceTexture: fix a bug with buffer reallocation
This change fixes an issue involving buffer reallocation and the
ALLOW_DEQUEUE_CURRENT_BUFFER mode in SurfaceTexture.  The bug happened
when the buffer slot currently attached to the GL texture was selected
for dequeuing, but the dequeue operation caused the buffer to be
reallocated.  Because the buffer is new, the image producer could fill
the buffer and queue it before an updateTexImage call, which would
result in the "slot %d is current" error in queueBuffer.

Bug: 5631630
Change-Id: Icdd8bc5cad3c7db43953446d9be2603aaea11a8d
2011-11-17 16:00:44 -08:00
Mathias Agopian
908d56171f am 69c17a11: Merge "Revert "enable ALLOW_DEQUEUE_CURRENT_BUFFER for tegra devices"" into ics-mr1
* commit '69c17a11a2ce5badc238e66ce9f8ca4a3a1028b3':
  Revert "enable ALLOW_DEQUEUE_CURRENT_BUFFER for tegra devices"
2011-11-16 16:16:17 -08:00
Mathias Agopian
69c17a11a2 Merge "Revert "enable ALLOW_DEQUEUE_CURRENT_BUFFER for tegra devices"" into ics-mr1 2011-11-16 16:13:38 -08:00
Mathias Agopian
db5494c406 Revert "enable ALLOW_DEQUEUE_CURRENT_BUFFER for tegra devices"
This reverts commit e7758be6da85728df6b4215f413660c67c5a9740.

Seemed to cause failures un SurfaceTexture.

Bug: 5627450
2011-11-16 15:59:13 -08:00
Jamie Gennis
51a23606e8 am fd6b64f6: Merge "SurfaceTexture: Fix to return the oldest of free buffers to Client on Dequeue call" into ics-mr1
* commit 'fd6b64f6ad040b4d550a5219a2576997e2c0e85d':
  SurfaceTexture: Fix to return the oldest of free buffers to Client on Dequeue call
2011-11-16 11:36:42 -08:00
Jamie Gennis
fd6b64f6ad Merge "SurfaceTexture: Fix to return the oldest of free buffers to Client on Dequeue call" into ics-mr1 2011-11-16 11:34:30 -08:00
Jeff Brown
eba508a537 am 3e7497b4: Merge "Eliminate hw.keyboards system properties." into ics-mr1
* commit '3e7497b4eccd3db1d6ff0ce1f1f2db11f9a8eeef':
  Eliminate hw.keyboards system properties.
2011-11-15 19:19:04 -08:00
Jeff Brown
3e7497b4ec Merge "Eliminate hw.keyboards system properties." into ics-mr1 2011-11-15 19:17:09 -08:00