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

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

Issue 68893031: Unifies LayerTreeHost::SetNeedsUpdateLayers and SetNeedsAnimate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: okay let's call it SetNeedsUpdateLayers Created 7 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 | Annotate | Revision Log
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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 358
359 TEST_F(PageScaleImplSidePaintingPerfTest, HeavyPage) { 359 TEST_F(PageScaleImplSidePaintingPerfTest, HeavyPage) {
360 measure_commit_cost_ = true; 360 measure_commit_cost_ = true;
361 SetTestName("heavy_page_page_scale"); 361 SetTestName("heavy_page_page_scale");
362 ReadTestFile("heavy_layer_tree"); 362 ReadTestFile("heavy_layer_tree");
363 RunTestWithImplSidePainting(); 363 RunTestWithImplSidePainting();
364 } 364 }
365 365
366 } // namespace 366 } // namespace
367 } // namespace cc 367 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698