| 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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 layer_tree_host_->UpdateLayers( | 397 layer_tree_host_->UpdateLayers( |
| 398 queue.get(), layer_tree_host_impl_->memory_allocation_limit_bytes()); | 398 queue.get(), layer_tree_host_impl_->memory_allocation_limit_bytes()); |
| 399 | 399 |
| 400 layer_tree_host_->WillCommit(); | 400 layer_tree_host_->WillCommit(); |
| 401 DoCommit(queue.Pass()); | 401 DoCommit(queue.Pass()); |
| 402 bool result = DoComposite(offscreen_context_provider, | 402 bool result = DoComposite(offscreen_context_provider, |
| 403 frame_begin_time, | 403 frame_begin_time, |
| 404 device_viewport_damage_rect, | 404 device_viewport_damage_rect, |
| 405 for_readback, | 405 for_readback, |
| 406 frame); | 406 frame); |
| 407 layer_tree_host_->DidBeginFrame(); | 407 layer_tree_host_->DidBeginMainFrame(); |
| 408 return result; | 408 return result; |
| 409 } | 409 } |
| 410 | 410 |
| 411 bool SingleThreadProxy::ShouldComposite() const { | 411 bool SingleThreadProxy::ShouldComposite() const { |
| 412 DCHECK(Proxy::IsImplThread()); | 412 DCHECK(Proxy::IsImplThread()); |
| 413 return layer_tree_host_impl_->visible() && | 413 return layer_tree_host_impl_->visible() && |
| 414 layer_tree_host_impl_->CanDraw(); | 414 layer_tree_host_impl_->CanDraw(); |
| 415 } | 415 } |
| 416 | 416 |
| 417 bool SingleThreadProxy::DoComposite( | 417 bool SingleThreadProxy::DoComposite( |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 |