| 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/base/thread.h" | 9 #include "cc/base/thread.h" |
| 10 #include "cc/output/context_provider.h" | 10 #include "cc/output/context_provider.h" |
| (...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 layer_tree_host_impl_->UpdateBackgroundAnimateTicking(false); | 447 layer_tree_host_impl_->UpdateBackgroundAnimateTicking(false); |
| 448 | 448 |
| 449 layer_tree_host_impl_->PrepareToDraw(frame, device_viewport_damage_rect); | 449 layer_tree_host_impl_->PrepareToDraw(frame, device_viewport_damage_rect); |
| 450 layer_tree_host_impl_->DrawLayers(frame, frame_begin_time); | 450 layer_tree_host_impl_->DrawLayers(frame, frame_begin_time); |
| 451 layer_tree_host_impl_->DidDrawAllLayers(*frame); | 451 layer_tree_host_impl_->DidDrawAllLayers(*frame); |
| 452 lost_output_surface = layer_tree_host_impl_->IsContextLost(); | 452 lost_output_surface = layer_tree_host_impl_->IsContextLost(); |
| 453 | 453 |
| 454 bool start_ready_animations = true; | 454 bool start_ready_animations = true; |
| 455 layer_tree_host_impl_->UpdateAnimationState(start_ready_animations); | 455 layer_tree_host_impl_->UpdateAnimationState(start_ready_animations); |
| 456 | 456 |
| 457 layer_tree_host_impl_->BeginNextFrame(); | 457 layer_tree_host_impl_->ResetCurrentFrameTimeForNextFrame(); |
| 458 } | 458 } |
| 459 | 459 |
| 460 if (lost_output_surface) { | 460 if (lost_output_surface) { |
| 461 cc::ContextProvider* offscreen_contexts = layer_tree_host_impl_-> | 461 cc::ContextProvider* offscreen_contexts = layer_tree_host_impl_-> |
| 462 resource_provider()->offscreen_context_provider(); | 462 resource_provider()->offscreen_context_provider(); |
| 463 if (offscreen_contexts) | 463 if (offscreen_contexts) |
| 464 offscreen_contexts->VerifyContexts(); | 464 offscreen_contexts->VerifyContexts(); |
| 465 layer_tree_host_->DidLoseOutputSurface(); | 465 layer_tree_host_->DidLoseOutputSurface(); |
| 466 return false; | 466 return false; |
| 467 } | 467 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 478 | 478 |
| 479 bool SingleThreadProxy::CommitPendingForTesting() { return false; } | 479 bool SingleThreadProxy::CommitPendingForTesting() { return false; } |
| 480 | 480 |
| 481 skia::RefPtr<SkPicture> SingleThreadProxy::CapturePicture() { | 481 skia::RefPtr<SkPicture> SingleThreadProxy::CapturePicture() { |
| 482 // Impl-side painting only. | 482 // Impl-side painting only. |
| 483 NOTREACHED(); | 483 NOTREACHED(); |
| 484 return skia::RefPtr<SkPicture>(); | 484 return skia::RefPtr<SkPicture>(); |
| 485 } | 485 } |
| 486 | 486 |
| 487 } // namespace cc | 487 } // namespace cc |
| OLD | NEW |