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

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

Issue 16925007: Fix scrollbar fade animation scheduling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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/thread_proxy.h" 5 #include "cc/trees/thread_proxy.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "cc/base/thread.h" 10 #include "cc/base/thread.h"
(...skipping 1346 matching lines...) Expand 10 before | Expand all | Expand 10 after
1357 } 1357 }
1358 1358
1359 void ThreadProxy::RequestScrollbarAnimationOnImplThread(base::TimeDelta delay) { 1359 void ThreadProxy::RequestScrollbarAnimationOnImplThread(base::TimeDelta delay) {
1360 Proxy::ImplThread()->PostDelayedTask( 1360 Proxy::ImplThread()->PostDelayedTask(
1361 base::Bind(&ThreadProxy::StartScrollbarAnimationOnImplThread, 1361 base::Bind(&ThreadProxy::StartScrollbarAnimationOnImplThread,
1362 impl_thread_weak_ptr_), 1362 impl_thread_weak_ptr_),
1363 delay); 1363 delay);
1364 } 1364 }
1365 1365
1366 void ThreadProxy::StartScrollbarAnimationOnImplThread() { 1366 void ThreadProxy::StartScrollbarAnimationOnImplThread() {
1367 layer_tree_host_impl_->StartScrollbarAnimation( 1367 layer_tree_host_impl_->StartScrollbarAnimation();
1368 layer_tree_host_impl_->CurrentFrameTimeTicks());
1369 } 1368 }
1370 1369
1371 void ThreadProxy::DidActivatePendingTree() { 1370 void ThreadProxy::DidActivatePendingTree() {
1372 DCHECK(IsImplThread()); 1371 DCHECK(IsImplThread());
1373 TRACE_EVENT0("cc", "ThreadProxy::DidActivatePendingTreeOnImplThread"); 1372 TRACE_EVENT0("cc", "ThreadProxy::DidActivatePendingTreeOnImplThread");
1374 1373
1375 if (completion_event_for_commit_held_on_tree_activation_ && 1374 if (completion_event_for_commit_held_on_tree_activation_ &&
1376 !layer_tree_host_impl_->pending_tree()) { 1375 !layer_tree_host_impl_->pending_tree()) {
1377 TRACE_EVENT_INSTANT0("cc", "ReleaseCommitbyActivation", 1376 TRACE_EVENT_INSTANT0("cc", "ReleaseCommitbyActivation",
1378 TRACE_EVENT_SCOPE_THREAD); 1377 TRACE_EVENT_SCOPE_THREAD);
1379 DCHECK(layer_tree_host_impl_->settings().impl_side_painting); 1378 DCHECK(layer_tree_host_impl_->settings().impl_side_painting);
1380 completion_event_for_commit_held_on_tree_activation_->Signal(); 1379 completion_event_for_commit_held_on_tree_activation_->Signal();
1381 completion_event_for_commit_held_on_tree_activation_ = NULL; 1380 completion_event_for_commit_held_on_tree_activation_ = NULL;
1382 } 1381 }
1383 } 1382 }
1384 1383
1385 } // namespace cc 1384 } // namespace cc
OLDNEW
« cc/trees/layer_tree_host_impl_unittest.cc ('K') | « cc/trees/layer_tree_settings.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698