Commit Graph

730 Commits

Author SHA1 Message Date
Mathias Agopian
2788a3526d am 731e0331: am e70fbe8b: am 02b95105: fix transitions from hwc to GLES composition
* commit '731e0331eb402ec4564b69eaeb8b605a8b800b1b':
  fix transitions from hwc to GLES composition
2012-11-05 18:19:53 -08:00
Mathias Agopian
02b9510575 fix transitions from hwc to GLES composition
If we switched from HWC to GLES but the dirty region was empty
(could happen if the dirty region is outside of the screen for instance), we
need to force a full screen composition.

In this change we ignore the dirty region for the purpose of
rejecting the whole update and we rely on the fact that it will later
be expanded to the whole screen. This was the least risky fix.

Bug: 7467760, 7452931
Change-Id: I2132f2f963b00a3ce7150adadb107b0367b3862e
2012-11-05 17:50:57 -08:00
Igor Murashkin
74284b9467 Merge "Change ConsumerBase's FrameAvailableListener to be a weak pointer" 2012-11-05 13:47:37 -08:00
Igor Murashkin
a4a3149a36 Change ConsumerBase's FrameAvailableListener to be a weak pointer
This prevents strong reference cycles when the listener implementation also
holds a strong pointer to the ConsumerBase

Bug: 7425644
Change-Id: I1514b13a32b18d421c902dddebec0765a989c55c
2012-11-05 13:39:02 -08:00
Mathias Agopian
766dc49c17 rework a bit how we scissor the display
the scissor rect is now computed once by DisplayDevice
and is combined with the "undefined" region so that
the letter-boxed area of the screen get cleared in
drawWormhole.

Bug: 7149437
Change-Id: Id2f30516a5786f32eace7f876ff32028f954f357
2012-10-31 14:22:51 -07:00
Mathias Agopian
e8966b349f am c0384266: am f45c5100: partially implement external display clipping
* commit 'c0384266699aadd23a11bcdfd8a92f6dae8bf36c':
  partially implement external display clipping
2012-10-25 17:32:17 -07:00
Mathias Agopian
f45c510009 partially implement external display clipping
we perform external display clipping only on the GL
side (ie: not done on the h/w composer side, which is
harder and would be too risky). in practice this means
that WFD will be clipped properly, while HDMI *may* or
may not depending on how hwc is used.

Bug: 7149437
Change-Id: I92d4d04220db72b6ffb134c7fa7a93af569723a5
2012-10-25 12:42:42 -07:00
Mathias Agopian
ba0b9cca69 am ef36f2a8: am d17e3b5f: prevent a client from crashing surfaceflinger
* commit 'ef36f2a84cb8478b0baa299d980922ce7824c0b3':
  prevent a client from crashing surfaceflinger
2012-10-22 15:38:00 -07:00
Mathias Agopian
d17e3b5f6c prevent a client from crashing surfaceflinger
a misbehaving or malicious client could cause SF to crash
by providing a "fake" IInterface. we now check the
IInterface we get is our own and local.

Bug: 7278879
Change-Id: Ia19d05902d4b2385c5a16416148378d4998833fd
2012-10-22 14:54:23 -07:00
Jamie Gennis
7ee4aba226 am 3b6055a7: am ba7dc2db: Merge "SurfaceFlinger: add support for secure displays" into jb-mr1-dev
* commit '3b6055a7184a2da7bbdd94118a8c6af875bb28b1':
  SurfaceFlinger: add support for secure displays
2012-10-22 13:57:51 -07:00
Jamie Gennis
ba7dc2db6e Merge "SurfaceFlinger: add support for secure displays" into jb-mr1-dev 2012-10-22 13:50:19 -07:00
Jamie Gennis
dd3cb84cfb SurfaceFlinger: add support for secure displays
This change adds support for displays that are not allowed to display surfaces
with the eSecure flag set.  All non-virtual displays are considered secure,
while virtual displays have their secure-ness specified at creation time.

Bug: 7368436
Change-Id: I81ad535d2d1e5a7ff78269017e85b111f0098500
2012-10-22 13:41:21 -07:00
Andy McFadden
42371e5e63 am 44c985ef: am 620685c2: Fix emulator vsync
* commit '44c985ef7d0b6d94fa9df3fd5ea718eca0ecdbd1':
  Fix emulator vsync
