Commit Graph

47229 Commits

Author SHA1 Message Date
The Android Automerger
d76dba486a merge in jb-mr1-release history after reset to jb-mr1-dev 2012-09-14 07:11:52 -07:00
Jeff Brown
6e220a6ce6 Fix display projections when translated.
There are two different translations to apply in the logical
orientation, one before scaling and one after.
So translate, scale, translate then rotate.

Bug: 7139798
Change-Id: I0726991cadb62988390e77503dbbaed54f07bfe3
2012-09-13 19:24:43 -07:00
Andy McFadden
ae2cfb5746 Minor tweaks
A couple of minor cleanups I stumbled over while looking at other
things.

Change-Id: I385ecfe1afefd577afbc59d7ef1d98d868073651
2012-09-13 11:21:40 -07:00
The Android Automerger
5eb434e4fe merge in jb-mr1-release history after reset to jb-mr1-dev 2012-09-13 06:59:52 -07:00
Jesse Hall
a4383fd9de Merge "Initialize new HWC 1.2 fields" into jb-mr1-dev 2012-09-12 20:18:53 -07:00
Jesse Hall
fa32888f58 Merge "Fix display projection transforms" into jb-mr1-dev 2012-09-12 20:16:28 -07:00
Mathias Agopian
a5be0cd4f3 Merge "don't call hwc with non-empty layer lists for blanked displays" into jb-mr1-dev 2012-09-12 19:10:03 -07:00
Mathias Agopian
9ca6491bb7 Region::validate() cannot be called from addRectUnchecked()
addRectUnchecked() is allowed to be in an invalid state
temporarily.

Change-Id: I6f5162b5c49f378978c070a77abba35023fe918c
2012-09-12 17:56:29 -07:00
Mathias Agopian
8df840aa76 Merge "strengthen region validation" into jb-mr1-dev 2012-09-12 17:49:29 -07:00
Mathias Agopian
ce3a0a541c don't call hwc with non-empty layer lists for blanked displays
we now make sure to take the blanked state of a display into
account when we build its list of visible layers, this ensures
that we won't call prepare/set with a non-empty list when the
display is blanked.

Possibly fixes 7075380, 7103553, 7130187, 7016215

Bug: 7075380
Change-Id: I9fdd2e73d1b7621eaeca3d4ac2ae60d9fb1b3631
2012-09-12 17:42:06 -07:00
Mathias Agopian
068d47f29d strengthen region validation
Change-Id: I75ee7bc4dd7a2f5357ac8994a23bc8b8bfb6eb44
2012-09-12 17:30:47 -07:00
Jamie Gennis
e45b01f575 Merge "EGL: make max cache key size BoardConfig-able" into jb-mr1-dev 2012-09-12 15:54:39 -07:00
Jesse Hall
db27621e22 Initialize new HWC 1.2 fields
Also rename resolution* to width/height.

Change-Id: Ia5f0c50d3f0a349160f314a3257c3b985e13ef1d
2012-09-12 15:35:44 -07:00
Jesse Hall
6360ec42d4 Fix display projection transforms
Bug: 7139798
Change-Id: I61aafe99180d85563c6880d16bc367fce80e6022
2012-09-12 13:49:10 -07:00
Andy McFadden
2c7c8ba56a Merge "Fix emulator" into jb-mr1-dev 2012-09-12 13:27:01 -07:00
Andy McFadden
c272430960 Merge "Watch for SurfaceFlinger death" into jb-mr1-dev 2012-09-12 13:22:35 -07:00
Andy McFadden
babba18687 Fix emulator
Emulator has no HWC.

Change-Id: I7810b27034f6772823142e5bf877681db1c8ee49
2012-09-12 13:17:01 -07:00
Jamie Gennis
f478e6d18c EGL: make max cache key size BoardConfig-able
This change makes the maximum EGL blob cache key size configurable via a
BoardConfig.

Change-Id: Ic669cd25fc743662bd4f13aab62354fc3d54560c
2012-09-12 11:59:24 -07:00
Jamie Gennis
a0931d6575 Merge "SurfaceTexture: eglDestroySync after duping its fd" into jb-mr1-dev 2012-09-12 11:54:52 -07:00
The Android Automerger
a77f0fec92 merge in jb-mr1-release history after reset to jb-mr1-dev 2012-09-12 06:59:50 -07:00
Mathias Agopian
92def36f9f Merge "fix typo in LayerBase::dump()" into jb-mr1-dev 2012-09-11 20:53:21 -07:00
Mathias Agopian
791da60dd3 fix typo in LayerBase::dump()
Change-Id: Ie4861a58baed003b7ef643931d41f6be3fbfd00c
2012-09-11 20:52:46 -07:00
Andy McFadden
43601a2dc3 Reduce failure uncertainty
This adds a trivial workaround for a one-shot boot time crash, plus
an explicit check and abort for a failure condition that currently
presents as a less obvious failure.

