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

Unified Diff: cc/layers/layer.cc

Issue 1013463003: Update from https://crrev.com/320931 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 9 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.h ('k') | cc/layers/picture_layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index bf2f26a4c4b5d06c36ceb10766a86219a2dccee0..12773a140768d377b53eb6ff638020191bcae47c 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -52,6 +52,7 @@ Layer::Layer()
transform_tree_index_(-1),
opacity_tree_index_(-1),
clip_tree_index_(-1),
+ should_flatten_transform_from_property_tree_(false),
should_scroll_on_main_thread_(false),
have_wheel_event_handlers_(false),
have_scroll_event_handlers_(false),
@@ -1294,6 +1295,8 @@ gfx::Transform Layer::screen_space_transform_from_property_trees(
if (transform_tree_index() >= 0) {
gfx::Transform ssxform = tree.Node(transform_tree_index())->data.to_screen;
xform.ConcatTransform(ssxform);
+ if (should_flatten_transform_from_property_tree_)
+ xform.FlattenTo2d();
}
xform.Scale(1.0 / contents_scale_x(), 1.0 / contents_scale_y());
return xform;
@@ -1313,6 +1316,8 @@ gfx::Transform Layer::draw_transform_from_property_trees(
// If you're not the root, or you don't own a surface, you need to apply
// your local offset.
xform = node->data.to_target;
+ if (should_flatten_transform_from_property_tree_)
+ xform.FlattenTo2d();
xform.Translate(offset_to_transform_parent().x(),
offset_to_transform_parent().y());
} else {
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/picture_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698