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

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

Issue 903273002: Update from https://crrev.com/315085 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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.cc ('k') | crypto/openssl_util.cc » ('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/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 778 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 bool can_cancel_this_commit = 789 bool can_cancel_this_commit =
790 main().can_cancel_commit && !begin_main_frame_state->evicted_ui_resources; 790 main().can_cancel_commit && !begin_main_frame_state->evicted_ui_resources;
791 main().can_cancel_commit = true; 791 main().can_cancel_commit = true;
792 792
793 scoped_ptr<ResourceUpdateQueue> queue = 793 scoped_ptr<ResourceUpdateQueue> queue =
794 make_scoped_ptr(new ResourceUpdateQueue); 794 make_scoped_ptr(new ResourceUpdateQueue);
795 795
796 bool updated = layer_tree_host()->UpdateLayers(queue.get()); 796 bool updated = layer_tree_host()->UpdateLayers(queue.get());
797 797
798 layer_tree_host()->WillCommit(); 798 layer_tree_host()->WillCommit();
799 devtools_instrumentation::ScopedCommitTrace commit_task(
800 layer_tree_host()->id());
799 801
800 // Before calling animate, we set main().animate_requested to false. If it is 802 // Before calling animate, we set main().animate_requested to false. If it is
801 // true now, it means SetNeedAnimate was called again, but during a state when 803 // true now, it means SetNeedAnimate was called again, but during a state when
802 // main().commit_request_sent_to_impl_thread = true. We need to force that 804 // main().commit_request_sent_to_impl_thread = true. We need to force that
803 // call to happen again now so that the commit request is sent to the impl 805 // call to happen again now so that the commit request is sent to the impl
804 // thread. 806 // thread.
805 if (main().animate_requested) { 807 if (main().animate_requested) {
806 // Forces SetNeedsAnimate to consider posting a commit task. 808 // Forces SetNeedsAnimate to consider posting a commit task.
807 main().animate_requested = false; 809 main().animate_requested = false;
808 SetNeedsAnimate(); 810 SetNeedsAnimate();
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
1365 } 1367 }
1366 1368
1367 void ThreadProxy::DidCompletePageScaleAnimationOnImplThread() { 1369 void ThreadProxy::DidCompletePageScaleAnimationOnImplThread() {
1368 DCHECK(IsImplThread()); 1370 DCHECK(IsImplThread());
1369 Proxy::MainThreadTaskRunner()->PostTask( 1371 Proxy::MainThreadTaskRunner()->PostTask(
1370 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation, 1372 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation,
1371 main_thread_weak_ptr_)); 1373 main_thread_weak_ptr_));
1372 } 1374 }
1373 1375
1374 } // namespace cc 1376 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/single_thread_proxy.cc ('k') | crypto/openssl_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698