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

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

Issue 291843012: compositor: Tick the UI animations from cc, instead of from timer callbacks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 7 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 | Annotate | Revision Log
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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 client_->DidCompleteSwapBuffers(); 336 client_->DidCompleteSwapBuffers();
337 } 337 }
338 338
339 // Called by the legacy scheduling path (e.g. where render_widget does the 339 // Called by the legacy scheduling path (e.g. where render_widget does the
340 // scheduling) 340 // scheduling)
341 void SingleThreadProxy::CompositeImmediately(base::TimeTicks frame_begin_time) { 341 void SingleThreadProxy::CompositeImmediately(base::TimeTicks frame_begin_time) {
342 TRACE_EVENT0("cc", "SingleThreadProxy::CompositeImmediately"); 342 TRACE_EVENT0("cc", "SingleThreadProxy::CompositeImmediately");
343 DCHECK(Proxy::IsMainThread()); 343 DCHECK(Proxy::IsMainThread());
344 DCHECK(!layer_tree_host_->output_surface_lost()); 344 DCHECK(!layer_tree_host_->output_surface_lost());
345 345
346 layer_tree_host_->UpdateClientAnimations(frame_begin_time);
346 layer_tree_host_->AnimateLayers(frame_begin_time); 347 layer_tree_host_->AnimateLayers(frame_begin_time);
347 348
348 if (PrioritizedResourceManager* contents_texture_manager = 349 if (PrioritizedResourceManager* contents_texture_manager =
349 layer_tree_host_->contents_texture_manager()) { 350 layer_tree_host_->contents_texture_manager()) {
350 contents_texture_manager->UnlinkAndClearEvictedBackings(); 351 contents_texture_manager->UnlinkAndClearEvictedBackings();
351 contents_texture_manager->SetMaxMemoryLimitBytes( 352 contents_texture_manager->SetMaxMemoryLimitBytes(
352 layer_tree_host_impl_->memory_allocation_limit_bytes()); 353 layer_tree_host_impl_->memory_allocation_limit_bytes());
353 contents_texture_manager->SetExternalPriorityCutoff( 354 contents_texture_manager->SetExternalPriorityCutoff(
354 layer_tree_host_impl_->memory_allocation_priority_cutoff()); 355 layer_tree_host_impl_->memory_allocation_priority_cutoff());
355 } 356 }
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 void SingleThreadProxy::DidSwapFrame() { 467 void SingleThreadProxy::DidSwapFrame() {
467 if (next_frame_is_newly_committed_frame_) { 468 if (next_frame_is_newly_committed_frame_) {
468 next_frame_is_newly_committed_frame_ = false; 469 next_frame_is_newly_committed_frame_ = false;
469 layer_tree_host_->DidCommitAndDrawFrame(); 470 layer_tree_host_->DidCommitAndDrawFrame();
470 } 471 }
471 } 472 }
472 473
473 bool SingleThreadProxy::CommitPendingForTesting() { return false; } 474 bool SingleThreadProxy::CommitPendingForTesting() { return false; }
474 475
475 } // namespace cc 476 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698