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 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 | 352 |
353 void RenderWidgetCompositor::SetNeedsRedrawRect(gfx::Rect damage_rect) { | 353 void RenderWidgetCompositor::SetNeedsRedrawRect(gfx::Rect damage_rect) { |
354 layer_tree_host_->SetNeedsRedrawRect(damage_rect); | 354 layer_tree_host_->SetNeedsRedrawRect(damage_rect); |
355 } | 355 } |
356 | 356 |
357 void RenderWidgetCompositor::SetLatencyInfo( | 357 void RenderWidgetCompositor::SetLatencyInfo( |
358 const cc::LatencyInfo& latency_info) { | 358 const cc::LatencyInfo& latency_info) { |
359 layer_tree_host_->SetLatencyInfo(latency_info); | 359 layer_tree_host_->SetLatencyInfo(latency_info); |
360 } | 360 } |
361 | 361 |
| 362 void RenderWidgetCompositor::ShowTopControls(bool show) { |
| 363 layer_tree_host_->ShowTopControls(show); |
| 364 } |
| 365 |
362 bool RenderWidgetCompositor::initialize(cc::LayerTreeSettings settings) { | 366 bool RenderWidgetCompositor::initialize(cc::LayerTreeSettings settings) { |
363 scoped_ptr<cc::Thread> impl_thread; | 367 scoped_ptr<cc::Thread> impl_thread; |
364 scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy = | 368 scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy = |
365 RenderThreadImpl::current()->compositor_message_loop_proxy(); | 369 RenderThreadImpl::current()->compositor_message_loop_proxy(); |
366 threaded_ = !!compositor_message_loop_proxy; | 370 threaded_ = !!compositor_message_loop_proxy; |
367 if (threaded_) { | 371 if (threaded_) { |
368 impl_thread = cc::ThreadImpl::CreateForDifferentThread( | 372 impl_thread = cc::ThreadImpl::CreateForDifferentThread( |
369 compositor_message_loop_proxy); | 373 compositor_message_loop_proxy); |
370 } | 374 } |
371 layer_tree_host_ = cc::LayerTreeHost::Create(this, | 375 layer_tree_host_ = cc::LayerTreeHost::Create(this, |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); | 571 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); |
568 } | 572 } |
569 | 573 |
570 scoped_refptr<cc::ContextProvider> | 574 scoped_refptr<cc::ContextProvider> |
571 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { | 575 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { |
572 return RenderThreadImpl::current()-> | 576 return RenderThreadImpl::current()-> |
573 OffscreenContextProviderForCompositorThread(); | 577 OffscreenContextProviderForCompositorThread(); |
574 } | 578 } |
575 | 579 |
576 } // namespace content | 580 } // namespace content |
OLD | NEW |