2012-10-19 16:17:41 -07:00
Andy McFadden
620685c2e6 Fix emulator vsync
The code that reserves display IDs was only run when a hardware
composer was present.  The eventControl() function, which handles
enabling of vsync, was ignoring the request because the primary
display didn't appear in its set of allocated IDs.  This moves
reservation of IDs for built-in displays outside the HWC-only block.

Also, added a couple of warnings in eventControl().

Bug 7376568

Change-Id: I185ccdf817a25499b5c2668f8f6d594afb8c1568
2012-10-19 12:53:46 -07:00
Jamie Gennis
5937c9d581 am caadbc53: am 7c41bf70: SurfaceFlinger: change the animation timeout
* commit 'caadbc5324cd4503450ac6bd9bb09c3c5fcb7430':
  SurfaceFlinger: change the animation timeout
2012-10-17 16:58:54 -07:00
Jamie Gennis
7c41bf7092 SurfaceFlinger: change the animation timeout
This change changes the animation transaction timeout from 500us to 5s.

Bug: 7362633
Change-Id: I9bed8e74f726dae2daa398afc29babcea00d5b04
2012-10-17 09:40:07 -07:00
Mathias Agopian
e7f167bffa am 179c4db2: am db9b41fd: fix a corruption in blank/unblank
* commit '179c4db2c3f26e6586b0b0fe2c576fc9ae349580':
  fix a corruption in blank/unblank
2012-10-15 20:39:30 -07:00
Mathias Agopian
db9b41fd15 fix a corruption in blank/unblank
we were holding a reference (ie: pointer) to a sp<DisplayDevice>
while processing the message. Meanwhile the object itself could
go away and we would end up accessing a dead object.

the root cause of the problem is that we are accessing mDisplays[]
in a few places outside of the main thread.

Bug: 7352770
Change-Id: I89e35dd85fb30e9a6383eca9a0bbc7028363876c
2012-10-15 20:31:12 -07:00
Jamie Gennis
5bc5f22d37 am 5c51f0fb: am 3365c567: Merge "SurfaceFlinger: add animation transactions" into jb-mr1-dev
* commit '5c51f0fb38bd0cd80031da3eee6f335d5d28c3fc':
  SurfaceFlinger: add animation transactions
2012-10-15 20:26:15 -07:00
Jamie Gennis
3365c56716 Merge "SurfaceFlinger: add animation transactions" into jb-mr1-dev 2012-10-15 19:36:12 -07:00
Jamie Gennis
2d5e230292 SurfaceFlinger: add animation transactions
This change adds a transaction flag for WindowManager to indicate that a
transaction is being used to animate windows around the screen.  SurfaceFlinger
will not allow more than one of these transactions to be outstanding at a time
to prevent the animation "frames" from being dropped.

Bug: 7353840
Change-Id: I6488a6e0e1ed13d27356d2203c9dc766dc6b1759
2012-10-15 19:09:04 -07:00
Jesse Hall
ce27f53de7 am c558269b: am 837d2f9e: Always set vertex alpha when drawing screenshot layers
* commit 'c558269b1ab8c4985b86a0f39338d42f162693f2':
  Always set vertex alpha when drawing screenshot layers
2012-10-15 15:01:47 -07:00
Jesse Hall
837d2f9e83 Always set vertex alpha when drawing screenshot layers
The screenshot is a GL_RGB texture, and the GL_REPLACE texture env
mode uses vertex alpha for GL_RGB textures instead of alpha=1.0.

Bug: 7340077
Change-Id: I6fbb907023e48f9c422b15a33da79757d6726840
2012-10-15 12:38:33 -07:00
Jamie Gennis
ea5ef70398 am ec93e762: am dd57d551: Merge "SurfaceFlinger: make the num FBs a board config" into jb-mr1-dev
* commit 'ec93e762afc46534aadb3f583dbf87e38e85bfe9':
  SurfaceFlinger: make the num FBs a board config
