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

Unified Diff: cc/trees/draw_property_utils.cc

Issue 1908593002: cc : Stop pushing transform origin from Layer and LayerImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/damage_tracker_unittest.cc ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/draw_property_utils.cc
diff --git a/cc/trees/draw_property_utils.cc b/cc/trees/draw_property_utils.cc
index 8982605466abbda819e6039e2062a8a5d5f9e4e3..f8fc1181f00ed714c678ccd2ca0db2c2557d0881 100644
--- a/cc/trees/draw_property_utils.cc
+++ b/cc/trees/draw_property_utils.cc
@@ -1027,6 +1027,16 @@ void ComputeSurfaceDrawProperties(const PropertyTrees* property_trees,
property_trees->transform_tree, render_surface);
}
+#if DCHECK_IS_ON()
+static void ValidatePageScaleLayer(const Layer* page_scale_layer) {
+ DCHECK_EQ(page_scale_layer->position().ToString(), gfx::PointF().ToString());
+ DCHECK_EQ(page_scale_layer->transform_origin().ToString(),
+ gfx::Point3F().ToString());
+}
+
+static void ValidatePageScaleLayer(const LayerImpl* page_scale_layer) {}
+#endif
+
template <typename LayerType>
static void UpdatePageScaleFactorInternal(PropertyTrees* property_trees,
const LayerType* page_scale_layer,
@@ -1043,9 +1053,9 @@ static void UpdatePageScaleFactorInternal(PropertyTrees* property_trees,
page_scale_layer->transform_tree_index());
// TODO(enne): property trees can't ask the layer these things, but
// the page scale layer should *just* be the page scale.
- DCHECK_EQ(page_scale_layer->position().ToString(), gfx::PointF().ToString());
- DCHECK_EQ(page_scale_layer->transform_origin().ToString(),
- gfx::Point3F().ToString());
+#if DCHECK_IS_ON()
+ ValidatePageScaleLayer(page_scale_layer);
+#endif
if (IsRootLayer(page_scale_layer)) {
// When the page scale layer is also the root layer, the node should also
« no previous file with comments | « cc/trees/damage_tracker_unittest.cc ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698