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

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

Issue 657103003: cc: Change scoped_ptr<T>() to nullptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months 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_host_impl_unittest.cc ('k') | cc/trees/tree_synchronizer_unittest.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/layer_tree_host.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 virtual void CleanUpAndEndTest(LayerTreeHostImpl* host_impl) override { 298 virtual void CleanUpAndEndTest(LayerTreeHostImpl* host_impl) override {
299 clean_up_started_ = true; 299 clean_up_started_ = true;
300 MainThreadTaskRunner()->PostTask( 300 MainThreadTaskRunner()->PostTask(
301 FROM_HERE, 301 FROM_HERE,
302 base::Bind(&BrowserCompositorInvalidateLayerTreePerfTest:: 302 base::Bind(&BrowserCompositorInvalidateLayerTreePerfTest::
303 CleanUpAndEndTestOnMainThread, 303 CleanUpAndEndTestOnMainThread,
304 base::Unretained(this))); 304 base::Unretained(this)));
305 } 305 }
306 306
307 void CleanUpAndEndTestOnMainThread() { 307 void CleanUpAndEndTestOnMainThread() {
308 tab_contents_->SetTextureMailbox(TextureMailbox(), 308 tab_contents_->SetTextureMailbox(TextureMailbox(), nullptr);
309 scoped_ptr<SingleReleaseCallback>());
310 EndTest(); 309 EndTest();
311 } 310 }
312 311
313 virtual bool CleanUpStarted() override { return clean_up_started_; } 312 virtual bool CleanUpStarted() override { return clean_up_started_; }
314 313
315 private: 314 private:
316 scoped_refptr<TextureLayer> tab_contents_; 315 scoped_refptr<TextureLayer> tab_contents_;
317 unsigned next_sync_point_; 316 unsigned next_sync_point_;
318 bool clean_up_started_; 317 bool clean_up_started_;
319 }; 318 };
320 319
321 TEST_F(BrowserCompositorInvalidateLayerTreePerfTest, DenseBrowserUI) { 320 TEST_F(BrowserCompositorInvalidateLayerTreePerfTest, DenseBrowserUI) {
322 measure_commit_cost_ = true; 321 measure_commit_cost_ = true;
323 SetTestName("dense_layer_tree"); 322 SetTestName("dense_layer_tree");
324 ReadTestFile("dense_layer_tree"); 323 ReadTestFile("dense_layer_tree");
325 RunTestWithImplSidePainting(); 324 RunTestWithImplSidePainting();
326 } 325 }
327 326
328 // Simulates a page with several large, transformed and animated layers. 327 // Simulates a page with several large, transformed and animated layers.
329 TEST_F(LayerTreeHostPerfTestJsonReader, HeavyPageThreadedImplSide) { 328 TEST_F(LayerTreeHostPerfTestJsonReader, HeavyPageThreadedImplSide) {
330 begin_frame_driven_drawing_ = true; 329 begin_frame_driven_drawing_ = true;
331 measure_commit_cost_ = true; 330 measure_commit_cost_ = true;
332 SetTestName("heavy_page"); 331 SetTestName("heavy_page");
333 ReadTestFile("heavy_layer_tree"); 332 ReadTestFile("heavy_layer_tree");
334 RunTestWithImplSidePainting(); 333 RunTestWithImplSidePainting();
335 } 334 }
336 335
337 } // namespace 336 } // namespace
338 } // namespace cc 337 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/tree_synchronizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698