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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 void SingleThreadProxy::FinishAllRendering() { | 75 void SingleThreadProxy::FinishAllRendering() { |
76 DCHECK(Proxy::IsMainThread()); | 76 DCHECK(Proxy::IsMainThread()); |
77 { | 77 { |
78 DebugScopedSetImplThread impl(this); | 78 DebugScopedSetImplThread impl(this); |
79 layer_tree_host_impl_->FinishAllRendering(); | 79 layer_tree_host_impl_->FinishAllRendering(); |
80 } | 80 } |
81 } | 81 } |
82 | 82 |
83 bool SingleThreadProxy::IsStarted() const { | 83 bool SingleThreadProxy::IsStarted() const { |
84 DCHECK(Proxy::IsMainThread()); | 84 DCHECK(Proxy::IsMainThread()); |
85 return layer_tree_host_impl_; | 85 return layer_tree_host_impl_.get(); |
86 } | 86 } |
87 | 87 |
88 bool SingleThreadProxy::InitializeOutputSurface() { | 88 bool SingleThreadProxy::InitializeOutputSurface() { |
89 DCHECK(Proxy::IsMainThread()); | 89 DCHECK(Proxy::IsMainThread()); |
90 scoped_ptr<OutputSurface> output_surface = | 90 scoped_ptr<OutputSurface> output_surface = |
91 layer_tree_host_->CreateOutputSurface(); | 91 layer_tree_host_->CreateOutputSurface(); |
92 if (!output_surface.get()) | 92 if (!output_surface.get()) |
93 return false; | 93 return false; |
94 output_surface_before_initialization_ = output_surface.Pass(); | 94 output_surface_before_initialization_ = output_surface.Pass(); |
95 return true; | 95 return true; |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 | 438 |
439 bool SingleThreadProxy::CommitPendingForTesting() { return false; } | 439 bool SingleThreadProxy::CommitPendingForTesting() { return false; } |
440 | 440 |
441 skia::RefPtr<SkPicture> SingleThreadProxy::CapturePicture() { | 441 skia::RefPtr<SkPicture> SingleThreadProxy::CapturePicture() { |
442 // Impl-side painting only. | 442 // Impl-side painting only. |
443 NOTREACHED(); | 443 NOTREACHED(); |
444 return skia::RefPtr<SkPicture>(); | 444 return skia::RefPtr<SkPicture>(); |
445 } | 445 } |
446 | 446 |
447 } // namespace cc | 447 } // namespace cc |
OLD | NEW |