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

Side by Side Diff: cc/trees/single_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
« no previous file with comments | « cc/trees/single_thread_proxy.h ('k') | cc/trees/thread_proxy.h » ('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/single_thread_proxy.h" 5 #include "cc/trees/single_thread_proxy.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/profiler/scoped_tracker.h" 8 #include "base/profiler/scoped_tracker.h"
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "cc/debug/benchmark_instrumentation.h" 10 #include "cc/debug/benchmark_instrumentation.h"
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 DebugScopedSetImplThread impl(this); 347 DebugScopedSetImplThread impl(this);
348 348
349 BlockingTaskRunner::CapturePostTasks blocked( 349 BlockingTaskRunner::CapturePostTasks blocked(
350 blocking_main_thread_task_runner()); 350 blocking_main_thread_task_runner());
351 scheduler_on_impl_thread_ = nullptr; 351 scheduler_on_impl_thread_ = nullptr;
352 layer_tree_host_impl_ = nullptr; 352 layer_tree_host_impl_ = nullptr;
353 } 353 }
354 layer_tree_host_ = NULL; 354 layer_tree_host_ = NULL;
355 } 355 }
356 356
357 void SingleThreadProxy::OnResourcelessSoftareDrawStateChanged(
358 bool resourceless_draw) {
359 NOTREACHED();
360 }
361
357 void SingleThreadProxy::OnCanDrawStateChanged(bool can_draw) { 362 void SingleThreadProxy::OnCanDrawStateChanged(bool can_draw) {
358 TRACE_EVENT1( 363 TRACE_EVENT1(
359 "cc", "SingleThreadProxy::OnCanDrawStateChanged", "can_draw", can_draw); 364 "cc", "SingleThreadProxy::OnCanDrawStateChanged", "can_draw", can_draw);
360 DCHECK(Proxy::IsImplThread()); 365 DCHECK(Proxy::IsImplThread());
361 if (scheduler_on_impl_thread_) 366 if (scheduler_on_impl_thread_)
362 scheduler_on_impl_thread_->SetCanDraw(can_draw); 367 scheduler_on_impl_thread_->SetCanDraw(can_draw);
363 } 368 }
364 369
365 void SingleThreadProxy::NotifyReadyToActivate() { 370 void SingleThreadProxy::NotifyReadyToActivate() {
366 TRACE_EVENT0("cc", "SingleThreadProxy::NotifyReadyToActivate"); 371 TRACE_EVENT0("cc", "SingleThreadProxy::NotifyReadyToActivate");
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 << "DidFinishImplFrame called while not inside an impl frame!"; 898 << "DidFinishImplFrame called while not inside an impl frame!";
894 inside_impl_frame_ = false; 899 inside_impl_frame_ = false;
895 #endif 900 #endif
896 } 901 }
897 902
898 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { 903 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) {
899 layer_tree_host_->SendBeginFramesToChildren(args); 904 layer_tree_host_->SendBeginFramesToChildren(args);
900 } 905 }
901 906
902 } // namespace cc 907 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/single_thread_proxy.h ('k') | cc/trees/thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698