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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 1832663002: cc : Determine if a layer is root by using the value in LayerTreeImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index efc8eb0c6b73f02d9da331aa9c77003ffa798a2c..35d835619f1bcd0e186df9aa02f3e0f4a8a95a39 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -809,7 +809,8 @@ DrawResult LayerTreeHostImpl::CalculateRenderPasses(
RenderSurfaceImpl* render_surface = render_surface_layer->render_surface();
bool should_draw_into_render_pass =
- render_surface_layer->parent() == NULL ||
+ render_surface_layer->layer_tree_impl()->IsRootLayer(
ajuma 2016/03/23 23:27:28 You can directly use active_tree_ here instead of
jaydasika 2016/03/24 00:14:38 Done.
+ render_surface_layer) ||
render_surface->contributes_to_drawn_surface() ||
render_surface_layer->HasCopyRequest();
if (should_draw_into_render_pass)

Powered by Google App Engine
This is Rietveld 408576698