Commit Graph

17516 Commits

Author SHA1 Message Date
Mathias Agopian
d1a99ec6b2 fix [3361121] hang in glClear() - device unresponsive, OTA fails (DO NOT MERGE)
Generally we never want to lock a buffer for write access if it is at
the "head" on the surfaceflinger side. The only exception (1) is when
the buffer is not currently in use AND there is at least one queued
buffer -- in which case, SurfaceFlinger will never use said buffer
anymore, because on the next composition around, it will be able to
retire the first queued buffer.

The logic above relies on SurfaceFlinger always retiring
and locking a buffer before composition -- unfortunately this
didn't happen during a screenshot.

This could leave us in a situation where a buffer is locked by the
application for write, and used by SurfaceFlinger for texturing,
causing a hang.

Here, we fix this issue by never assuming the exception (1), it was
intended as an optimization allowing ANativeWindow::lockBuffer() to
return sooner and was justified when most of SF composition was
done in software. The actual buffer locking is now ensured by
gralloc. We could have handled screenshots in a similar way to
a regular composition, but it could have caused glitches on screen,
essentially, taking a screenshot could cause to skip a frame.

now that we removed the notion of a "inUse" buffer in surfaceflinger
a lot of code can be simplified / removed.

noteworthy, the whole concept of "unlockClient" wrt. "compositionComplete"
is also gone.
2011-01-25 14:19:13 -08:00
Mathias Agopian
53a67e1663 partially fix [3306150] HTML5 video with H/W acceleration blackout (DO NOT MERGE)
We used to guarantee that a layer in SurfaceFlinger would never be
destroyed before all references (to its ISurface) on the client
side would be released. At some point, this guarantee got
relaxed to allow to free gralloc resources sooner. This last
change was incorrect, because:
- in implementations with reference-counting the gralloc resources
wouldn't be released anyways, until all the mapping were gone
- in implementations without ref counting, the client side
would most likely crash or do something bad
- it also caused the SharedBufferStack slot to be reallocated
to another surface, which could be problematic if the client
continued to use the surface after the window manager destroyed it.

So, we essentially reinstate the guarantee that layers won't be
destroyed until after all references to their ISurface are
released.

NOTE: This doesn't entirely fix 3306150 because there is another
problem there where the Browser continues to use a surface after it
has been destroyed.

also improve SurfaceFlinger 'dumpsys' log

list the purgatory, which shows windows that have been closed,
but for which the client still has references.
2011-01-25 14:19:13 -08:00
Mathias Agopian
cfb676f1ae fix a small bug that caused screenshot to show garbage in some cases (DO NOT MERGE)
we were not clearing the screen entirely, which caused garbage when
the screen wasn't entirely covered by windows.

Change-Id: Ia7aa13c36a8a314e0e8427d419b16b9aa2165ddf
2011-01-25 14:18:58 -08:00
Mathias Agopian
5dc7e7da92 workaround [3201922] display not on: log full of gralloc errors (DO NOT MERGE)
we make sure to call compositionComplete after everytime we do
composition with the GPU (even for the screenshot case), which is
where the buffer locks are released.

Change-Id: I450430d1e4d1ee9ce1023970642378c42cdcfa4c
2011-01-25 14:18:29 -08:00
Mathias Agopian
a0c6b76173 minor clean-up. SurfaceFlinger doesn't need libpixelflinger.so. (DO NOT MERGE)
Change-Id: I1ddbbbec4fa5b2521ef3787bc28efe1bc90d0060
2011-01-25 14:18:15 -08:00
Marco Nelissen
802c092a8a Merge "Increase the number of useful bits in the spectrum." into gingerbread 2011-01-25 10:06:16 -08:00
Hung-ying Tyan
ec889c108b Merge "Get mute state from active call." into gingerbread 2011-01-24 21:13:08 -08:00
Hung-ying Tyan
c9af508cb2 Merge changes Ib70e0cf2,I0691cd70 into gingerbread
* changes:
  SipService: registers broadcast receivers on demand.
  SipService: release wake lock for cancelled tasks.
