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

Unified Diff: cc/layer_tree_host_common.cc

Issue 12252058: Add a |scope| argument to TRACE_EVENT_INSTANT* and require its presence. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use flags to record scope Created 7 years, 10 months 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
Index: cc/layer_tree_host_common.cc
diff --git a/cc/layer_tree_host_common.cc b/cc/layer_tree_host_common.cc
index 3d06aa4a12b98233ed420ff14677606e16c3c93e..a728ddb423c9d719b2b8e255625c3b034845414a 100644
--- a/cc/layer_tree_host_common.cc
+++ b/cc/layer_tree_host_common.cc
@@ -286,7 +286,8 @@ 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) {
- TRACE_EVENT_INSTANT0("cc", "LayerTreeHostCommon::requireSurface flattening");
+ TRACE_EVENT_INSTANT0("cc", "LayerTreeHostCommon::requireSurface flattening",
+ TRACE_EVENT_SCOPE_THREAD);
return true;
}
@@ -294,7 +295,8 @@ static bool subtreeShouldRenderToSeparateSurface(LayerType* layer, bool axisAlig
bool layerClipsExternalContent = layerClipsSubtree(layer) || layer->hasDelegatedContent();
if (layerClipsExternalContent && !axisAlignedWithRespectToParent && !layer->drawProperties().descendants_can_clip_selves)
{
- TRACE_EVENT_INSTANT0("cc", "LayerTreeHostCommon::requireSurface clipping");
+ TRACE_EVENT_INSTANT0("cc", "LayerTreeHostCommon::requireSurface clipping",
+ TRACE_EVENT_SCOPE_THREAD);
return true;
}
@@ -306,7 +308,8 @@ static bool subtreeShouldRenderToSeparateSurface(LayerType* layer, bool axisAlig
bool atLeastTwoLayersInSubtreeDrawContent = numDescendantsThatDrawContent > 0 && (layer->drawsContent() || numDescendantsThatDrawContent > 1);
if (layer->opacity() != 1 && !layer->preserves3D() && atLeastTwoLayersInSubtreeDrawContent) {
- TRACE_EVENT_INSTANT0("cc", "LayerTreeHostCommon::requireSurface opacity");
+ TRACE_EVENT_INSTANT0("cc", "LayerTreeHostCommon::requireSurface opacity",
+ TRACE_EVENT_SCOPE_THREAD);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698