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

Side by Side Diff: cc/trees/layer_tree_host_common_unittest.cc

Issue 1325803002: Apply skew on both axes together rather than sequentially on Compositor thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test for skewY Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « cc/base/float_quad_unittest.cc ('k') | mojo/converters/surfaces/tests/surface_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //// Copyright 2011 The Chromium Authors. All rights reserved. 1 //// Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_tree_host_common.h" 5 #include "cc/trees/layer_tree_host_common.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 9
10 #include "cc/animation/keyframed_animation_curve.h" 10 #include "cc/animation/keyframed_animation_curve.h"
(...skipping 4265 matching lines...) Expand 10 before | Expand all | Expand 10 after
4276 child_->SetTransform(scale); 4276 child_->SetTransform(scale);
4277 child_->layer_tree_impl()->property_trees()->needs_rebuild = true; 4277 child_->layer_tree_impl()->property_trees()->needs_rebuild = true;
4278 ExecuteCalculateDrawProperties(root_, 1.f, 1.f, NULL, can_use_lcd_text_, 4278 ExecuteCalculateDrawProperties(root_, 1.f, 1.f, NULL, can_use_lcd_text_,
4279 layers_always_allowed_lcd_text_); 4279 layers_always_allowed_lcd_text_);
4280 EXPECT_EQ(expect_lcd_text, root_->can_use_lcd_text()); 4280 EXPECT_EQ(expect_lcd_text, root_->can_use_lcd_text());
4281 EXPECT_EQ(expect_not_lcd_text, child_->can_use_lcd_text()); 4281 EXPECT_EQ(expect_not_lcd_text, child_->can_use_lcd_text());
4282 EXPECT_EQ(expect_not_lcd_text, grand_child_->can_use_lcd_text()); 4282 EXPECT_EQ(expect_not_lcd_text, grand_child_->can_use_lcd_text());
4283 4283
4284 // Case 6: Skew. 4284 // Case 6: Skew.
4285 gfx::Transform skew; 4285 gfx::Transform skew;
4286 skew.SkewX(10.0); 4286 skew.Skew(10.0, 0.0);
4287 child_->SetTransform(skew); 4287 child_->SetTransform(skew);
4288 child_->layer_tree_impl()->property_trees()->needs_rebuild = true; 4288 child_->layer_tree_impl()->property_trees()->needs_rebuild = true;
4289 ExecuteCalculateDrawProperties(root_, 1.f, 1.f, NULL, can_use_lcd_text_, 4289 ExecuteCalculateDrawProperties(root_, 1.f, 1.f, NULL, can_use_lcd_text_,
4290 layers_always_allowed_lcd_text_); 4290 layers_always_allowed_lcd_text_);
4291 EXPECT_EQ(expect_lcd_text, root_->can_use_lcd_text()); 4291 EXPECT_EQ(expect_lcd_text, root_->can_use_lcd_text());
4292 EXPECT_EQ(expect_not_lcd_text, child_->can_use_lcd_text()); 4292 EXPECT_EQ(expect_not_lcd_text, child_->can_use_lcd_text());
4293 EXPECT_EQ(expect_not_lcd_text, grand_child_->can_use_lcd_text()); 4293 EXPECT_EQ(expect_not_lcd_text, grand_child_->can_use_lcd_text());
4294 4294
4295 // Case 7: Translucent. 4295 // Case 7: Translucent.
4296 child_->SetTransform(identity_matrix); 4296 child_->SetTransform(identity_matrix);
(...skipping 3611 matching lines...) Expand 10 before | Expand all | Expand 10 after
7908 gfx::PointF(), gfx::Size(30, 30), true, false, 7908 gfx::PointF(), gfx::Size(30, 30), true, false,
7909 false); 7909 false);
7910 7910
7911 ExecuteCalculateDrawProperties(root); 7911 ExecuteCalculateDrawProperties(root);
7912 7912
7913 EXPECT_EQ(test_layer->clip_rect(), gfx::RectF(-4, -4, 30, 30)); 7913 EXPECT_EQ(test_layer->clip_rect(), gfx::RectF(-4, -4, 30, 30));
7914 } 7914 }
7915 7915
7916 } // namespace 7916 } // namespace
7917 } // namespace cc 7917 } // namespace cc
OLDNEW
« no previous file with comments | « cc/base/float_quad_unittest.cc ('k') | mojo/converters/surfaces/tests/surface_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698