2012-10-12 14:39:54 -07:00
Jamie Gennis
dd57d55194 Merge "SurfaceFlinger: make the num FBs a board config" into jb-mr1-dev 2012-10-12 14:33:52 -07:00
Jamie Gennis
cdbaecb541 SurfaceFlinger: make the num FBs a board config
Bug: 7283132
Change-Id: I38116f39fc18212f2daab94bbfc3daaf89439fc4
2012-10-12 14:29:12 -07:00
Jesse Hall
570967f6a8 am f5b27f71: am b763d5ff: Assume LayerScreenshot has pre-multiplied alpha
* commit 'f5b27f714063361d07a7ca6f107bba3e13b75d38':
  Assume LayerScreenshot has pre-multiplied alpha
2012-10-11 17:54:35 -07:00
Jesse Hall
b763d5fffa Assume LayerScreenshot has pre-multiplied alpha
Bug: 7300129
Change-Id: Ie9114adc4b5c9a8cc3c65bfe6d9478b2cba4e0d8
2012-10-10 21:40:26 -07:00
Andy McFadden
9f997217cf am 9349b510: am f0c89b28: Merge "Fix HDMI unblank behavior" into jb-mr1-dev
* commit '9349b5108c3763337868ffc5de51330c00d6db04':
  Fix HDMI unblank behavior
2012-10-10 19:39:21 -07:00
Andy McFadden
9e9689c111 Fix HDMI unblank behavior
Two issues:

(1) We were announcing the hotplug event before we were ready to
handle blank/unblank events, so we were losing the initial unblank
that power manager sends us when HDMI is first plugged in.  This
left the display blank until you toggled the device power off/on.

(2) We were retaining fbTargetHandle for HDMI after the display was
disconnected.  The value didn't get updated when HDMI was reconnected
because the display was blank, so we didn't go through that code
path.  So, when HDMI was re-connected, we passed stale data into
the HWC.

Bug 7323938

Change-Id: I2335d24fd7b0f00bb23fc63aa7bcf44cb8857c73
2012-10-10 18:17:51 -07:00
Mathias Agopian
58deaa8b29 am 43bd832d: am 0acb00c2: Merge "fix typo that prevented proper loging of EGL error code" into jb-mr1-dev
* commit '43bd832d128726334de622d67aaac09051c07941':
  fix typo that prevented proper loging of EGL error code
2012-10-09 16:59:54 -07:00
Jeff Brown
e8fae277fa am 70f07572: am c5b58166: Merge "don\'t automatically unblank external displays" into jb-mr1-dev
* commit '70f07572f8ce6b83b167170eea9d500e51549395':
  don't automatically unblank external displays
2012-10-09 16:58:27 -07:00
Mathias Agopian
0acb00c2d7 Merge "fix typo that prevented proper loging of EGL error code" into jb-mr1-dev 2012-10-09 16:52:37 -07:00
Mathias Agopian
b8fc00bfb4 fix typo that prevented proper loging of EGL error code
needed for investigating 7309949

Bug: 7309949
Change-Id: If29a5c08d0e87f46b44ba2e1030be61cb4d1403b
2012-10-09 16:44:48 -07:00
Mathias Agopian
3292cae8c3 don't automatically unblank external displays
this should be handled by the display-manager. we were doing
that in SF because until recently we didn't have enough support
in the HAL. however, this is now causing other problems when
plugging hdmi while the screen is off for instance.

Bug: 7150885
Change-Id: I739b209056a765d38d05295cf202f67ee0f506ae
2012-10-09 14:49:01 -07:00
Mathias Agopian
8a34643a33 am 1a003e4a: am cb55857b: fix dumpsys Layer name when using multiple displays
* commit '1a003e4aec1c4ffc2b11c8b9f05f69db6280987c':
  fix dumpsys Layer name when using multiple displays
2012-10-08 16:23:08 -07:00
Mathias Agopian
cb55857bbd fix dumpsys Layer name when using multiple displays
Bug: 7288401
Change-Id: I14beeef58fac5270cef3b611e18c163060efe6c3
2012-10-08 15:57:17 -07:00
Mathias Agopian
4dae9ebd80 am eb38d852: am 1b3aeb48: fix SurfaceFlinger DDMS debugging
* commit 'eb38d85260073470e5a27af820fe6cd9f2bc35ae':
  fix SurfaceFlinger DDMS debugging
2012-10-07 23:41:57 -07:00
Mathias Agopian
1b3aeb4844 fix SurfaceFlinger DDMS debugging
DdmHandleAppName.setAppName() signature changed which broke
this debugging feature.

