Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(278)

Unified Diff: Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp

Issue 8890079: Merge 102611 - [chromium] Remove assumption that empty surface is always at end of list (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/963/
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/ChangeLog ('k') | Source/WebKit/chromium/ChangeLog » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp
===================================================================
--- Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp (revision 102688)
+++ Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp (working copy)
@@ -434,10 +434,17 @@
renderSurface->setReplicaDrawTransform(replicaDrawTransform);
}
- // If a render surface has no layer list, then it and none of its
- // children needed to get drawn. Therefore, it should be the last layer
- // in the render surface list and we can trivially remove it.
+ // If a render surface has no layer list, then it and none of its children needed to get drawn.
if (!layer->renderSurface()->layerList().size()) {
+ // FIXME: Originally we asserted that this layer was already at the end of the
+ // list, and only needed to remove that layer. For now, we remove the
+ // entire subtree of surfaces to fix a crash bug. The root cause is
+ // https://bugs.webkit.org/show_bug.cgi?id=74147 and we should be able
+ // to put the original assert after fixing that.
+ while (renderSurfaceLayerList.last() != layer) {
+ renderSurfaceLayerList.last()->clearRenderSurface();
+ renderSurfaceLayerList.removeLast();
+ }
ASSERT(renderSurfaceLayerList.last() == layer);
renderSurfaceLayerList.removeLast();
layer->clearRenderSurface();
« no previous file with comments | « Source/WebCore/ChangeLog ('k') | Source/WebKit/chromium/ChangeLog » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698