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> LayerIteratorType; | 42 typedef LayerIterator<LayerImpl, |
| 43 LayerImplList, |
| 44 RenderSurfaceImpl, |
| 45 LayerIteratorActions::FrontToBack> LayerIteratorType; |
43 | 46 |
44 class QuadCullerTest : public testing::Test { | 47 class QuadCullerTest : public testing::Test { |
45 public: | 48 public: |
46 QuadCullerTest() | 49 QuadCullerTest() |
47 : host_impl_(&proxy_), | 50 : host_impl_(&proxy_), |
48 layer_id_(1) {} | 51 layer_id_(1) {} |
49 | 52 |
50 scoped_ptr<TiledLayerImpl> MakeLayer(TiledLayerImpl* parent, | 53 scoped_ptr<TiledLayerImpl> MakeLayer(TiledLayerImpl* parent, |
51 const gfx::Transform& draw_transform, | 54 const gfx::Transform& draw_transform, |
52 const gfx::Rect& layer_rect, | 55 const gfx::Rect& layer_rect, |
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
907 EXPECT_EQ(gfx::Rect(15, 10, 5, 11).ToString(), | 910 EXPECT_EQ(gfx::Rect(15, 10, 5, 11).ToString(), |
908 quad_list[0]->visible_rect.ToString()); | 911 quad_list[0]->visible_rect.ToString()); |
909 EXPECT_EQ(gfx::Rect(15, 20, 8, 14).ToString(), | 912 EXPECT_EQ(gfx::Rect(15, 20, 8, 14).ToString(), |
910 quad_list[1]->visible_rect.ToString()); | 913 quad_list[1]->visible_rect.ToString()); |
911 EXPECT_EQ(gfx::Rect(15, 30, 10, 16).ToString(), | 914 EXPECT_EQ(gfx::Rect(15, 30, 10, 16).ToString(), |
912 quad_list[2]->visible_rect.ToString()); | 915 quad_list[2]->visible_rect.ToString()); |
913 } | 916 } |
914 | 917 |
915 } // namespace | 918 } // namespace |
916 } // namespace cc | 919 } // namespace cc |
OLD | NEW |