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

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

Issue 1372253002: gfx: Make conversions from gfx::Point to PointF explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pointfconvert-gfx: . Created 5 years, 2 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
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/layer_iterator.h" 5 #include "cc/layers/layer_iterator.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "cc/layers/layer.h" 9 #include "cc/layers/layer.h"
10 #include "cc/test/fake_layer_tree_host.h" 10 #include "cc/test/fake_layer_tree_host.h"
(...skipping 22 matching lines...) Expand all
33 int count_representing_contributing_surface_; 33 int count_representing_contributing_surface_;
34 int count_representing_itself_; 34 int count_representing_itself_;
35 35
36 private: 36 private:
37 explicit TestLayerImpl(LayerTreeImpl* tree, int id) 37 explicit TestLayerImpl(LayerTreeImpl* tree, int id)
38 : LayerImpl(tree, id, new SyncedScrollOffset), 38 : LayerImpl(tree, id, new SyncedScrollOffset),
39 count_representing_target_surface_(-1), 39 count_representing_target_surface_(-1),
40 count_representing_contributing_surface_(-1), 40 count_representing_contributing_surface_(-1),
41 count_representing_itself_(-1) { 41 count_representing_itself_(-1) {
42 SetBounds(gfx::Size(100, 100)); 42 SetBounds(gfx::Size(100, 100));
43 SetPosition(gfx::Point()); 43 SetPosition(gfx::PointF());
44 SetDrawsContent(true); 44 SetDrawsContent(true);
45 } 45 }
46 }; 46 };
47 47
48 #define EXPECT_COUNT(layer, target, contrib, itself) \ 48 #define EXPECT_COUNT(layer, target, contrib, itself) \
49 EXPECT_EQ(target, layer->count_representing_target_surface_); \ 49 EXPECT_EQ(target, layer->count_representing_target_surface_); \
50 EXPECT_EQ(contrib, layer->count_representing_contributing_surface_); \ 50 EXPECT_EQ(contrib, layer->count_representing_contributing_surface_); \
51 EXPECT_EQ(itself, layer->count_representing_itself_); 51 EXPECT_EQ(itself, layer->count_representing_itself_);
52 52
53 void ResetCounts(LayerImplList* render_surface_layer_list) { 53 void ResetCounts(LayerImplList* render_surface_layer_list) {
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 EXPECT_COUNT(root21_ptr, -1, -1, 9); 248 EXPECT_COUNT(root21_ptr, -1, -1, 9);
249 EXPECT_COUNT(root22_ptr, 7, 8, 6); 249 EXPECT_COUNT(root22_ptr, 7, 8, 6);
250 EXPECT_COUNT(root221_ptr, -1, -1, 5); 250 EXPECT_COUNT(root221_ptr, -1, -1, 5);
251 EXPECT_COUNT(root23_ptr, 3, 4, 2); 251 EXPECT_COUNT(root23_ptr, 3, 4, 2);
252 EXPECT_COUNT(root231_ptr, -1, -1, 1); 252 EXPECT_COUNT(root231_ptr, -1, -1, 1);
253 EXPECT_COUNT(root3_ptr, -1, -1, 0); 253 EXPECT_COUNT(root3_ptr, -1, -1, 0);
254 } 254 }
255 255
256 } // namespace 256 } // namespace
257 } // namespace cc 257 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698