Bug: 7145521, 7147557
Change-Id: I548f6a9caa9f0bd5710aaecea0e1c6c7c8f2f281
2012-09-11 15:15:13 -07:00
Andy McFadden
b0d1dd36f1 Reshuffle FramebufferSurface
FramebufferSurface no longer speaks directly to the FB HAL.  Now
everything goes through HWComposer (which may or may not be
connected to a hardware composer).

Added display index arg to some query methods.

Change-Id: Id3e157d2d4e3555d33afbb703e518b6e92e2d6d5
2012-09-11 09:31:34 -07:00
The Android Automerger
4a94ea7e65 merge in jb-mr1-release history after reset to jb-mr1-dev 2012-09-11 06:59:40 -07:00
James Dong
1fc4f80fc3 Add stack dump from drmserver process to bugreports
This would be helpful tracking down ANR issues in drmserver

o related-to-bug: 7132419

Change-Id: I7eceaa0c29af26bd0092110be6bddf8f4c063545
2012-09-10 16:10:29 -07:00
Jamie Gennis
98ff0597bd SurfaceTexture: eglDestroySync after duping its fd
This change adds a call to eglDestroySync after we've dup'd the fd for the
Android fence that the EGLSyncKHR object wraps.

Change-Id: I4fa6ece863260793630d70bb9a69d6284d05d99e
2012-09-10 14:49:42 -07:00
Jamie Gennis
61e04b92bd SurfaceTexture: use eglWaitSync
This change adds a compile-option to use eglWaitSyncANDROID to ensure that
texturing operations that access the current buffer of a SurfaceTexture do not
occur until the buffer is completely written.  It also moves this
synchronization into a new SurfaceTexture method called doGLFenceWait and
changes SurfaceFlinger's Layer class to use that method rather than performing
its own wait on the fence.

Change-Id: I70afa88086ca7ff49a80e3cd03d423767db7cb88
2012-09-10 13:27:23 -07:00
The Android Automerger
98625e6a3e merge in jb-mr1-release history after reset to jb-mr1-dev 2012-09-10 06:59:29 -07:00
Jamie Gennis
010dd4fb89 EGL: Add the EGL_ANDROID_wait_sync extension
Change-Id: Ie9a78e07fcaf27c5c13797141ad3c692217607fb
2012-09-09 17:52:18 -07:00
Jamie Gennis
605f90dc86 Merge "SurfaceTexture: use EGL-created native fences" into jb-mr1-dev 2012-09-09 13:00:16 -07:00
Jamie Gennis
01dbf5539b SurfaceTexture: use EGL-created native fences
This change adds support for using Android fences that come from EGLSyncKHR
objects as the release fence for a buffer.

Change-Id: Ice192ce2ec001020f909a2018afdf0f17b24dec9
2012-09-09 12:58:23 -07:00
The Android Automerger
ab75098eec merge in jb-mr1-release history after reset to jb-mr1-dev 2012-09-09 07:00:22 -07:00
Jeff Brown
4c05dd175e Ensure that viewport and frame are initialized.
onInitializeDisplays() was posting a transaction with changes
to the display projection.  Unfortunately, it only set the
display orientation field and left viewport and frame
uninitialized.

The uninitialized values flowed downstream and found themselves
baked into a bogus DisplayDevice mGlobalTransform.  That transform
was then applied to some Rects which were turned into Regions
that were them combined with other Regions.

Under certain situations, the uninitialized data might have
a largish value, resulting in the creation of Regions with
components in excess of the Region max-value limit of 0x7ffffff
(note that this is not INT_MAX).  Later when performing a
binary operation using the Region, the Spanner would loop
indefinitely trying to figure out how to stuff a humongous
region inside of a max-value region.  Not content to try
just once, the Spanner would continue trying again and
again, pegging the CPU and hanging surface flinger during boot.

Insanity soon followed.

