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

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

Issue 199523002: cc: Throttle swaps in Scheduler instead of OutputSurface (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Actually, unittests need CC_EXPORT. Created 6 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/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/debug/benchmark_instrumentation.h" 9 #include "cc/debug/benchmark_instrumentation.h"
10 #include "cc/output/context_provider.h" 10 #include "cc/output/context_provider.h"
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 TRACE_EVENT0("cc", "SingleThreadProxy::DidLoseOutputSurfaceOnImplThread"); 375 TRACE_EVENT0("cc", "SingleThreadProxy::DidLoseOutputSurfaceOnImplThread");
376 // Cause a commit so we can notice the lost context. 376 // Cause a commit so we can notice the lost context.
377 SetNeedsCommitOnImplThread(); 377 SetNeedsCommitOnImplThread();
378 client_->DidAbortSwapBuffers(); 378 client_->DidAbortSwapBuffers();
379 } 379 }
380 380
381 void SingleThreadProxy::DidSwapBuffersOnImplThread() { 381 void SingleThreadProxy::DidSwapBuffersOnImplThread() {
382 client_->DidPostSwapBuffers(); 382 client_->DidPostSwapBuffers();
383 } 383 }
384 384
385 void SingleThreadProxy::OnSwapBuffersCompleteOnImplThread() { 385 void SingleThreadProxy::DidSwapBuffersCompleteOnImplThread() {
386 TRACE_EVENT0("cc", "SingleThreadProxy::OnSwapBuffersCompleteOnImplThread"); 386 TRACE_EVENT0("cc", "SingleThreadProxy::DidSwapBuffersCompleteOnImplThread");
387 client_->DidCompleteSwapBuffers(); 387 client_->DidCompleteSwapBuffers();
388 } 388 }
389 389
390 // Called by the legacy scheduling path (e.g. where render_widget does the 390 // Called by the legacy scheduling path (e.g. where render_widget does the
391 // scheduling) 391 // scheduling)
392 void SingleThreadProxy::CompositeImmediately(base::TimeTicks frame_begin_time) { 392 void SingleThreadProxy::CompositeImmediately(base::TimeTicks frame_begin_time) {
393 TRACE_EVENT0("cc", "SingleThreadProxy::CompositeImmediately"); 393 TRACE_EVENT0("cc", "SingleThreadProxy::CompositeImmediately");
394 gfx::Rect device_viewport_damage_rect; 394 gfx::Rect device_viewport_damage_rect;
395 395
396 LayerTreeHostImpl::FrameData frame; 396 LayerTreeHostImpl::FrameData frame;
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 void SingleThreadProxy::DidSwapFrame() { 564 void SingleThreadProxy::DidSwapFrame() {
565 if (next_frame_is_newly_committed_frame_) { 565 if (next_frame_is_newly_committed_frame_) {
566 next_frame_is_newly_committed_frame_ = false; 566 next_frame_is_newly_committed_frame_ = false;
567 layer_tree_host_->DidCommitAndDrawFrame(); 567 layer_tree_host_->DidCommitAndDrawFrame();
568 } 568 }
569 } 569 }
570 570
571 bool SingleThreadProxy::CommitPendingForTesting() { return false; } 571 bool SingleThreadProxy::CommitPendingForTesting() { return false; }
572 572
573 } // namespace cc 573 } // 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