| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "content/renderer/gpu/render_widget_compositor.h" | 5 #include "content/renderer/gpu/render_widget_compositor.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 } | 286 } |
| 287 | 287 |
| 288 skia::RefPtr<SkPicture> RenderWidgetCompositor::CapturePicture() { | 288 skia::RefPtr<SkPicture> RenderWidgetCompositor::CapturePicture() { |
| 289 return layer_tree_host_->CapturePicture(); | 289 return layer_tree_host_->CapturePicture(); |
| 290 } | 290 } |
| 291 | 291 |
| 292 void RenderWidgetCompositor::EnableHidingTopControls(bool enable) { | 292 void RenderWidgetCompositor::EnableHidingTopControls(bool enable) { |
| 293 layer_tree_host_->EnableHidingTopControls(enable); | 293 layer_tree_host_->EnableHidingTopControls(enable); |
| 294 } | 294 } |
| 295 | 295 |
| 296 void RenderWidgetCompositor::ShowTopControls(bool show) { |
| 297 layer_tree_host_->ShowTopControls(show); |
| 298 } |
| 299 |
| 296 bool RenderWidgetCompositor::initialize(cc::LayerTreeSettings settings) { | 300 bool RenderWidgetCompositor::initialize(cc::LayerTreeSettings settings) { |
| 297 scoped_ptr<cc::Thread> impl_thread; | 301 scoped_ptr<cc::Thread> impl_thread; |
| 298 scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy = | 302 scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy = |
| 299 RenderThreadImpl::current()->compositor_message_loop_proxy(); | 303 RenderThreadImpl::current()->compositor_message_loop_proxy(); |
| 300 threaded_ = !!compositor_message_loop_proxy; | 304 threaded_ = !!compositor_message_loop_proxy; |
| 301 if (threaded_) { | 305 if (threaded_) { |
| 302 impl_thread = cc::ThreadImpl::CreateForDifferentThread( | 306 impl_thread = cc::ThreadImpl::CreateForDifferentThread( |
| 303 compositor_message_loop_proxy); | 307 compositor_message_loop_proxy); |
| 304 } | 308 } |
| 305 layer_tree_host_ = cc::LayerTreeHost::Create(this, | 309 layer_tree_host_ = cc::LayerTreeHost::Create(this, |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); | 514 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); |
| 511 } | 515 } |
| 512 | 516 |
| 513 scoped_refptr<cc::ContextProvider> | 517 scoped_refptr<cc::ContextProvider> |
| 514 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { | 518 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { |
| 515 return RenderThreadImpl::current()-> | 519 return RenderThreadImpl::current()-> |
| 516 OffscreenContextProviderForCompositorThread(); | 520 OffscreenContextProviderForCompositorThread(); |
| 517 } | 521 } |
| 518 | 522 |
| 519 } // namespace content | 523 } // namespace content |
| OLD | NEW |