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

Unified Diff: cc/trees/layer_tree_host_common.cc

Issue 1248433007: Draw Transform of Render Surface From Property Trees (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments on patch 2 Created 5 years, 5 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/draw_property_utils.cc ('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 18fcd7b2d3193d8298141792a65d4ae0a04f834b..915404ef0d39dc80955f8e9d8e7560e2197113c3 100644
--- a/cc/trees/layer_tree_host_common.cc
+++ b/cc/trees/layer_tree_host_common.cc
@@ -2440,6 +2440,20 @@ static bool ApproximatelyEqual(const gfx::Transform& a,
return true;
}
+void VerifyPropertyTreeValuesForSurface(RenderSurfaceImpl* render_surface,
+ PropertyTrees* property_trees) {
+ const bool render_surface_draw_transforms_match =
+ ApproximatelyEqual(render_surface->draw_transform(),
+ DrawTransformOfRenderSurfaceFromPropertyTrees(
+ render_surface, property_trees->transform_tree));
+ CHECK(render_surface_draw_transforms_match)
+ << "expected: " << render_surface->draw_transform().ToString()
+ << " actual: "
+ << DrawTransformOfRenderSurfaceFromPropertyTrees(
+ render_surface, property_trees->transform_tree)
+ .ToString();
+}
+
void VerifyPropertyTreeValuesForLayer(LayerImpl* current_layer,
PropertyTrees* property_trees,
bool layers_always_allowed_lcd_text,
@@ -2488,6 +2502,9 @@ void VerifyPropertyTreeValues(
end = LayerIterator::End(inputs->render_surface_layer_list);
it != end; ++it) {
LayerImpl* current_layer = *it;
+ if (it.represents_target_render_surface())
+ VerifyPropertyTreeValuesForSurface(current_layer->render_surface(),
+ inputs->property_trees);
if (!it.represents_itself() || !current_layer->DrawsContent())
continue;
VerifyPropertyTreeValuesForLayer(current_layer, inputs->property_trees,
« no previous file with comments | « cc/trees/draw_property_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698