Commit Graph

48316 Commits

Author SHA1 Message Date
Jaikumar Ganesh
4c01b1ad80 Fix activation issue with auto disabled sensors.
Auto disabled sensors get auto disabled after trigger.
An activation after this wasn't working because the
state was not being reset.

b/8609561

Change-Id: If72c9f27345e91671d7ad0a7a066f6dc3d255b78
2013-04-17 14:58:22 -07:00
Jesse Hall
883daf6eed Merge "Make gen more readable, use UNIX-style line endings" into jb-mr2-dev 2013-04-13 21:18:25 +00:00
Mathias Agopian
48be323236 Merge "make sure to update the "current state" when we "fake" the transaction" into jb-mr2-dev 2013-04-13 00:27:32 +00:00
Jaikumar Ganesh
2ea0c67da6 Merge "Sensor changes." into jb-mr2-dev 2013-04-13 00:22:39 +00:00
Dianne Hackborn
9380d78c98 Add new resources trace.
Change-Id: Iab8c1ef51f491e818fb4bab0ba7a042f0d9bec9a
2013-04-12 16:58:24 -07:00
Mathias Agopian
6c67f0fe45 make sure to update the "current state" when we "fake" the transaction
this mimics the code we used for the size. basically we need to
also update the "current state" because it gets copied to the
"drawing state" when a transaction occurs, and it would
"undo" our change.

Bug: 8511430
Bug: 8581533
Change-Id: I08c02abbf21b7f168f7124cd14ee717d7d3d502c
2013-04-12 16:58:11 -07:00
Jaikumar Ganesh
4342fdf14f Sensor changes.
1. Some sensors can wake up the AP. Add wakelocks.
2. Handle backward compatibility for rotation vector
   heading accuracy.
3. Cleanup auto disabled sensors.
4. Fix race condition between enable and dispatch.

Change-Id: I39dddf12e208d83cd288201986ee994312555820
2013-04-12 09:34:44 -07:00
Chet Haase
5e5bed60d0 Merge "DO NOT MERGE Make sure surfaces always have latest orientation info" into jb-mr2-dev 2013-04-12 14:11:54 +00:00
Mathias Agopian
453cfe0bfe Merge "Improve screenshot performance on some devices (DO NOT MERGE)" into jb-mr2-dev 2013-04-12 03:18:17 +00:00
Mathias Agopian
180f10de6f Improve screenshot performance on some devices (DO NOT MERGE)
this affects devices that need a glReadPixels(). We use
a FBO instead of a GlConsumer as an intermediate render target, this
saves 2 calls to eglMakeCurrent().

On Galaxy Nexus this allows us to go from ~135ms to ~35ms for
recent's screenshots.

Bug: 8582615
Change-Id: I6b25291ecc235f1927579bbb2db3c731e985c6e8
2013-04-11 17:35:24 -07:00
Chet Haase
91d25932b6 DO NOT MERGE Make sure surfaces always have latest orientation info
When the screen is turned off, the current stack is set to -1. This causes
logic in iSurfaceFlinger's handleTransactionLocked() function to fail to
match the current stack, and the latest orientation is not set into the
layer. This causes BufferQueue, later, to potentially set an obsolete
transformHint on a created surface (such as in the case with ImageWallpaper's
Egl surface, in the bug below).

The fix is to note this situation and use a default value for the DisplayDevice,
which should have the current orientation information.

Issue #8508397 ImageWallpaper sometimes rendered in wrong orientation causing a ~30-40% drop in graphics performance

