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

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

Issue 22926024: cc: Control activation from the Scheduler (Closed) Base URL: http://git.chromium.org/chromium/src.git@schedOutputSurface4
Patch Set: git cl format Created 7 years, 3 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/single_thread_proxy.h ('k') | cc/trees/thread_proxy.h » ('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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/single_thread_proxy.h" 5 #include "cc/trees/single_thread_proxy.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "cc/output/context_provider.h" 9 #include "cc/output/context_provider.h"
10 #include "cc/output/output_surface.h" 10 #include "cc/output/output_surface.h"
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 229
230 void SingleThreadProxy::SetNeedsCommit() { 230 void SingleThreadProxy::SetNeedsCommit() {
231 DCHECK(Proxy::IsMainThread()); 231 DCHECK(Proxy::IsMainThread());
232 layer_tree_host_->ScheduleComposite(); 232 layer_tree_host_->ScheduleComposite();
233 } 233 }
234 234
235 void SingleThreadProxy::SetNeedsRedraw(gfx::Rect damage_rect) { 235 void SingleThreadProxy::SetNeedsRedraw(gfx::Rect damage_rect) {
236 SetNeedsRedrawRectOnImplThread(damage_rect); 236 SetNeedsRedrawRectOnImplThread(damage_rect);
237 } 237 }
238 238
239 void SingleThreadProxy::OnHasPendingTreeStateChanged(bool have_pending_tree) {
240 // Thread-only feature.
241 NOTREACHED();
242 }
243
244 void SingleThreadProxy::SetDeferCommits(bool defer_commits) { 239 void SingleThreadProxy::SetDeferCommits(bool defer_commits) {
245 // Thread-only feature. 240 // Thread-only feature.
246 NOTREACHED(); 241 NOTREACHED();
247 } 242 }
248 243
249 bool SingleThreadProxy::CommitRequested() const { return false; } 244 bool SingleThreadProxy::CommitRequested() const { return false; }
250 245
251 size_t SingleThreadProxy::MaxPartialTextureUpdates() const { 246 size_t SingleThreadProxy::MaxPartialTextureUpdates() const {
252 return std::numeric_limits<size_t>::max(); 247 return std::numeric_limits<size_t>::max();
253 } 248 }
(...skipping 10 matching lines...) Expand all
264 layer_tree_host_impl_.reset(); 259 layer_tree_host_impl_.reset();
265 } 260 }
266 layer_tree_host_ = NULL; 261 layer_tree_host_ = NULL;
267 } 262 }
268 263
269 void SingleThreadProxy::OnCanDrawStateChanged(bool can_draw) { 264 void SingleThreadProxy::OnCanDrawStateChanged(bool can_draw) {
270 DCHECK(Proxy::IsImplThread()); 265 DCHECK(Proxy::IsImplThread());
271 layer_tree_host_impl_->UpdateBackgroundAnimateTicking(!ShouldComposite()); 266 layer_tree_host_impl_->UpdateBackgroundAnimateTicking(!ShouldComposite());
272 } 267 }
273 268
269 void SingleThreadProxy::NotifyReadyToActivate() {
270 // Thread-only feature.
271 NOTREACHED();
272 }
273
274 void SingleThreadProxy::SetNeedsRedrawOnImplThread() { 274 void SingleThreadProxy::SetNeedsRedrawOnImplThread() {
275 layer_tree_host_->ScheduleComposite(); 275 layer_tree_host_->ScheduleComposite();
276 } 276 }
277 277
278 void SingleThreadProxy::SetNeedsRedrawRectOnImplThread(gfx::Rect damage_rect) { 278 void SingleThreadProxy::SetNeedsRedrawRectOnImplThread(gfx::Rect damage_rect) {
279 // TODO(brianderson): Once we move render_widget scheduling into this class, 279 // TODO(brianderson): Once we move render_widget scheduling into this class,
280 // we can treat redraw requests more efficiently than CommitAndRedraw 280 // we can treat redraw requests more efficiently than CommitAndRedraw
281 // requests. 281 // requests.
282 layer_tree_host_impl_->SetViewportDamage(damage_rect); 282 layer_tree_host_impl_->SetViewportDamage(damage_rect);
283 SetNeedsCommit(); 283 SetNeedsCommit();
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 void SingleThreadProxy::DidSwapFrame() { 490 void SingleThreadProxy::DidSwapFrame() {
491 if (next_frame_is_newly_committed_frame_) { 491 if (next_frame_is_newly_committed_frame_) {
492 next_frame_is_newly_committed_frame_ = false; 492 next_frame_is_newly_committed_frame_ = false;
493 layer_tree_host_->DidCommitAndDrawFrame(); 493 layer_tree_host_->DidCommitAndDrawFrame();
494 } 494 }
495 } 495 }
496 496
497 bool SingleThreadProxy::CommitPendingForTesting() { return false; } 497 bool SingleThreadProxy::CommitPendingForTesting() { return false; }
498 498
499 } // namespace cc 499 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/single_thread_proxy.h ('k') | cc/trees/thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698