| 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/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "base/profiler/scoped_tracker.h" | 9 #include "base/profiler/scoped_tracker.h" |
| 10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 if (scheduler_on_impl_thread_) | 417 if (scheduler_on_impl_thread_) |
| 418 scheduler_on_impl_thread_->DidReceiveCompositorFrameAck(); | 418 scheduler_on_impl_thread_->DidReceiveCompositorFrameAck(); |
| 419 layer_tree_host_->DidReceiveCompositorFrameAck(); | 419 layer_tree_host_->DidReceiveCompositorFrameAck(); |
| 420 } | 420 } |
| 421 | 421 |
| 422 void SingleThreadProxy::OnDrawForCompositorFrameSink( | 422 void SingleThreadProxy::OnDrawForCompositorFrameSink( |
| 423 bool resourceless_software_draw) { | 423 bool resourceless_software_draw) { |
| 424 NOTREACHED() << "Implemented by ThreadProxy for synchronous compositor."; | 424 NOTREACHED() << "Implemented by ThreadProxy for synchronous compositor."; |
| 425 } | 425 } |
| 426 | 426 |
| 427 void SingleThreadProxy::NeedsImplSideInvalidation() { |
| 428 NOTIMPLEMENTED(); |
| 429 } |
| 430 |
| 427 void SingleThreadProxy::CompositeImmediately(base::TimeTicks frame_begin_time) { | 431 void SingleThreadProxy::CompositeImmediately(base::TimeTicks frame_begin_time) { |
| 428 TRACE_EVENT0("cc,benchmark", "SingleThreadProxy::CompositeImmediately"); | 432 TRACE_EVENT0("cc,benchmark", "SingleThreadProxy::CompositeImmediately"); |
| 429 DCHECK(task_runner_provider_->IsMainThread()); | 433 DCHECK(task_runner_provider_->IsMainThread()); |
| 430 #if DCHECK_IS_ON() | 434 #if DCHECK_IS_ON() |
| 431 DCHECK(!inside_impl_frame_); | 435 DCHECK(!inside_impl_frame_); |
| 432 #endif | 436 #endif |
| 433 base::AutoReset<bool> inside_composite(&inside_synchronous_composite_, true); | 437 base::AutoReset<bool> inside_composite(&inside_synchronous_composite_, true); |
| 434 | 438 |
| 435 if (compositor_frame_sink_lost_) { | 439 if (compositor_frame_sink_lost_) { |
| 436 RequestNewCompositorFrameSink(); | 440 RequestNewCompositorFrameSink(); |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 735 void SingleThreadProxy::DidFinishImplFrame() { | 739 void SingleThreadProxy::DidFinishImplFrame() { |
| 736 layer_tree_host_impl_->DidFinishImplFrame(); | 740 layer_tree_host_impl_->DidFinishImplFrame(); |
| 737 #if DCHECK_IS_ON() | 741 #if DCHECK_IS_ON() |
| 738 DCHECK(inside_impl_frame_) | 742 DCHECK(inside_impl_frame_) |
| 739 << "DidFinishImplFrame called while not inside an impl frame!"; | 743 << "DidFinishImplFrame called while not inside an impl frame!"; |
| 740 inside_impl_frame_ = false; | 744 inside_impl_frame_ = false; |
| 741 #endif | 745 #endif |
| 742 } | 746 } |
| 743 | 747 |
| 744 } // namespace cc | 748 } // namespace cc |
| OLD | NEW |