OLD | NEW |
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/trees/quad_culler.h" | 5 #include "cc/trees/quad_culler.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "cc/base/math_util.h" | 9 #include "cc/base/math_util.h" |
10 #include "cc/debug/overdraw_metrics.h" | 10 #include "cc/debug/overdraw_metrics.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 public: | 32 public: |
33 TestOcclusionTrackerImpl(const gfx::Rect& scissor_rect_in_screen, | 33 TestOcclusionTrackerImpl(const gfx::Rect& scissor_rect_in_screen, |
34 bool record_metrics_for_frame = true) | 34 bool record_metrics_for_frame = true) |
35 : TestOcclusionTrackerBase(scissor_rect_in_screen, | 35 : TestOcclusionTrackerBase(scissor_rect_in_screen, |
36 record_metrics_for_frame) {} | 36 record_metrics_for_frame) {} |
37 | 37 |
38 private: | 38 private: |
39 DISALLOW_COPY_AND_ASSIGN(TestOcclusionTrackerImpl); | 39 DISALLOW_COPY_AND_ASSIGN(TestOcclusionTrackerImpl); |
40 }; | 40 }; |
41 | 41 |
42 typedef LayerIterator<LayerImpl, | 42 typedef LayerIterator<LayerImpl> LayerIteratorType; |
43 LayerImplList, | |
44 RenderSurfaceImpl, | |
45 LayerIteratorActions::FrontToBack> LayerIteratorType; | |
46 | 43 |
47 class QuadCullerTest : public testing::Test { | 44 class QuadCullerTest : public testing::Test { |
48 public: | 45 public: |
49 QuadCullerTest() | 46 QuadCullerTest() |
50 : host_impl_(&proxy_), | 47 : host_impl_(&proxy_), |
51 layer_id_(1) {} | 48 layer_id_(1) {} |
52 | 49 |
53 scoped_ptr<TiledLayerImpl> MakeLayer(TiledLayerImpl* parent, | 50 scoped_ptr<TiledLayerImpl> MakeLayer(TiledLayerImpl* parent, |
54 const gfx::Transform& draw_transform, | 51 const gfx::Transform& draw_transform, |
55 const gfx::Rect& layer_rect, | 52 const gfx::Rect& layer_rect, |
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
910 EXPECT_EQ(gfx::Rect(15, 10, 5, 11).ToString(), | 907 EXPECT_EQ(gfx::Rect(15, 10, 5, 11).ToString(), |
911 quad_list[0]->visible_rect.ToString()); | 908 quad_list[0]->visible_rect.ToString()); |
912 EXPECT_EQ(gfx::Rect(15, 20, 8, 14).ToString(), | 909 EXPECT_EQ(gfx::Rect(15, 20, 8, 14).ToString(), |
913 quad_list[1]->visible_rect.ToString()); | 910 quad_list[1]->visible_rect.ToString()); |
914 EXPECT_EQ(gfx::Rect(15, 30, 10, 16).ToString(), | 911 EXPECT_EQ(gfx::Rect(15, 30, 10, 16).ToString(), |
915 quad_list[2]->visible_rect.ToString()); | 912 quad_list[2]->visible_rect.ToString()); |
916 } | 913 } |
917 | 914 |
918 } // namespace | 915 } // namespace |
919 } // namespace cc | 916 } // namespace cc |
OLD | NEW |