Needed for debugging b\7267680

Change-Id: I4482bf5a441e91bef89d1ddea9a4152333be7f88
2012-10-07 16:41:12 -07:00
Mathias Agopian
8b2a88bad1 am 95b9a0b6: am e835976d: Merge "Tone down a fatal assert" into jb-mr1-dev
* commit '95b9a0b688eab5a3c0c1fadb71e258e93e4c344c':
  Tone down a fatal assert
2012-10-04 20:34:46 -07:00
Andy McFadden
5a8f9012ee Tone down a fatal assert
The new disconnectDisplay function doesn't handle virtual displays,
but it may be called for them.  Return without doing anything.

Bug 7281786

Change-Id: I62607f2ae6073fa66b393f55932604aeb8e03566
2012-10-04 19:09:45 -07:00
Jesse Hall
178652a5d7 am 3b4e55c0: am 9a143922: Ignore display state changes for disconnected displays
* commit '3b4e55c0442322823898dd838cb50fe589e1e9d7':
  Ignore display state changes for disconnected displays
2012-10-04 18:01:50 -07:00
Jesse Hall
9a14392256 Ignore display state changes for disconnected displays
When a display is disconnected, removing it from SurfaceFlinger's
display list is non-atomic with removing it from the Display Manager
and any in-flight transactions. So SurfaceFlinger might get a display
state change transaction for a display it has already forgotten about.
Just ignore these.

Bug: 7288082
Change-Id: Ic27e55377f3db40fb34e3b1cd67e43297df117a2
2012-10-04 16:40:35 -07:00
Mathias Agopian
1c19de6c28 am 64a22423: am 81cd5d3b: make sure we don\'t call into the HWC HAL when not needed
* commit '64a224236d930921581de52eb87ef1ab7fab3780':
  make sure we don't call into the HWC HAL when not needed
2012-10-04 15:31:51 -07:00
Mathias Agopian
81cd5d3b94 make sure we don't call into the HWC HAL when not needed
when enabling/disabling vsync we now make sure to
not call into the HAL if the state wouldn't change.

Bug: 7274951

Change-Id: Ie24a6d68888a51b577acf9c2a973d85437cbacaf
2012-10-04 15:25:32 -07:00
Andy McFadden
42d7dfccee am 61f142a2: am 27ec5739: Fix crashes after HDMI disconnect
* commit '61f142a25c14c8e24f8040098b4c223f0d725cb2':
  Fix crashes after HDMI disconnect
2012-10-04 12:29:00 -07:00
Andy McFadden
27ec5739bc Fix crashes after HDMI disconnect
The display was being removed from SurfaceFlinger's list before we
had a chance to reset HWComposer's layer list, so we were passing
stale data into the hardware composer (which has its own per-display
data).  This resulted in "invalid gralloc handle" complaints.
We now clear the layer list immediately after removing the display.

The display was being removed while its EGLSurface was still
"current", resulting in "cancelBuffer: BufferQueue has been
abandoned" complaints.  We now call makeCurrent on the primary
display before removing the external display.

Bug 7274254

Change-Id: Ia59e3a61d7ec46488b96bf93ec5e4ed3488b70e4
2012-10-04 02:02:23 -07:00
Jesse Hall
c2e3e07549 am ee5fb929: am ba607d53: Add Fence::waitForever which logs a warning timeout, and use it
* commit 'ee5fb9299b6a7d81af6c2c1e598c4e9fd71a8ba9':
  Add Fence::waitForever which logs a warning timeout, and use it
2012-10-02 16:36:16 -07:00
Jesse Hall
ba607d53c6 Add Fence::waitForever which logs a warning timeout, and use it
Bug: 7217641
Change-Id: If0c1a613ead307c4045a47824174bf40c72bc7d7
2012-10-02 16:29:46 -07:00
Mathias Agopian
2ae7bec770 Revert "improve sensor fusion" -- DO NOT MERGE
This reverts commit bdf277355d.
This reverts commit dc5b63e40e.

it might be responsible for a regression that makes the
rotation vector spin.

Bug: 7267330
Change-Id: Ifb10e933537e70c1d85a7ba73a7e3ae59002fe62
2012-10-01 20:31:05 -07:00