2011-01-24 19:41:42 -08:00
John Wang
c5da08b788 Merge "Enable recovery in RIL wakelock release check." into gingerbread 2011-01-24 09:14:14 -08:00
Nick Pelly
c6547f4f92 Merge "Add operands to mifare classic increment, decrement." into gingerbread 2011-01-23 22:12:25 -08:00
Nick Pelly
5bb6faa957 Merge "Make MifareClassic methods more consistent." into gingerbread 2011-01-23 21:36:14 -08:00
Jeff Hamilton
bbb02bc7e4 Merge "Allow null filters for foreground dispatch to act as catch all." into gingerbread 2011-01-23 19:17:22 -08:00
Jaikumar Ganesh
a43fd13a6e Merge "Do Not Merge Connect other profiles when priority is auto connect." into gingerbread 2011-01-21 21:25:01 -08:00
John Reck
59141d09f5 Merge "DO NOT MERGE - Create db path if it doesn't exit" into gingerbread 2011-01-21 14:03:30 -08:00
Jeff Hamilton
86d7998cf7 Merge "API changes for NFC." into gingerbread 2011-01-21 11:34:20 -08:00
Jean-Michel Trivi
26fb206ba5 Merge "Bug 3365937 notify TTS initialization listener of binding errors" into gingerbread 2011-01-21 09:09:30 -08:00
Eric Laurent
58efaf2be8 Merge "do not merge - Fix issue 3371096." into gingerbread 2011-01-20 17:43:04 -08:00
Dave Sparks
4cec2c81f4 Merge "DO NOT MERGE: Prefill the cache before trying to instantiate the media extractor." into gingerbread 2011-01-19 19:23:32 -08:00
Mathias Agopian
3357c05996 Merge "fix [3369027] Sensor.TYPE_ROTATION_VECTOR is unstable and returns NaNs when running slowly" into gingerbread 2011-01-19 17:32:21 -08:00
Jeff Brown
e9089f6994 Merge "Never drag scroll views with no children. (DO NOT MERGE)" into gingerbread 2011-01-19 17:03:03 -08:00
Mathias Agopian
af6bba52c9 Merge "Use EGL_NATIVE_VISUAL_ID to select EGLConfig" into gingerbread 2011-01-19 11:31:07 -08:00
Andreas Huber
017917fe58 Merge "DO NOT MERGE: Apparently our native TCP sockets do not return an error from blocking "connect"" into gingerbread 2011-01-19 08:11:39 -08:00
Nick Pelly
b81e631c22 Merge "Change signature of MifareClassic.authenticate*() to throw IOException." into gingerbread 2011-01-18 18:53:42 -08:00
Nick Pelly
851b96a671 Merge "Support for TagLostException (API)." into gingerbread 2011-01-18 18:53:40 -08:00
Brad Fitzpatrick
3b8bbe967a Merge "Watchdog can get deadlocked on activity manager" into gingerbread 2011-01-18 18:52:04 -08:00
Nick Pelly
073065cc72 Merge "Fix javadoc which broke build." into gingerbread 2011-01-18 17:07:56 -08:00
Eric Laurent
ffcdad0b67 Merge "Fix omission in NOTICE file." into gingerbread 2011-01-18 16:42:20 -08:00
Nick Pelly
17ba3de089 Merge "hange the default IsoDep timeout to 300ms (docs update)." into gingerbread 2011-01-18 16:11:14 -08:00
Mathias Agopian
03961aca7c Merge "fix [3355413] Gyro calls onAccuracyChanged and reports accuracy as UNRELIABLE" into gingerbread 2011-01-18 16:10:08 -08:00
Amith Yamasani
0d7c11e143 Merge "Set the default state of NOTIFICATIONS_USE_RING_VOLUME to true." into gingerbread 2011-01-18 15:41:26 -08:00
Eric Laurent
2dc65c24ae Fix omission in NOTICE file.
Added copyright notice for audio effects source files under
media/libeffects/lvm.

