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

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

Issue 1013273003: cc: Force an update on tile size after viewport resize (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: attempt 3? Created 5 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
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 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after
1027 TRACE_EVENT_SYNTHETIC_DELAY("cc.DrawAndSwap"); 1027 TRACE_EVENT_SYNTHETIC_DELAY("cc.DrawAndSwap");
1028 DrawResult result; 1028 DrawResult result;
1029 1029
1030 DCHECK(IsImplThread()); 1030 DCHECK(IsImplThread());
1031 DCHECK(impl().layer_tree_host_impl.get()); 1031 DCHECK(impl().layer_tree_host_impl.get());
1032 1032
1033 impl().timing_history.DidStartDrawing(); 1033 impl().timing_history.DidStartDrawing();
1034 base::AutoReset<bool> mark_inside(&impl().inside_draw, true); 1034 base::AutoReset<bool> mark_inside(&impl().inside_draw, true);
1035 1035
1036 if (impl().layer_tree_host_impl->pending_tree()) { 1036 if (impl().layer_tree_host_impl->pending_tree()) {
1037 bool update_lcd_text = false; 1037 bool first_update_after_commit = false;
1038 impl().layer_tree_host_impl->pending_tree()->UpdateDrawProperties( 1038 impl().layer_tree_host_impl->pending_tree()->UpdateDrawProperties(
1039 update_lcd_text); 1039 first_update_after_commit);
1040 } 1040 }
1041 1041
1042 // This method is called on a forced draw, regardless of whether we are able 1042 // This method is called on a forced draw, regardless of whether we are able
1043 // to produce a frame, as the calling site on main thread is blocked until its 1043 // to produce a frame, as the calling site on main thread is blocked until its
1044 // request completes, and we signal completion here. If CanDraw() is false, we 1044 // request completes, and we signal completion here. If CanDraw() is false, we
1045 // will indicate success=false to the caller, but we must still signal 1045 // will indicate success=false to the caller, but we must still signal
1046 // completion to avoid deadlock. 1046 // completion to avoid deadlock.
1047 1047
1048 // We guard PrepareToDraw() with CanDraw() because it always returns a valid 1048 // We guard PrepareToDraw() with CanDraw() because it always returns a valid
1049 // frame, so can only be used when such a frame is possible. Since 1049 // frame, so can only be used when such a frame is possible. Since
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
1388 } 1388 }
1389 1389
1390 void ThreadProxy::DidCompletePageScaleAnimationOnImplThread() { 1390 void ThreadProxy::DidCompletePageScaleAnimationOnImplThread() {
1391 DCHECK(IsImplThread()); 1391 DCHECK(IsImplThread());
1392 Proxy::MainThreadTaskRunner()->PostTask( 1392 Proxy::MainThreadTaskRunner()->PostTask(
1393 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation, 1393 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation,
1394 main_thread_weak_ptr_)); 1394 main_thread_weak_ptr_));
1395 } 1395 }
1396 1396
1397 } // namespace cc 1397 } // namespace cc
OLDNEW
« cc/trees/layer_tree_impl.cc ('K') | « cc/trees/occlusion_tracker_perftest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698