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

Unified Diff: cc/trees/layer_tree_host_common.cc

Issue 947613003: Add a sanity check to ensure that CDP doesn't hit a cycle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: s/DCHECK/CHECK/ Created 5 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
« no previous file with comments | « cc/layers/draw_properties.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_common.cc
diff --git a/cc/trees/layer_tree_host_common.cc b/cc/trees/layer_tree_host_common.cc
index 70c5037221d1979579ac149f2fe0190b205834a9..8d70a21051e835dbe3355d056d165ad1dbfc3408 100644
--- a/cc/trees/layer_tree_host_common.cc
+++ b/cc/trees/layer_tree_host_common.cc
@@ -1211,6 +1211,7 @@ static void PreCalculateMetaInformation(
PreCalculateMetaInformationRecursiveData* recursive_data) {
layer->draw_properties().sorted_for_recursion = false;
layer->draw_properties().has_child_with_a_scroll_parent = false;
+ layer->draw_properties().visited = false;
if (!HasInvertibleOrAnimatedTransform(layer)) {
// Layers with singular transforms should not be drawn, the whole subtree
@@ -1578,6 +1579,9 @@ static void CalculateDrawPropertiesInternal(
DCHECK(globals.page_scale_application_layer ||
(globals.page_scale_factor == 1.f));
+ CHECK(!layer->draw_properties().visited);
+ layer->draw_properties().visited = true;
+
DataForRecursion<LayerType> data_for_children;
typename LayerType::RenderSurfaceType*
nearest_occlusion_immune_ancestor_surface =
« no previous file with comments | « cc/layers/draw_properties.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698