| 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/output/context_provider.h" | 9 #include "cc/output/context_provider.h" |
| 10 #include "cc/output/output_surface.h" | 10 #include "cc/output/output_surface.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 true, // for_readback | 63 true, // for_readback |
| 64 &frame)) | 64 &frame)) |
| 65 return false; | 65 return false; |
| 66 | 66 |
| 67 { | 67 { |
| 68 DebugScopedSetImplThread impl(this); | 68 DebugScopedSetImplThread impl(this); |
| 69 layer_tree_host_impl_->Readback(pixels, rect); | 69 layer_tree_host_impl_->Readback(pixels, rect); |
| 70 | 70 |
| 71 if (layer_tree_host_impl_->IsContextLost()) | 71 if (layer_tree_host_impl_->IsContextLost()) |
| 72 return false; | 72 return false; |
| 73 | |
| 74 layer_tree_host_impl_->SwapBuffers(frame); | |
| 75 } | 73 } |
| 76 DidSwapFrame(); | |
| 77 | 74 |
| 78 return true; | 75 return true; |
| 79 } | 76 } |
| 80 | 77 |
| 81 void SingleThreadProxy::FinishAllRendering() { | 78 void SingleThreadProxy::FinishAllRendering() { |
| 82 DCHECK(Proxy::IsMainThread()); | 79 DCHECK(Proxy::IsMainThread()); |
| 83 { | 80 { |
| 84 DebugScopedSetImplThread impl(this); | 81 DebugScopedSetImplThread impl(this); |
| 85 layer_tree_host_impl_->FinishAllRendering(); | 82 layer_tree_host_impl_->FinishAllRendering(); |
| 86 } | 83 } |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 void SingleThreadProxy::DidSwapFrame() { | 498 void SingleThreadProxy::DidSwapFrame() { |
| 502 if (next_frame_is_newly_committed_frame_) { | 499 if (next_frame_is_newly_committed_frame_) { |
| 503 next_frame_is_newly_committed_frame_ = false; | 500 next_frame_is_newly_committed_frame_ = false; |
| 504 layer_tree_host_->DidCommitAndDrawFrame(); | 501 layer_tree_host_->DidCommitAndDrawFrame(); |
| 505 } | 502 } |
| 506 } | 503 } |
| 507 | 504 |
| 508 bool SingleThreadProxy::CommitPendingForTesting() { return false; } | 505 bool SingleThreadProxy::CommitPendingForTesting() { return false; } |
| 509 | 506 |
| 510 } // namespace cc | 507 } // namespace cc |
| OLD | NEW |