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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 | 203 |
204 void CopyOutputCallback(scoped_ptr<CopyOutputResult> result) {} | 204 void CopyOutputCallback(scoped_ptr<CopyOutputResult> result) {} |
205 | 205 |
206 void AddCopyRequest(Layer* layer) { | 206 void AddCopyRequest(Layer* layer) { |
207 layer->RequestCopyOfOutput(CopyOutputRequest::CreateBitmapRequest( | 207 layer->RequestCopyOfOutput(CopyOutputRequest::CreateBitmapRequest( |
208 base::Bind(&OcclusionTrackerTest::CopyOutputCallback, | 208 base::Bind(&OcclusionTrackerTest::CopyOutputCallback, |
209 base::Unretained(this)))); | 209 base::Unretained(this)))); |
210 } | 210 } |
211 | 211 |
212 void AddCopyRequest(LayerImpl* layer) { | 212 void AddCopyRequest(LayerImpl* layer) { |
213 ScopedPtrVector<CopyOutputRequest> requests; | 213 std::vector<scoped_ptr<CopyOutputRequest>> requests; |
214 requests.push_back(CopyOutputRequest::CreateBitmapRequest(base::Bind( | 214 requests.push_back(CopyOutputRequest::CreateBitmapRequest(base::Bind( |
215 &OcclusionTrackerTest::CopyOutputCallback, base::Unretained(this)))); | 215 &OcclusionTrackerTest::CopyOutputCallback, base::Unretained(this)))); |
216 layer->SetHasRenderSurface(true); | 216 layer->SetHasRenderSurface(true); |
217 layer->PassCopyRequests(&requests); | 217 layer->PassCopyRequests(&requests); |
218 } | 218 } |
219 | 219 |
220 void CalcDrawEtc(TestContentLayerImpl* root) { | 220 void CalcDrawEtc(TestContentLayerImpl* root) { |
221 DCHECK(root == root_.get()); | 221 DCHECK(root == root_.get()); |
222 | 222 |
223 // These occlusion tests attach and detach layers in multiple | 223 // These occlusion tests attach and detach layers in multiple |
(...skipping 2286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2510 EXPECT_EQ(gfx::Rect(), | 2510 EXPECT_EQ(gfx::Rect(), |
2511 occlusion.UnoccludedSurfaceContentRect( | 2511 occlusion.UnoccludedSurfaceContentRect( |
2512 surface, gfx::Rect(80, 70, 50, 50))); | 2512 surface, gfx::Rect(80, 70, 50, 50))); |
2513 } | 2513 } |
2514 }; | 2514 }; |
2515 | 2515 |
2516 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestUnoccludedSurfaceQuery) | 2516 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestUnoccludedSurfaceQuery) |
2517 | 2517 |
2518 } // namespace | 2518 } // namespace |
2519 } // namespace cc | 2519 } // namespace cc |
OLD | NEW |