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

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

Issue 347483002: Removing the animate step from DoSwapInternal as it happens in the ScheduleAnimate method now. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase onto master. Created 6 years, 5 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
« no previous file with comments | « cc/trees/layer_tree_host_unittest_animation.cc ('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 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after
1045 TRACE_EVENT_SYNTHETIC_DELAY("cc.DrawAndSwap"); 1045 TRACE_EVENT_SYNTHETIC_DELAY("cc.DrawAndSwap");
1046 DrawResult result; 1046 DrawResult result;
1047 1047
1048 DCHECK(IsImplThread()); 1048 DCHECK(IsImplThread());
1049 DCHECK(impl().layer_tree_host_impl.get()); 1049 DCHECK(impl().layer_tree_host_impl.get());
1050 1050
1051 impl().timing_history.DidStartDrawing(); 1051 impl().timing_history.DidStartDrawing();
1052 base::TimeDelta draw_duration_estimate = DrawDurationEstimate(); 1052 base::TimeDelta draw_duration_estimate = DrawDurationEstimate();
1053 base::AutoReset<bool> mark_inside(&impl().inside_draw, true); 1053 base::AutoReset<bool> mark_inside(&impl().inside_draw, true);
1054 1054
1055 if (impl().did_commit_after_animating) {
1056 impl().layer_tree_host_impl->Animate(impl().animation_time);
1057 impl().did_commit_after_animating = false;
1058 }
1059
1060 if (impl().layer_tree_host_impl->pending_tree()) 1055 if (impl().layer_tree_host_impl->pending_tree())
1061 impl().layer_tree_host_impl->pending_tree()->UpdateDrawProperties(); 1056 impl().layer_tree_host_impl->pending_tree()->UpdateDrawProperties();
1062 1057
1063 // This method is called on a forced draw, regardless of whether we are able 1058 // This method is called on a forced draw, regardless of whether we are able
1064 // to produce a frame, as the calling site on main thread is blocked until its 1059 // to produce a frame, as the calling site on main thread is blocked until its
1065 // request completes, and we signal completion here. If CanDraw() is false, we 1060 // request completes, and we signal completion here. If CanDraw() is false, we
1066 // will indicate success=false to the caller, but we must still signal 1061 // will indicate success=false to the caller, but we must still signal
1067 // completion to avoid deadlock. 1062 // completion to avoid deadlock.
1068 1063
1069 // We guard PrepareToDraw() with CanDraw() because it always returns a valid 1064 // We guard PrepareToDraw() with CanDraw() because it always returns a valid
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
1447 1442
1448 impl().timing_history.DidActivateSyncTree(); 1443 impl().timing_history.DidActivateSyncTree();
1449 } 1444 }
1450 1445
1451 void ThreadProxy::DidManageTiles() { 1446 void ThreadProxy::DidManageTiles() {
1452 DCHECK(IsImplThread()); 1447 DCHECK(IsImplThread());
1453 impl().scheduler->DidManageTiles(); 1448 impl().scheduler->DidManageTiles();
1454 } 1449 }
1455 1450
1456 } // namespace cc 1451 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest_animation.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698