OLD | NEW |
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 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 | 591 |
592 // DoComposite could abort, but because this is a synchronous composite | 592 // DoComposite could abort, but because this is a synchronous composite |
593 // another draw will never be scheduled, so break remaining promises. | 593 // another draw will never be scheduled, so break remaining promises. |
594 layer_tree_host_impl_->active_tree()->BreakSwapPromises( | 594 layer_tree_host_impl_->active_tree()->BreakSwapPromises( |
595 SwapPromise::SWAP_FAILS); | 595 SwapPromise::SWAP_FAILS); |
596 | 596 |
597 DidFinishImplFrame(); | 597 DidFinishImplFrame(); |
598 } | 598 } |
599 } | 599 } |
600 | 600 |
601 void SingleThreadProxy::ForceSerializeOnSwapBuffers() { | |
602 { | |
603 DebugScopedSetImplThread impl(this); | |
604 if (layer_tree_host_impl_->renderer()) { | |
605 DCHECK(!layer_tree_host_->output_surface_lost()); | |
606 layer_tree_host_impl_->renderer()->DoNoOp(); | |
607 } | |
608 } | |
609 } | |
610 | |
611 bool SingleThreadProxy::SupportsImplScrolling() const { | 601 bool SingleThreadProxy::SupportsImplScrolling() const { |
612 return false; | 602 return false; |
613 } | 603 } |
614 | 604 |
615 bool SingleThreadProxy::ShouldComposite() const { | 605 bool SingleThreadProxy::ShouldComposite() const { |
616 DCHECK(Proxy::IsImplThread()); | 606 DCHECK(Proxy::IsImplThread()); |
617 return layer_tree_host_impl_->visible() && | 607 return layer_tree_host_impl_->visible() && |
618 layer_tree_host_impl_->CanDraw(); | 608 layer_tree_host_impl_->CanDraw(); |
619 } | 609 } |
620 | 610 |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
911 << "DidFinishImplFrame called while not inside an impl frame!"; | 901 << "DidFinishImplFrame called while not inside an impl frame!"; |
912 inside_impl_frame_ = false; | 902 inside_impl_frame_ = false; |
913 #endif | 903 #endif |
914 } | 904 } |
915 | 905 |
916 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { | 906 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { |
917 layer_tree_host_->SendBeginFramesToChildren(args); | 907 layer_tree_host_->SendBeginFramesToChildren(args); |
918 } | 908 } |
919 | 909 |
920 } // namespace cc | 910 } // namespace cc |
OLD | NEW |