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

Side by Side Diff: cc/layers/contents_scaling_layer_unittest.cc

Issue 15579002: Implement transform/clip support for Android WebView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Turn on fuzzy comparator for new SoftwareRenderer tests Created 7 years, 6 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 | « no previous file | cc/layers/layer_iterator_unittest.cc » ('j') | cc/output/direct_renderer.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/layers/contents_scaling_layer.h" 5 #include "cc/layers/contents_scaling_layer.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "cc/test/geometry_test_utils.h" 9 #include "cc/test/geometry_test_utils.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 23 matching lines...) Expand all
34 virtual ~MockContentsScalingLayer() {} 34 virtual ~MockContentsScalingLayer() {}
35 35
36 gfx::RectF last_needs_display_rect_; 36 gfx::RectF last_needs_display_rect_;
37 }; 37 };
38 38
39 void CalcDrawProps(Layer* root, float device_scale) { 39 void CalcDrawProps(Layer* root, float device_scale) {
40 LayerList render_surface_layer_list; 40 LayerList render_surface_layer_list;
41 LayerTreeHostCommon::CalculateDrawProperties( 41 LayerTreeHostCommon::CalculateDrawProperties(
42 root, 42 root,
43 gfx::Size(500, 500), 43 gfx::Size(500, 500),
44 gfx::Transform(),
44 device_scale, 45 device_scale,
45 1.f, 46 1.f,
46 NULL, 47 NULL,
47 1024, 48 1024,
48 false, 49 false,
49 false, 50 false,
50 &render_surface_layer_list); 51 &render_surface_layer_list);
51 } 52 }
52 53
53 TEST(ContentsScalingLayerTest, CheckContentsBounds) { 54 TEST(ContentsScalingLayerTest, CheckContentsBounds) {
(...skipping 19 matching lines...) Expand all
73 EXPECT_EQ(20, test_layer->content_bounds().width()); 74 EXPECT_EQ(20, test_layer->content_bounds().width());
74 EXPECT_EQ(40, test_layer->content_bounds().height()); 75 EXPECT_EQ(40, test_layer->content_bounds().height());
75 76
76 CalcDrawProps(root.get(), 1.33f); 77 CalcDrawProps(root.get(), 1.33f);
77 EXPECT_EQ(14, test_layer->content_bounds().width()); 78 EXPECT_EQ(14, test_layer->content_bounds().width());
78 EXPECT_EQ(27, test_layer->content_bounds().height()); 79 EXPECT_EQ(27, test_layer->content_bounds().height());
79 } 80 }
80 81
81 } // namespace 82 } // namespace
82 } // namespace cc 83 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/layers/layer_iterator_unittest.cc » ('j') | cc/output/direct_renderer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698