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