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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "cc/base/math_util.h" | 9 #include "cc/base/math_util.h" |
10 #include "cc/layers/layer.h" | 10 #include "cc/layers/layer.h" |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 const gfx::PointF& position, | 191 const gfx::PointF& position, |
192 const gfx::Size& bounds, | 192 const gfx::Size& bounds, |
193 bool opaque) { | 193 bool opaque) { |
194 TestContentLayerImpl* layer = | 194 TestContentLayerImpl* layer = |
195 CreateDrawingLayer(parent, transform, position, bounds, opaque); | 195 CreateDrawingLayer(parent, transform, position, bounds, opaque); |
196 layer->test_properties()->force_render_surface = true; | 196 layer->test_properties()->force_render_surface = true; |
197 return layer; | 197 return layer; |
198 } | 198 } |
199 | 199 |
200 void DestroyLayers() { | 200 void DestroyLayers() { |
| 201 host_->host_impl()->active_tree()->ClearLayerList(); |
201 host_->host_impl()->active_tree()->SetRootLayer(nullptr); | 202 host_->host_impl()->active_tree()->SetRootLayer(nullptr); |
202 render_surface_layer_list_impl_.clear(); | 203 render_surface_layer_list_impl_.clear(); |
203 replica_layers_.clear(); | 204 replica_layers_.clear(); |
204 mask_layers_.clear(); | 205 mask_layers_.clear(); |
205 ResetLayerIterator(); | 206 ResetLayerIterator(); |
206 } | 207 } |
207 | 208 |
208 void CopyOutputCallback(std::unique_ptr<CopyOutputResult> result) {} | 209 void CopyOutputCallback(std::unique_ptr<CopyOutputResult> result) {} |
209 | 210 |
210 void AddCopyRequest(Layer* layer) { | 211 void AddCopyRequest(Layer* layer) { |
(...skipping 2303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2514 EXPECT_EQ(gfx::Rect(), | 2515 EXPECT_EQ(gfx::Rect(), |
2515 occlusion.UnoccludedSurfaceContentRect( | 2516 occlusion.UnoccludedSurfaceContentRect( |
2516 surface, gfx::Rect(80, 70, 50, 50))); | 2517 surface, gfx::Rect(80, 70, 50, 50))); |
2517 } | 2518 } |
2518 }; | 2519 }; |
2519 | 2520 |
2520 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestUnoccludedSurfaceQuery) | 2521 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestUnoccludedSurfaceQuery) |
2521 | 2522 |
2522 } // namespace | 2523 } // namespace |
2523 } // namespace cc | 2524 } // namespace cc |
OLD | NEW |