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

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

Issue 1394263004: android webview: allow cc to fail hardware draw (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: damage before hardware to avoid invalidate-draw loop Created 5 years, 2 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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 // to the main thread for the last frame that we've processed. If that is 359 // to the main thread for the last frame that we've processed. If that is
360 // set, that means the current frame is one past the frame in which we've 360 // set, that means the current frame is one past the frame in which we've
361 // finished the processing. 361 // finished the processing.
362 impl().layer_tree_host_impl->RecordMainFrameTiming( 362 impl().layer_tree_host_impl->RecordMainFrameTiming(
363 impl().last_processed_begin_main_frame_args, 363 impl().last_processed_begin_main_frame_args,
364 impl().layer_tree_host_impl->CurrentBeginFrameArgs()); 364 impl().layer_tree_host_impl->CurrentBeginFrameArgs());
365 impl().last_processed_begin_main_frame_args = BeginFrameArgs(); 365 impl().last_processed_begin_main_frame_args = BeginFrameArgs();
366 } 366 }
367 } 367 }
368 368
369 void ThreadProxy::OnResourcelessSoftareDrawStateChanged(
370 bool resourceless_draw) {
371 DCHECK(IsImplThread());
372 impl().scheduler->SetResourcelessSoftareDraw(resourceless_draw);
373 }
374
369 void ThreadProxy::OnCanDrawStateChanged(bool can_draw) { 375 void ThreadProxy::OnCanDrawStateChanged(bool can_draw) {
370 TRACE_EVENT1( 376 TRACE_EVENT1(
371 "cc", "ThreadProxy::OnCanDrawStateChanged", "can_draw", can_draw); 377 "cc", "ThreadProxy::OnCanDrawStateChanged", "can_draw", can_draw);
372 DCHECK(IsImplThread()); 378 DCHECK(IsImplThread());
373 impl().scheduler->SetCanDraw(can_draw); 379 impl().scheduler->SetCanDraw(can_draw);
374 } 380 }
375 381
376 void ThreadProxy::NotifyReadyToActivate() { 382 void ThreadProxy::NotifyReadyToActivate() {
377 TRACE_EVENT0("cc", "ThreadProxy::NotifyReadyToActivate"); 383 TRACE_EVENT0("cc", "ThreadProxy::NotifyReadyToActivate");
378 impl().scheduler->NotifyReadyToActivate(); 384 impl().scheduler->NotifyReadyToActivate();
(...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after
1264 1270
1265 base::WeakPtr<ProxyMain> ThreadProxy::GetMainWeakPtr() { 1271 base::WeakPtr<ProxyMain> ThreadProxy::GetMainWeakPtr() {
1266 return main_thread_weak_ptr_; 1272 return main_thread_weak_ptr_;
1267 } 1273 }
1268 1274
1269 base::WeakPtr<ProxyImpl> ThreadProxy::GetImplWeakPtr() { 1275 base::WeakPtr<ProxyImpl> ThreadProxy::GetImplWeakPtr() {
1270 return impl_thread_weak_ptr_; 1276 return impl_thread_weak_ptr_;
1271 } 1277 }
1272 1278
1273 } // namespace cc 1279 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/thread_proxy.h ('k') | content/renderer/android/synchronous_compositor_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698