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

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

Issue 913203006: cc: Calculate "can use lcd text" on the compositor thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Param passed to UDP 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
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 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after
1026 DrawResult ThreadProxy::DrawSwapInternal(bool forced_draw) { 1026 DrawResult ThreadProxy::DrawSwapInternal(bool forced_draw) {
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 impl().layer_tree_host_impl->pending_tree()->UpdateDrawProperties(); 1037 bool update_lcd_text = false;
1038 impl().layer_tree_host_impl->pending_tree()->UpdateDrawProperties(
1039 update_lcd_text);
1040 }
1038 1041
1039 // 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
1040 // 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
1041 // 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
1042 // 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
1043 // completion to avoid deadlock. 1046 // completion to avoid deadlock.
1044 1047
1045 // We guard PrepareToDraw() with CanDraw() because it always returns a valid 1048 // We guard PrepareToDraw() with CanDraw() because it always returns a valid
1046 // 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
1047 // DrawLayers() depends on the result of PrepareToDraw(), it is guarded on 1050 // DrawLayers() depends on the result of PrepareToDraw(), it is guarded on
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
1386 } 1389 }
1387 1390
1388 void ThreadProxy::DidCompletePageScaleAnimationOnImplThread() { 1391 void ThreadProxy::DidCompletePageScaleAnimationOnImplThread() {
1389 DCHECK(IsImplThread()); 1392 DCHECK(IsImplThread());
1390 Proxy::MainThreadTaskRunner()->PostTask( 1393 Proxy::MainThreadTaskRunner()->PostTask(
1391 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation, 1394 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation,
1392 main_thread_weak_ptr_)); 1395 main_thread_weak_ptr_));
1393 } 1396 }
1394 1397
1395 } // namespace cc 1398 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698