summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger/SurfaceFlinger.h
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2011-01-14 17:37:42 -0800
committerMathias Agopian <mathias@google.com>2011-01-14 18:19:02 -0800
commitf4dfe1bee6223add052b6f0ebc4cdb1f46606acc (patch)
tree217a457de0e9f2df96b5c733b92c972d554552df /services/surfaceflinger/SurfaceFlinger.h
parent853548287ffe4eb85d1bd10669270292336d137a (diff)
downloadframeworks_base-f4dfe1bee6223add052b6f0ebc4cdb1f46606acc.zip
frameworks_base-f4dfe1bee6223add052b6f0ebc4cdb1f46606acc.tar.gz
frameworks_base-f4dfe1bee6223add052b6f0ebc4cdb1f46606acc.tar.bz2
partially fix [3306150] HTML5 video with H/W acceleration blackout
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. Change-Id: I305c830dd722b30a6d53cbf3a9c714fd3cf7eb06
Diffstat (limited to 'services/surfaceflinger/SurfaceFlinger.h')
-rw-r--r--services/surfaceflinger/SurfaceFlinger.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index 48642d4..549e282 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -359,6 +359,7 @@ private:
volatile int32_t mTransactionFlags;
volatile int32_t mTransactionCount;
Condition mTransactionCV;
+ SortedVector< sp<LayerBase> > mLayerPurgatory;
bool mResizeTransationPending;
// protected by mStateLock (but we could use another lock)