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

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

Issue 194543002: Removing base::Time from SetAnimationEvents and PostAnimationEventsToMainThreadOnImplThread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing unused last_animation_time_ as well. Created 6 years, 9 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/thread_proxy.h ('k') | no next file » | 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/thread_proxy.h" 5 #include "cc/trees/thread_proxy.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 impl().scheduler->NotifyReadyToActivate(); 474 impl().scheduler->NotifyReadyToActivate();
475 } 475 }
476 476
477 void ThreadProxy::SetNeedsCommitOnImplThread() { 477 void ThreadProxy::SetNeedsCommitOnImplThread() {
478 TRACE_EVENT0("cc", "ThreadProxy::SetNeedsCommitOnImplThread"); 478 TRACE_EVENT0("cc", "ThreadProxy::SetNeedsCommitOnImplThread");
479 DCHECK(IsImplThread()); 479 DCHECK(IsImplThread());
480 impl().scheduler->SetNeedsCommit(); 480 impl().scheduler->SetNeedsCommit();
481 } 481 }
482 482
483 void ThreadProxy::PostAnimationEventsToMainThreadOnImplThread( 483 void ThreadProxy::PostAnimationEventsToMainThreadOnImplThread(
484 scoped_ptr<AnimationEventsVector> events, 484 scoped_ptr<AnimationEventsVector> events) {
485 base::Time wall_clock_time) {
486 TRACE_EVENT0("cc", 485 TRACE_EVENT0("cc",
487 "ThreadProxy::PostAnimationEventsToMainThreadOnImplThread"); 486 "ThreadProxy::PostAnimationEventsToMainThreadOnImplThread");
488 DCHECK(IsImplThread()); 487 DCHECK(IsImplThread());
489 Proxy::MainThreadTaskRunner()->PostTask( 488 Proxy::MainThreadTaskRunner()->PostTask(
490 FROM_HERE, 489 FROM_HERE,
491 base::Bind(&ThreadProxy::SetAnimationEvents, 490 base::Bind(&ThreadProxy::SetAnimationEvents,
492 main_thread_weak_ptr_, 491 main_thread_weak_ptr_,
493 base::Passed(&events), 492 base::Passed(&events)));
494 wall_clock_time));
495 } 493 }
496 494
497 bool ThreadProxy::ReduceContentsTextureMemoryOnImplThread(size_t limit_bytes, 495 bool ThreadProxy::ReduceContentsTextureMemoryOnImplThread(size_t limit_bytes,
498 int priority_cutoff) { 496 int priority_cutoff) {
499 DCHECK(IsImplThread()); 497 DCHECK(IsImplThread());
500 498
501 if (!impl().contents_texture_manager) 499 if (!impl().contents_texture_manager)
502 return false; 500 return false;
503 if (!impl().layer_tree_host_impl->resource_provider()) 501 if (!impl().layer_tree_host_impl->resource_provider())
504 return false; 502 return false;
(...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after
1413 layer_tree_host()->DidCommitAndDrawFrame(); 1411 layer_tree_host()->DidCommitAndDrawFrame();
1414 } 1412 }
1415 1413
1416 void ThreadProxy::DidCompleteSwapBuffers() { 1414 void ThreadProxy::DidCompleteSwapBuffers() {
1417 DCHECK(IsMainThread()); 1415 DCHECK(IsMainThread());
1418 if (!layer_tree_host()) 1416 if (!layer_tree_host())
1419 return; 1417 return;
1420 layer_tree_host()->DidCompleteSwapBuffers(); 1418 layer_tree_host()->DidCompleteSwapBuffers();
1421 } 1419 }
1422 1420
1423 void ThreadProxy::SetAnimationEvents(scoped_ptr<AnimationEventsVector> events, 1421 void ThreadProxy::SetAnimationEvents(scoped_ptr<AnimationEventsVector> events) {
1424 base::Time wall_clock_time) {
1425 TRACE_EVENT0("cc", "ThreadProxy::SetAnimationEvents"); 1422 TRACE_EVENT0("cc", "ThreadProxy::SetAnimationEvents");
1426 DCHECK(IsMainThread()); 1423 DCHECK(IsMainThread());
1427 if (!layer_tree_host()) 1424 if (!layer_tree_host())
1428 return; 1425 return;
1429 layer_tree_host()->SetAnimationEvents(events.Pass(), wall_clock_time); 1426 layer_tree_host()->SetAnimationEvents(events.Pass());
1430 } 1427 }
1431 1428
1432 void ThreadProxy::CreateAndInitializeOutputSurface() { 1429 void ThreadProxy::CreateAndInitializeOutputSurface() {
1433 TRACE_EVENT0("cc", "ThreadProxy::CreateAndInitializeOutputSurface"); 1430 TRACE_EVENT0("cc", "ThreadProxy::CreateAndInitializeOutputSurface");
1434 DCHECK(IsMainThread()); 1431 DCHECK(IsMainThread());
1435 1432
1436 // Check that output surface has not been recreated by CompositeAndReadback 1433 // Check that output surface has not been recreated by CompositeAndReadback
1437 // after this task is posted but before it is run. 1434 // after this task is posted but before it is run.
1438 bool has_initialized_output_surface = true; 1435 bool has_initialized_output_surface = true;
1439 { 1436 {
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
1735 1732
1736 impl().timing_history.DidActivatePendingTree(); 1733 impl().timing_history.DidActivatePendingTree();
1737 } 1734 }
1738 1735
1739 void ThreadProxy::DidManageTiles() { 1736 void ThreadProxy::DidManageTiles() {
1740 DCHECK(IsImplThread()); 1737 DCHECK(IsImplThread());
1741 impl().scheduler->DidManageTiles(); 1738 impl().scheduler->DidManageTiles();
1742 } 1739 }
1743 1740
1744 } // namespace cc 1741 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/thread_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698