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

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

Issue 133263004: Unifies LayerTreeHost::SetNeedsUpdateLayers and SetNeedsAnimate -- V2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mojo build Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « cc/trees/layer_tree_host.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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 settings->throttle_frame_production = false; 48 settings->throttle_frame_production = false;
49 } 49 }
50 50
51 virtual void BeginTest() OVERRIDE { 51 virtual void BeginTest() OVERRIDE {
52 BuildTree(); 52 BuildTree();
53 PostSetNeedsCommitToMainThread(); 53 PostSetNeedsCommitToMainThread();
54 } 54 }
55 55
56 virtual void Animate(base::TimeTicks monotonic_time) OVERRIDE { 56 virtual void Animate(base::TimeTicks monotonic_time) OVERRIDE {
57 if (animation_driven_drawing_ && !TestEnded()) 57 if (animation_driven_drawing_ && !TestEnded())
58 layer_tree_host()->SetNeedsAnimate(); 58 layer_tree_host()->SetNeedsUpdateLayers();
59 } 59 }
60 60
61 virtual void BeginCommitOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { 61 virtual void BeginCommitOnThread(LayerTreeHostImpl* host_impl) OVERRIDE {
62 if (measure_commit_cost_) 62 if (measure_commit_cost_)
63 commit_timer_.Start(); 63 commit_timer_.Start();
64 } 64 }
65 65
66 virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { 66 virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) OVERRIDE {
67 if (measure_commit_cost_ && draw_timer_.IsWarmedUp()) { 67 if (measure_commit_cost_ && draw_timer_.IsWarmedUp()) {
68 commit_timer_.NextLap(); 68 commit_timer_.NextLap();
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 388
389 TEST_F(PageScaleImplSidePaintingPerfTest, HeavyPage) { 389 TEST_F(PageScaleImplSidePaintingPerfTest, HeavyPage) {
390 measure_commit_cost_ = true; 390 measure_commit_cost_ = true;
391 SetTestName("heavy_page_page_scale"); 391 SetTestName("heavy_page_page_scale");
392 ReadTestFile("heavy_layer_tree"); 392 ReadTestFile("heavy_layer_tree");
393 RunTestWithImplSidePainting(); 393 RunTestWithImplSidePainting();
394 } 394 }
395 395
396 } // namespace 396 } // namespace
397 } // namespace cc 397 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698