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

Side by Side Diff: cc/test/scheduler_test_common.cc

Issue 1050833002: cc: Remove background ticking from LTHI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase onto master. Created 5 years, 8 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/test/scheduler_test_common.h ('k') | cc/trees/layer_tree_host_unittest_animation.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/test/scheduler_test_common.h" 5 #include "cc/test/scheduler_test_common.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 10
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 DCHECK(!scheduler->vsync_observer_); 91 DCHECK(!scheduler->vsync_observer_);
92 scheduler->vsync_observer_ = synthetic_source.get(); 92 scheduler->vsync_observer_ = synthetic_source.get();
93 93
94 DCHECK(!scheduler->primary_frame_source_internal_); 94 DCHECK(!scheduler->primary_frame_source_internal_);
95 scheduler->primary_frame_source_internal_ = synthetic_source.Pass(); 95 scheduler->primary_frame_source_internal_ = synthetic_source.Pass();
96 return scheduler->primary_frame_source_internal_.get(); 96 return scheduler->primary_frame_source_internal_.get();
97 } 97 }
98 } 98 }
99 99
100 BeginFrameSource* 100 BeginFrameSource*
101 TestSchedulerFrameSourcesConstructor::ConstructBackgroundFrameSource(
102 Scheduler* scheduler) {
103 TRACE_EVENT1(
104 "cc",
105 "TestSchedulerFrameSourcesConstructor::ConstructBackgroundFrameSource",
106 "source",
107 "TestSyntheticBeginFrameSource");
108 DCHECK(!(scheduler->background_frame_source_internal_));
109 scheduler->background_frame_source_internal_ =
110 TestSyntheticBeginFrameSource::Create(
111 now_src_, test_task_runner_, base::TimeDelta::FromSeconds(1));
112 return scheduler->background_frame_source_internal_.get();
113 }
114
115 BeginFrameSource*
116 TestSchedulerFrameSourcesConstructor::ConstructUnthrottledFrameSource( 101 TestSchedulerFrameSourcesConstructor::ConstructUnthrottledFrameSource(
117 Scheduler* scheduler) { 102 Scheduler* scheduler) {
118 TRACE_EVENT1( 103 TRACE_EVENT1(
119 "cc", 104 "cc",
120 "TestSchedulerFrameSourcesConstructor::ConstructUnthrottledFrameSource", 105 "TestSchedulerFrameSourcesConstructor::ConstructUnthrottledFrameSource",
121 "source", "TestBackToBackBeginFrameSource"); 106 "source", "TestBackToBackBeginFrameSource");
122 DCHECK(!scheduler->unthrottled_frame_source_internal_); 107 DCHECK(!scheduler->unthrottled_frame_source_internal_);
123 scheduler->unthrottled_frame_source_internal_ = 108 scheduler->unthrottled_frame_source_internal_ =
124 TestBackToBackBeginFrameSource::Create(now_src_, test_task_runner_); 109 TestBackToBackBeginFrameSource::Create(now_src_, test_task_runner_);
125 return scheduler->unthrottled_frame_source_internal_.get(); 110 return scheduler->unthrottled_frame_source_internal_.get();
(...skipping 17 matching lines...) Expand all
143 } 128 }
144 129
145 base::TimeTicks TestScheduler::Now() const { 130 base::TimeTicks TestScheduler::Now() const {
146 return now_src_->Now(); 131 return now_src_->Now();
147 } 132 }
148 133
149 TestScheduler::~TestScheduler() { 134 TestScheduler::~TestScheduler() {
150 } 135 }
151 136
152 } // namespace cc 137 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/scheduler_test_common.h ('k') | cc/trees/layer_tree_host_unittest_animation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698