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/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
9 #include "cc/debug/benchmark_instrumentation.h" | 9 #include "cc/debug/benchmark_instrumentation.h" |
10 #include "cc/output/context_provider.h" | 10 #include "cc/output/context_provider.h" |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 void SingleThreadProxy::ForceSerializeOnSwapBuffers() { | 384 void SingleThreadProxy::ForceSerializeOnSwapBuffers() { |
385 { | 385 { |
386 DebugScopedSetImplThread impl(this); | 386 DebugScopedSetImplThread impl(this); |
387 if (layer_tree_host_impl_->renderer()) { | 387 if (layer_tree_host_impl_->renderer()) { |
388 DCHECK(!layer_tree_host_->output_surface_lost()); | 388 DCHECK(!layer_tree_host_->output_surface_lost()); |
389 layer_tree_host_impl_->renderer()->DoNoOp(); | 389 layer_tree_host_impl_->renderer()->DoNoOp(); |
390 } | 390 } |
391 } | 391 } |
392 } | 392 } |
393 | 393 |
| 394 bool SingleThreadProxy::SupportsImplScrolling() const { |
| 395 return false; |
| 396 } |
| 397 |
394 bool SingleThreadProxy::ShouldComposite() const { | 398 bool SingleThreadProxy::ShouldComposite() const { |
395 DCHECK(Proxy::IsImplThread()); | 399 DCHECK(Proxy::IsImplThread()); |
396 return layer_tree_host_impl_->visible() && | 400 return layer_tree_host_impl_->visible() && |
397 layer_tree_host_impl_->CanDraw(); | 401 layer_tree_host_impl_->CanDraw(); |
398 } | 402 } |
399 | 403 |
400 void SingleThreadProxy::UpdateBackgroundAnimateTicking() { | 404 void SingleThreadProxy::UpdateBackgroundAnimateTicking() { |
401 DCHECK(Proxy::IsImplThread()); | 405 DCHECK(Proxy::IsImplThread()); |
402 layer_tree_host_impl_->UpdateBackgroundAnimateTicking( | 406 layer_tree_host_impl_->UpdateBackgroundAnimateTicking( |
403 !ShouldComposite() && layer_tree_host_impl_->active_tree()->root_layer()); | 407 !ShouldComposite() && layer_tree_host_impl_->active_tree()->root_layer()); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 void SingleThreadProxy::DidSwapFrame() { | 455 void SingleThreadProxy::DidSwapFrame() { |
452 if (next_frame_is_newly_committed_frame_) { | 456 if (next_frame_is_newly_committed_frame_) { |
453 next_frame_is_newly_committed_frame_ = false; | 457 next_frame_is_newly_committed_frame_ = false; |
454 layer_tree_host_->DidCommitAndDrawFrame(); | 458 layer_tree_host_->DidCommitAndDrawFrame(); |
455 } | 459 } |
456 } | 460 } |
457 | 461 |
458 bool SingleThreadProxy::CommitPendingForTesting() { return false; } | 462 bool SingleThreadProxy::CommitPendingForTesting() { return false; } |
459 | 463 |
460 } // namespace cc | 464 } // namespace cc |
OLD | NEW |