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

Unified Diff: cc/trees/layer_tree_host_common.cc

Issue 13939005: cc: Add strict layer property change checking and handle bounds changes during paint. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: s/CHECK/DCHECK/ Created 7 years, 8 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/trees/layer_tree_host.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 aa9ad5e57255c40ffad3c20b50bf134c9416d9cb..7548cd293bbf1a2212062e961bc269fa34b0f08e 100644
--- a/cc/trees/layer_tree_host_common.cc
+++ b/cc/trees/layer_tree_host_common.cc
@@ -268,6 +268,17 @@ static inline void UpdateTilePrioritiesForLayer(LayerImpl* layer) {
static inline void UpdateTilePrioritiesForLayer(Layer* layer) {}
+static inline void SavePaintPropertiesLayer(LayerImpl* layer) {}
+
+static inline void SavePaintPropertiesLayer(Layer* layer) {
+ layer->SavePaintProperties();
+
+ if (layer->mask_layer())
+ layer->mask_layer()->SavePaintProperties();
+ if (layer->replica_layer() && layer->replica_layer()->mask_layer())
+ layer->replica_layer()->mask_layer()->SavePaintProperties();
+}
+
template <typename LayerType>
static bool SubtreeShouldRenderToSeparateSurface(
LayerType* layer,
@@ -1409,6 +1420,8 @@ static void CalculateDrawPropertiesInternal(
layer->render_target()->render_surface()->
AddContributingDelegatedRenderPassLayer(layer);
}
+
+ SavePaintPropertiesLayer(layer);
}
void LayerTreeHostCommon::CalculateDrawProperties(
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698