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

Unified Diff: cc/trees/layer_tree_host_common.cc

Issue 935193002: cc: Fix missing render surfaces with output requests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove asserts 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/layer_impl.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | 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..75535ad309a65f8ba3852a46e23911aa4a3b4b09 100644
--- a/cc/trees/layer_tree_host_common.cc
+++ b/cc/trees/layer_tree_host_common.cc
@@ -1203,12 +1203,30 @@ struct PreCalculateMetaInformationRecursiveData {
}
};
+static bool ValidateRenderSurface(LayerImpl* layer) {
+ // This test verifies that there are no cases where a LayerImpl needs
+ // a render surface, but doesn't have one.
+ if (layer->render_surface())
+ return true;
+
+ return layer->filters().IsEmpty() && layer->background_filters().IsEmpty() &&
+ !layer->mask_layer() && !layer->replica_layer() &&
+ !IsRootLayer(layer) && !layer->is_root_for_isolated_group() &&
+ !layer->HasCopyRequest();
+}
+
+static bool ValidateRenderSurface(Layer* layer) {
+ return true;
+}
+
// Recursively walks the layer tree to compute any information that is needed
// before doing the main recursion.
template <typename LayerType>
static void PreCalculateMetaInformation(
LayerType* layer,
PreCalculateMetaInformationRecursiveData* recursive_data) {
+ DCHECK(ValidateRenderSurface(layer));
+
layer->draw_properties().sorted_for_recursion = false;
layer->draw_properties().has_child_with_a_scroll_parent = false;
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698