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

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

Issue 500123003: Remove implicit conversions from scoped_refptr to T* in cc/trees/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 6 years, 4 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/layer_tree_host_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/file_util.h" 9 #include "base/file_util.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 // Invalidates a leaf layer in the tree on the main thread after every commit. 177 // Invalidates a leaf layer in the tree on the main thread after every commit.
178 class LayerTreeHostPerfTestLeafInvalidates 178 class LayerTreeHostPerfTestLeafInvalidates
179 : public LayerTreeHostPerfTestJsonReader { 179 : public LayerTreeHostPerfTestJsonReader {
180 public: 180 public:
181 virtual void BuildTree() OVERRIDE { 181 virtual void BuildTree() OVERRIDE {
182 LayerTreeHostPerfTestJsonReader::BuildTree(); 182 LayerTreeHostPerfTestJsonReader::BuildTree();
183 183
184 // Find a leaf layer. 184 // Find a leaf layer.
185 for (layer_to_invalidate_ = layer_tree_host()->root_layer(); 185 for (layer_to_invalidate_ = layer_tree_host()->root_layer();
186 layer_to_invalidate_->children().size(); 186 layer_to_invalidate_->children().size();
187 layer_to_invalidate_ = layer_to_invalidate_->children()[0]) {} 187 layer_to_invalidate_ = layer_to_invalidate_->children()[0].get()) {
188 }
188 } 189 }
189 190
190 virtual void DidCommitAndDrawFrame() OVERRIDE { 191 virtual void DidCommitAndDrawFrame() OVERRIDE {
191 if (TestEnded()) 192 if (TestEnded())
192 return; 193 return;
193 194
194 static bool flip = true; 195 static bool flip = true;
195 layer_to_invalidate_->SetOpacity(flip ? 1.f : 0.5f); 196 layer_to_invalidate_->SetOpacity(flip ? 1.f : 0.5f);
196 flip = !flip; 197 flip = !flip;
197 } 198 }
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 TEST_F(LayerTreeHostPerfTestJsonReader, HeavyPageThreadedImplSide) { 329 TEST_F(LayerTreeHostPerfTestJsonReader, HeavyPageThreadedImplSide) {
329 begin_frame_driven_drawing_ = true; 330 begin_frame_driven_drawing_ = true;
330 measure_commit_cost_ = true; 331 measure_commit_cost_ = true;
331 SetTestName("heavy_page"); 332 SetTestName("heavy_page");
332 ReadTestFile("heavy_layer_tree"); 333 ReadTestFile("heavy_layer_tree");
333 RunTestWithImplSidePainting(); 334 RunTestWithImplSidePainting();
334 } 335 }
335 336
336 } // namespace 337 } // namespace
337 } // namespace cc 338 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698