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/occlusion_tracker.h" | 5 #include "cc/trees/occlusion_tracker.h" |
6 | 6 |
7 #include "cc/animation/layer_animation_controller.h" | 7 #include "cc/animation/layer_animation_controller.h" |
8 #include "cc/base/math_util.h" | 8 #include "cc/base/math_util.h" |
9 #include "cc/layers/layer.h" | 9 #include "cc/layers/layer.h" |
10 #include "cc/layers/layer_impl.h" | 10 #include "cc/layers/layer_impl.h" |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 | 167 |
168 template <typename Types> class OcclusionTrackerTest : public testing::Test { | 168 template <typename Types> class OcclusionTrackerTest : public testing::Test { |
169 protected: | 169 protected: |
170 explicit OcclusionTrackerTest(bool opaque_layers) | 170 explicit OcclusionTrackerTest(bool opaque_layers) |
171 : opaque_layers_(opaque_layers), | 171 : opaque_layers_(opaque_layers), |
172 client_(FakeLayerTreeHostClient::DIRECT_3D), | 172 client_(FakeLayerTreeHostClient::DIRECT_3D), |
173 host_(FakeLayerTreeHost::Create(&client_)) {} | 173 host_(FakeLayerTreeHost::Create(&client_)) {} |
174 | 174 |
175 virtual void RunMyTest() = 0; | 175 virtual void RunMyTest() = 0; |
176 | 176 |
177 virtual void TearDown() { DestroyLayers(); } | 177 void TearDown() override { DestroyLayers(); } |
178 | 178 |
179 typename Types::HostType* GetHost(); | 179 typename Types::HostType* GetHost(); |
180 | 180 |
181 typename Types::ContentLayerType* CreateRoot(const gfx::Transform& transform, | 181 typename Types::ContentLayerType* CreateRoot(const gfx::Transform& transform, |
182 const gfx::PointF& position, | 182 const gfx::PointF& position, |
183 const gfx::Size& bounds) { | 183 const gfx::Size& bounds) { |
184 typename Types::ContentLayerPtrType layer( | 184 typename Types::ContentLayerPtrType layer( |
185 Types::CreateContentLayer(GetHost())); | 185 Types::CreateContentLayer(GetHost())); |
186 typename Types::ContentLayerType* layer_ptr = layer.get(); | 186 typename Types::ContentLayerType* layer_ptr = layer.get(); |
187 SetProperties(layer_ptr, transform, position, bounds); | 187 SetProperties(layer_ptr, transform, position, bounds); |
(...skipping 3113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3301 EXPECT_EQ(gfx::Rect(), | 3301 EXPECT_EQ(gfx::Rect(), |
3302 occlusion.UnoccludedSurfaceContentRect( | 3302 occlusion.UnoccludedSurfaceContentRect( |
3303 surface, gfx::Rect(80, 70, 50, 50))); | 3303 surface, gfx::Rect(80, 70, 50, 50))); |
3304 } | 3304 } |
3305 }; | 3305 }; |
3306 | 3306 |
3307 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestUnoccludedSurfaceQuery) | 3307 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestUnoccludedSurfaceQuery) |
3308 | 3308 |
3309 } // namespace | 3309 } // namespace |
3310 } // namespace cc | 3310 } // namespace cc |
OLD | NEW |