Change-Id: I8e142bacb7e4b1faaeafe88e907b73f21fced1c3
2011-01-18 15:25:32 -08:00
Irfan Sheriff
ee780450dc Merge "Do not add unsolicited events to queue" into gingerbread 2011-01-18 14:40:18 -08:00
Jeff Brown
8fb7545953 Merge "Filter virtual keys after touches. (DO NOT MERGE)" into gingerbread 2011-01-18 14:31:31 -08:00
Mathias Agopian
ad2b78fa12 Merge "Fix the ISurfaceComposer onTransact switch." into gingerbread 2011-01-18 11:20:04 -08:00
Jeff Hamilton
c52ca2f61e Merge "Javadoc updates for NFC." into gingerbread 2011-01-18 11:01:55 -08:00
Jeff Hamilton
7b6ecc4edd Merge "New APIs for NDEF Push Protocol." into gingerbread 2011-01-18 11:01:05 -08:00
Mathias Agopian
788ce5d908 Use EGL_NATIVE_VISUAL_ID to select EGLConfig
EGLUtils::selectConfigForPixelFormat() now uses EGL_NATIVE_VISUAL_ID
to select a config with the proper format. this is more robust and
future proof.

Change-Id: Ib85e0974160945d838956b50a3cac4de78618957
2011-01-16 17:57:20 -08:00
Jamie Gennis
238bec1ceb Fix the ISurfaceComposer onTransact switch.
Two of the cases in the ISurfaceComposer onTransact switch statement
were missing 'break' statements at the end, and would fall through to
the next case block. This change adds those break statements.

Change-Id: I6dcc84263d3ea03d94612c667103283846b3dee1
2011-01-16 17:34:07 -08:00
Jeff Brown
4cc6fe1eea Merge "Flush Binder commands in ndk looper." into gingerbread 2011-01-16 16:15:32 -08:00
Jim Miller
3d317da2ab Merge "Fix 3106227: use WeakReferences for receivers in DigitalClock class" into gingerbread 2011-01-16 16:14:52 -08:00
Nick Pelly
d41381d8c5 Merge "Make sure service handles are live before passing to other objects." into gingerbread 2011-01-14 18:18:25 -08:00
James Dong
b1f1d0ede6 Merge "Squash commits of the following patches, cherry-picked from other branch - do not merge." into gingerbread 2011-01-14 16:27:48 -08:00
Jaikumar Ganesh
824bb889ff Merge "Do Not Merge: Expose insecure rfcomm Bluetooth API." into gingerbread 2011-01-14 16:11:41 -08:00
Dianne Hackborn
6d3c5ae222 Merge "Added check to make orientation calculations more robust" into gingerbread 2011-01-14 15:36:26 -08:00
Dianne Hackborn
12edc159a3 Merge "Make the Phone options dialog use current language" into gingerbread 2011-01-14 15:33:44 -08:00
Eric Fischer
e6ec66185c Merge "Add date format and map center resources for new locales." into gingerbread 2011-01-13 13:08:18 -08:00
Wei-Ta Chen
4877837c2d Merge "Do not merge." into gingerbread 2011-01-13 12:02:32 -08:00
Dan Morrill
960f8a68a7 Adding ASL2 attribution for VisualOn.
Change-Id: I870133fc366507d95741f8aa234776de58ba60a9
2011-01-13 09:24:30 -08:00
Nick Pelly
2ee9a92f6a Merge "New Intent defined for RF ON/OFF events" into gingerbread 2011-01-12 16:28:59 -08:00
Kenny Root
9c9f15acb5 Merge "Add the {get,set}PackageObbPaths calls to API" into gingerbread 2011-01-12 15:03:43 -08:00