Bug: 7130713
Change-Id: I0016f0c9662185be833474c212a1dd408096ae23
2012-09-09 00:07:17 -07:00
Jeff Brown
4fb3999cea Fix display projection.
Change-Id: I0f253dc3759b99e05ff8344b0f513d8c289702e7
2012-09-07 12:55:10 -07:00
Andy McFadden
6652b3edcb Watch for SurfaceFlinger death
The ComposerService object wasn't watching for SurfaceFlinger
restarts, which doesn't usually matter because the app framework
restarts when SurfaceFlinger dies.  However, mediaserver continues
to run, which means its ComposerService object was trying to use
a dead handle, and playback of DRM movies was failing.

This adds a DeathRecipient listener and some logic to re-establish
the SurfaceFlinger connection.

Bug 6645813

Change-Id: I07581b881d3835601aa57d5358c8259d93bc4515
2012-09-06 18:54:42 -07:00
Jamie Gennis
b272541546 libgui: move fence handling into ConsumerBase
This change moves some common fence handling code into the base class for
BufferQueue consumer classes.  It also makes the ConsumerBase class initialize
a buffer slot's fence with the acquire fence every time a buffer is acquired.

Change-Id: I0bd88bc269e919653b659bfb3ebfb04dd61692a0
2012-09-06 17:54:53 -07:00
Jamie Gennis
331841b96b EGL: add the native_fence_sync extension
This change adds support for the EGL_ANDROID_native_fence_sync extension to the
Android EGL layer.  It also fixes a couple minor issues with the extension spec.

Change-Id: Ic8829d21f37b701f33aa9c72c3d25e88e03fa3cd
2012-09-06 16:11:37 -07:00
The Android Automerger
911d485971 merge in jb-mr1-release history after reset to jb-mr1-dev 2012-09-06 06:34:08 -07:00
Jamie Gennis
8893d5bba1 EGL_ANDROID_native_fence_sync: fix the version
Change-Id: Ib43b8fec8f37bb847d7bcdbf7607fd56f19a0563
2012-09-05 19:46:34 -07:00
Jesse Hall
02de802182 Always reset layer acquireFenceFd after commit
If SurfaceFlinger needs to refresh the screen but the dirty region is
empty, it won't set the layer acquire fences, and stale file
descriptors will be passed to HWC commit(). Now we make sure to clear
the stale file descriptors for each layer right after commit().

Bug: 7078301
Change-Id: I6953ff91fc5488f105b30b07306f9c45a4c3f780
2012-09-05 16:52:13 -07:00
Mathias Agopian
2cf855fbef fix a problem where all hwc layers would have the SKIP flags set
the problem was that LayerBase::setPerFrameData() was always setting
this flag. in fact there was no reason to do this at that point since
the layer is initialized to a default state in setGeometry().

Bug: 7111259
Change-Id: Ib37b0dd7391a6163070e9aca025512159c1705f9
2012-09-05 16:52:03 -07:00
Mathias Agopian
55882dea1b fix a problem where all hwc layers would have the SKIP flags set
the problem was that LayerBase::setPerFrameData() was always setting
this flag. in fact there was no reason to do this at that point since
the layer is initialized to a default state in setGeometry().

Bug: 7111259
Change-Id: Ib37b0dd7391a6163070e9aca025512159c1705f9
2012-09-05 16:49:04 -07:00
Jesse Hall
fe4c745c6d Merge "Always reset layer acquireFenceFd after commit" into jb-mr1-dev 2012-09-05 13:54:53 -07:00
Jamie Gennis
f42449e125 Merge "EGL_ANDROID_fence_sync: make it more generic" into jb-mr1-dev 2012-09-05 13:48:51 -07:00
Jesse Hall
e25d005d91 Always reset layer acquireFenceFd after commit
If SurfaceFlinger needs to refresh the screen but the dirty region is
empty, it won't set the layer acquire fences, and stale file
descriptors will be passed to HWC commit(). Now we make sure to clear
the stale file descriptors for each layer right after commit().

Bug: 7078301
Change-Id: I6953ff91fc5488f105b30b07306f9c45a4c3f780
2012-09-05 13:03:10 -07:00
The Android Automerger
c3026f7ac9 merge in jb-mr1-release history after reset to jb-mr1-dev 2012-09-05 06:34:02 -07:00
Mathias Agopian
1501d54d63 minor cleanup
Change-Id: Ied80e14878e92a506930f7a5a55adde8f260ec70
2012-09-04 21:04:09 -07:00
Mathias Agopian
762d011475 Merge "display projection API now has a single function instead of 3" into jb-mr1-dev 2012-09-04 20:27:48 -07:00
Mathias Agopian
71e83e1202 the visibleRegion was never set in hwcomposer
Bug: 7089478
Change-Id: I13b031b23ce908d33f431a04e1cf87831b551260
2012-09-04 20:25:39 -07:00