Change-Id: Ibae15d73b289a8343c67f4f6bb77fdf11dd95ee7
2013-04-11 17:06:38 -07:00
Andy McFadden
53dc9044bf Merge "Updated comments" into jb-mr2-dev 2013-04-11 17:15:52 +00:00
Mathias Agopian
d19e519f67 Merge "fix another bug where screenshots could end-up all black" into jb-mr2-dev 2013-04-11 04:43:49 +00:00
Mathias Agopian
9eb1f0558b fix another bug where screenshots could end-up all black
SF transactions were always handled on VSYNC which allowed
the screenshot to sneak-in between closing the transaction
and vsync (before it's latched), resulting in a screenshot
with the previous state.

we now always force transactions to happen immediately
before screenhots.

Bug: 7552304
Change-Id: I0afc86b7e8366173daff5b9988bbb4d2a0f43860
2013-04-10 16:27:17 -07:00
Jesse Hall
a3b641e89c Make gen more readable, use UNIX-style line endings
Change-Id: I6f4a1afa19f84d89278e9447f14a124476106fef
2013-04-10 08:34:54 -07:00
Ying Wang
c76e8a20e2 Merge "Add liblog" into jb-mr2-dev 2013-04-10 05:17:07 +00:00
Ying Wang
8a0cb4ee0b Add liblog
Bug: 8580410
Change-Id: I2ca4fa00dde0b574df3619134836bcb9315bd506
2013-04-09 21:55:39 -07:00
Jamie Gennis
8758a3e394 Merge changes I82e361a6,I83694682 into jb-mr2-dev
* changes:
  libgui_test: increase the tolerance for a YUV test
  libgui: fix an EGLImage leak
2013-04-09 21:43:20 +00:00
Jamie Gennis
e6a0f5028b libgui_test: increase the tolerance for a YUV test
This change increases the pixel difference tolerance of the
SurfaceTextureGLTest.TexturingFromCpuFilledYV12BufferNpot test from 2 to 3.

Bug: 8349135
Change-Id: I82e361a689335f49065cacd8a3fc145d67b125f1
2013-04-08 14:42:22 -07:00
Jamie Gennis
ad669b04f4 libgui: fix an EGLImage leak
This moves the call to ConsumerBase::abandon from the ConsumerBase dtor to
ConsumerBase::onLastStrongRef.  The abandon call relies on virtual methods to
perform the clean-up, so calling it from the ConsumerBase dtor after the
derived classes dtors ran was skipping some of the clean-up.  The
onLastStrongRef method should get called just before the most derived class's
dtor gets called.

Bug: 8349135
Change-Id: I836946826927cc1ed69c049049f525f92b17a269
2013-04-08 14:42:22 -07:00
Jesse Hall
1df59c93fe Merge "Tell HWComposer the dimensions of virtual displays" into jb-mr2-dev 2013-04-06 03:32:19 +00:00
Jesse Hall
d5e345b0cf Merge "Actually set the virtual display output buffer." into jb-mr2-dev 2013-04-06 03:31:49 +00:00
Jesse Hall
1c569c4d45 Tell HWComposer the dimensions of virtual displays
HWComposer queries the HWC for dimensions of physical displays, but
can't do that for virtual displays. The dimensions are used to set the
display frame of the framebuffer target layer passed to HWC, and
implicitly the dimensions of the virtual display.

Bug: 8316155
Change-Id: I9cbd2530d2fa878f86128a1472def520b5d694a5
2013-04-05 14:38:52 -07:00
Andy McFadden
753e3415cd Updated comments
Updated many comments.  Added one minor error check.

Change-Id: Ib935dd99d417bada91d2e198008a50dd94269316
2013-04-05 10:44:23 -07:00
Mathias Agopian
39c24a20bb fix local include paths
Change-Id: Icb921fa796ec08612dbb2feb7e7161bcb0cf4a99
2013-04-04 23:30:18 -07:00
Jeff Tinker
18bd1d6d55 Merge "Implement async event callout from drm plugin to Java app" into jb-mr2-dev 2013-04-05 01:16:21 +00:00
Jesse Hall
6d5b8e600e Merge "Clean up HWC state when releasing a DisplayDevice" into jb-mr2-dev 2013-04-04 22:36:10 +00:00
Jesse Hall
2ba647e9f5 Actually set the virtual display output buffer.
Bug: 8316155
Change-Id: Ida1ac47e5a932fdaad3ec862e121cfe55d255699
2013-04-04 12:59:37 -07:00
Jeff Tinker
7eafcae5ff Implement async event callout from drm plugin to Java app
Change-Id: I83a7757a7b83676ce1a9ffa6ff0a8e495e31b859
2013-04-03 12:02:59 -07:00
Mathias Agopian
2ca79399b9 latch transparent region hint only when we get a new frame
since the transparent region hint really depends on the
content of the window containing the SurfaceView
(it's calculated by the view hierarchy based on
overlapping views), it makes sense to latch it only when
the content of the window (the app) changes.

This should help fixing drawing artifacts when changing the
layout of a window containing a SurfaceView.

Bug: 8511430
Change-Id: Ic3aa668495293cb4d82a2cd7dcf3b6a337287678
2013-04-02 18:30:32 -07:00
Mathias Agopian
128fcea1c6 Merge "Fix include paths" into jb-mr2-dev 2013-04-02 23:20:15 +00:00
Jeff Tinker
263e8cb29c Merge "MediaDrm API update" into jb-mr2-dev 2013-04-02 22:49:23 +00:00
Jeff Tinker
bcbd78bd24 MediaDrm API update
Clarify offline usage of sessions and keys and implement
implement CryptoSession to support additional crypto use
cases.

Change-Id: I418ffbb37e3036a2b5eea5a86ac88a5af1a9da07
2013-04-01 22:01:10 -07:00
Mathias Agopian
33ceeb3258 Fix include paths
Change-Id: If5350a3de995cc0cb1afea067e7ce168bc00d3f5
2013-04-01 16:54:58 -07:00
Jamie Gennis
83a3ad4d57 Merge "EGL_ANDROID_presentation_time: initial spec draft" into jb-mr2-dev 2013-04-01 23:27:38 +00:00
Jamie Gennis
6730acb681 EGL_ANDROID_presentation_time: initial spec draft
Change-Id: I1cd174a08c499e5bde19e7ecd449da8266e7e66e
2013-04-01 15:29:06 -07:00
Jesse Hall
441f69463e Fix MIPS assembly variable names to not conflict with GL API parameter names
Change-Id: I8e93fb55018de53a596cb176d48dbfdf1fd396e4
2013-03-30 23:22:19 -07:00
Mathias Agopian
86e392e9b3 Merge "don't use compile-time configuration of libgui as much as possible" into jb-mr2-dev 2013-03-29 23:31:23 +00:00
Mathias Agopian
ca08833d5e don't use compile-time configuration of libgui as much as possible
We now detect at runtime which sync features to use, which
allows us to remove a lot of the compile-time configuration
options. There  is still one option though, to disable
KHR_fence_sync on some devices (which are more efficient
without it).

- added a backdoor to get the vendor's EGL strings

the new logic is:
- use always ANDROID_native_fence_sync if available
- fallback to KHR_fence_sync if available and not disabled
  by the compile-time option
- use KHR_wait_sync if available and either of the above is
  enabled

Change-Id: I9c4b49d9ff1151faf902cc93bd53ea5f205aaabf
2013-03-29 15:33:47 -07:00
Keun-young Park
7fd5ef3eca am e3a396b2: am 906bd042: Merge "[MIPS] Add MIPS architecture support to libagl"
* commit 'e3a396b25d53cc9ae61e3a2f0daeaa68ac1ba5a1':
  [MIPS] Add MIPS architecture support to libagl
2013-03-29 00:14:16 -07:00
Keun-young Park
e3a396b25d am 906bd042: Merge "[MIPS] Add MIPS architecture support to libagl"
* commit '906bd0422a99b37663a1cb130bf061fdbb3ea189':
  [MIPS] Add MIPS architecture support to libagl
2013-03-29 00:12:14 -07:00
Keun-young Park
906bd0422a Merge "[MIPS] Add MIPS architecture support to libagl" 2013-03-29 06:15:58 +00:00
Keun-young Park
ea116f1acb am 111d920b: am d3b2c029: Merge "[MIPS] Add MIPS architecture support to opengl framework"
* commit '111d920bb588669006bdd8699e786d6305f14c36':
  [MIPS] Add MIPS architecture support to opengl framework
2013-03-28 23:09:44 -07:00
Keun-young Park
111d920bb5 am d3b2c029: Merge "[MIPS] Add MIPS architecture support to opengl framework"
* commit 'd3b2c029eba356e7bed3754d60ade556c216348e':
  [MIPS] Add MIPS architecture support to opengl framework
2013-03-28 23:08:17 -07:00
Keun-young Park
d3b2c029eb Merge "[MIPS] Add MIPS architecture support to opengl framework" 2013-03-29 05:26:28 +00:00
Mathias Agopian
8171aece3d fix uninitialized attribute in SurfaceFlinger
Change-Id: I8277f67e297a8b6a99195387060d03154a2cd929
2013-03-28 17:52:36 -07:00
Mathias Agopian
bf667e3155 Merge changes I22f1b358,I5496d0de,Ifd98966b into jb-mr2-dev
* changes:
  replace eglWaitSyncANDROID by eglWaitSyncKHR
  update EGL headers to most recent
  cleanup EGL extensions strings and entry-points
2013-03-28 22:51:06 +00:00
Jesse Hall
94ebadf433 Merge "Remove unused clz.cpp" into jb-mr2-dev 2013-03-28 22:16:50 +00:00
Mathias Agopian
2bb716871c replace eglWaitSyncANDROID by eglWaitSyncKHR
Change-Id: I22f1b3588011c88389e249f738f1e6915cc97e72
2013-03-28 14:31:09 -07:00
Mathias Agopian
12af3f6665 update EGL headers to most recent
- add ANDROID extensions missing from official headers:
    EGL_ANDROID_wait_sync
    EGL_ANDROID_presentation_time

Change-Id: I5496d0de123a6279234098c19f9a12220adec876
2013-03-28 14:17:54 -07:00