Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: cc/trees/occlusion_tracker_unittest.cc

Issue 1437413002: cc: Remove ScopedPtrVector and cc::remove_if. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_impl_unittest.cc ('k') | cc/trees/tree_synchronizer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_impl_unittest.cc ('k') | cc/trees/tree_synchronizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698