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

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: Created 7 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
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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 layer_tree_host_impl_.reset(); 264 layer_tree_host_impl_.reset();
265 } 265 }
266 layer_tree_host_ = NULL; 266 layer_tree_host_ = NULL;
267 } 267 }
268 268
269 void SingleThreadProxy::OnCanDrawStateChanged(bool can_draw) { 269 void SingleThreadProxy::OnCanDrawStateChanged(bool can_draw) {
270 DCHECK(Proxy::IsImplThread()); 270 DCHECK(Proxy::IsImplThread());
271 layer_tree_host_impl_->UpdateBackgroundAnimateTicking(!ShouldComposite()); 271 layer_tree_host_impl_->UpdateBackgroundAnimateTicking(!ShouldComposite());
272 } 272 }
273 273
274 void SingleThreadProxy::NotifyReadyToActivate() {
275 // Thread-only feature.
276 NOTREACHED();
277 }
278
274 void SingleThreadProxy::SetNeedsRedrawOnImplThread() { 279 void SingleThreadProxy::SetNeedsRedrawOnImplThread() {
275 layer_tree_host_->ScheduleComposite(); 280 layer_tree_host_->ScheduleComposite();
276 } 281 }
277 282
278 void SingleThreadProxy::SetNeedsRedrawRectOnImplThread(gfx::Rect damage_rect) { 283 void SingleThreadProxy::SetNeedsRedrawRectOnImplThread(gfx::Rect damage_rect) {
279 // TODO(brianderson): Once we move render_widget scheduling into this class, 284 // TODO(brianderson): Once we move render_widget scheduling into this class,
280 // we can treat redraw requests more efficiently than CommitAndRedraw 285 // we can treat redraw requests more efficiently than CommitAndRedraw
281 // requests. 286 // requests.
282 layer_tree_host_impl_->SetViewportDamage(damage_rect); 287 layer_tree_host_impl_->SetViewportDamage(damage_rect);
283 SetNeedsCommit(); 288 SetNeedsCommit();
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 void SingleThreadProxy::DidSwapFrame() { 495 void SingleThreadProxy::DidSwapFrame() {
491 if (next_frame_is_newly_committed_frame_) { 496 if (next_frame_is_newly_committed_frame_) {
492 next_frame_is_newly_committed_frame_ = false; 497 next_frame_is_newly_committed_frame_ = false;
493 layer_tree_host_->DidCommitAndDrawFrame(); 498 layer_tree_host_->DidCommitAndDrawFrame();
494 } 499 }
495 } 500 }
496 501
497 bool SingleThreadProxy::CommitPendingForTesting() { return false; } 502 bool SingleThreadProxy::CommitPendingForTesting() { return false; }
498 503
499 } // namespace cc 504 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698