| 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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 layer_tree_host_->enableHidingTopControls(enable); | 284 layer_tree_host_->enableHidingTopControls(enable); |
| 285 } | 285 } |
| 286 | 286 |
| 287 bool RenderWidgetCompositor::initialize(cc::LayerTreeSettings settings) { | 287 bool RenderWidgetCompositor::initialize(cc::LayerTreeSettings settings) { |
| 288 scoped_ptr<cc::Thread> impl_thread; | 288 scoped_ptr<cc::Thread> impl_thread; |
| 289 CompositorThread* compositor_thread = | 289 CompositorThread* compositor_thread = |
| 290 RenderThreadImpl::current()->compositor_thread(); | 290 RenderThreadImpl::current()->compositor_thread(); |
| 291 threaded_ = !!compositor_thread; | 291 threaded_ = !!compositor_thread; |
| 292 if (compositor_thread) | 292 if (compositor_thread) |
| 293 impl_thread = cc::ThreadImpl::createForDifferentThread( | 293 impl_thread = cc::ThreadImpl::createForDifferentThread( |
| 294 compositor_thread->message_loop()->message_loop_proxy()); | 294 compositor_thread->message_loop_proxy()); |
| 295 layer_tree_host_ = cc::LayerTreeHost::create(this, | 295 layer_tree_host_ = cc::LayerTreeHost::create(this, |
| 296 settings, | 296 settings, |
| 297 impl_thread.Pass()); | 297 impl_thread.Pass()); |
| 298 return layer_tree_host_; | 298 return layer_tree_host_; |
| 299 } | 299 } |
| 300 | 300 |
| 301 void RenderWidgetCompositor::setSurfaceReady() { | 301 void RenderWidgetCompositor::setSurfaceReady() { |
| 302 layer_tree_host_->setSurfaceReady(); | 302 layer_tree_host_->setSurfaceReady(); |
| 303 } | 303 } |
| 304 | 304 |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); | 493 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); |
| 494 } | 494 } |
| 495 | 495 |
| 496 scoped_refptr<cc::ContextProvider> | 496 scoped_refptr<cc::ContextProvider> |
| 497 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { | 497 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { |
| 498 return RenderThreadImpl::current()-> | 498 return RenderThreadImpl::current()-> |
| 499 OffscreenContextProviderForCompositorThread(); | 499 OffscreenContextProviderForCompositorThread(); |
| 500 } | 500 } |
| 501 | 501 |
| 502 } // namespace content | 502 } // namespace content |
| OLD | NEW |