| 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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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::SetOverdrawBottomHeight( | 296 void RenderWidgetCompositor::SetOverdrawBottomHeight( |
| 297 float overdraw_bottom_height) { | 297 float overdraw_bottom_height) { |
| 298 layer_tree_host_->SetOverdrawBottomHeight(overdraw_bottom_height); | 298 layer_tree_host_->SetOverdrawBottomHeight(overdraw_bottom_height); |
| 299 } | 299 } |
| 300 | 300 |
| 301 void RenderWidgetCompositor::ShowTopControls(bool show) { |
| 302 layer_tree_host_->ShowTopControls(show); |
| 303 } |
| 304 |
| 301 bool RenderWidgetCompositor::initialize(cc::LayerTreeSettings settings) { | 305 bool RenderWidgetCompositor::initialize(cc::LayerTreeSettings settings) { |
| 302 scoped_ptr<cc::Thread> impl_thread; | 306 scoped_ptr<cc::Thread> impl_thread; |
| 303 scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy = | 307 scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy = |
| 304 RenderThreadImpl::current()->compositor_message_loop_proxy(); | 308 RenderThreadImpl::current()->compositor_message_loop_proxy(); |
| 305 threaded_ = !!compositor_message_loop_proxy; | 309 threaded_ = !!compositor_message_loop_proxy; |
| 306 if (threaded_) { | 310 if (threaded_) { |
| 307 impl_thread = cc::ThreadImpl::CreateForDifferentThread( | 311 impl_thread = cc::ThreadImpl::CreateForDifferentThread( |
| 308 compositor_message_loop_proxy); | 312 compositor_message_loop_proxy); |
| 309 } | 313 } |
| 310 layer_tree_host_ = cc::LayerTreeHost::Create(this, | 314 layer_tree_host_ = cc::LayerTreeHost::Create(this, |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); | 519 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); |
| 516 } | 520 } |
| 517 | 521 |
| 518 scoped_refptr<cc::ContextProvider> | 522 scoped_refptr<cc::ContextProvider> |
| 519 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { | 523 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { |
| 520 return RenderThreadImpl::current()-> | 524 return RenderThreadImpl::current()-> |
| 521 OffscreenContextProviderForCompositorThread(); | 525 OffscreenContextProviderForCompositorThread(); |
| 522 } | 526 } |
| 523 | 527 |
| 524 } // namespace content | 528 } // namespace content |
| OLD | NEW |