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

Unified Diff: cc/layer_tree_host_common.cc

Issue 11570036: Add some traces for when render pass caching fails (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | « no previous file | cc/layer_tree_host_impl.cc » ('j') | cc/layer_tree_host_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_tree_host_common.cc
diff --git a/cc/layer_tree_host_common.cc b/cc/layer_tree_host_common.cc
index 0a204ceb6914df96a5bdede2b6c8c9ee7e1c6915..158b7514d6707c7f704fdd37c9304bf36788e255 100644
--- a/cc/layer_tree_host_common.cc
+++ b/cc/layer_tree_host_common.cc
@@ -270,12 +270,16 @@ static bool subtreeShouldRenderToSeparateSurface(LayerType* layer, bool axisAlig
// If the layer flattens its subtree (i.e. the layer doesn't preserve-3d), but it is
// treated as a 3D object by its parent (i.e. parent does preserve-3d).
- if (layerIsInExisting3DRenderingContext(layer) && !layer->preserves3D() && numDescendantsThatDrawContent > 0)
+ if (layerIsInExisting3DRenderingContext(layer) && !layer->preserves3D() && numDescendantsThatDrawContent > 0) {
+ TRACE_EVENT_INSTANT0("cc", "LayerTreeHostCommon::requireSurface flattening");
return true;
+ }
// If the layer clips its descendants but it is not axis-aligned with respect to its parent.
- if (layerClipsSubtree(layer) && !axisAlignedWithRespectToParent && numDescendantsThatDrawContent > 0)
+ if (layerClipsSubtree(layer) && !axisAlignedWithRespectToParent && numDescendantsThatDrawContent > 0) {
+ TRACE_EVENT_INSTANT0("cc", "LayerTreeHostCommon::requireSurface clipping");
return true;
+ }
// If the layer has some translucency and does not have a preserves-3d transform style.
// This condition only needs a render surface if two or more layers in the
@@ -285,8 +289,10 @@ static bool subtreeShouldRenderToSeparateSurface(LayerType* layer, bool axisAlig
bool atLeastTwoLayersInSubtreeDrawContent = layer->hasDelegatedContent() ||
(numDescendantsThatDrawContent > 0 && (layer->drawsContent() || numDescendantsThatDrawContent > 1));
- if (layer->opacity() != 1 && !layer->preserves3D() && atLeastTwoLayersInSubtreeDrawContent)
+ if (layer->opacity() != 1 && !layer->preserves3D() && atLeastTwoLayersInSubtreeDrawContent) {
+ TRACE_EVENT_INSTANT0("cc", "LayerTreeHostCommon::requireSurface opacity");
return true;
+ }
return false;
}
« no previous file with comments | « no previous file | cc/layer_tree_host_impl.cc » ('j') | cc/layer_tree_host_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698