| 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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 void RenderWidgetCompositor::SetOverdrawBottomHeight( | 341 void RenderWidgetCompositor::SetOverdrawBottomHeight( |
| 342 float overdraw_bottom_height) { | 342 float overdraw_bottom_height) { |
| 343 layer_tree_host_->SetOverdrawBottomHeight(overdraw_bottom_height); | 343 layer_tree_host_->SetOverdrawBottomHeight(overdraw_bottom_height); |
| 344 } | 344 } |
| 345 | 345 |
| 346 void RenderWidgetCompositor::SetNeedsRedrawRect(gfx::Rect damage_rect) { | 346 void RenderWidgetCompositor::SetNeedsRedrawRect(gfx::Rect damage_rect) { |
| 347 layer_tree_host_->SetNeedsRedrawRect(damage_rect); | 347 layer_tree_host_->SetNeedsRedrawRect(damage_rect); |
| 348 } | 348 } |
| 349 | 349 |
| 350 void RenderWidgetCompositor::SetLatencyInfo( | 350 void RenderWidgetCompositor::SetLatencyInfo( |
| 351 const cc::LatencyInfo& latency_info) { | 351 const ui::LatencyInfo& latency_info) { |
| 352 layer_tree_host_->SetLatencyInfo(latency_info); | 352 layer_tree_host_->SetLatencyInfo(latency_info); |
| 353 } | 353 } |
| 354 | 354 |
| 355 bool RenderWidgetCompositor::initialize(cc::LayerTreeSettings settings) { | 355 bool RenderWidgetCompositor::initialize(cc::LayerTreeSettings settings) { |
| 356 scoped_ptr<cc::Thread> impl_thread; | 356 scoped_ptr<cc::Thread> impl_thread; |
| 357 scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy = | 357 scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy = |
| 358 RenderThreadImpl::current()->compositor_message_loop_proxy(); | 358 RenderThreadImpl::current()->compositor_message_loop_proxy(); |
| 359 threaded_ = !!compositor_message_loop_proxy; | 359 threaded_ = !!compositor_message_loop_proxy; |
| 360 if (threaded_) { | 360 if (threaded_) { |
| 361 impl_thread = cc::ThreadImpl::CreateForDifferentThread( | 361 impl_thread = cc::ThreadImpl::CreateForDifferentThread( |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); | 570 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); |
| 571 } | 571 } |
| 572 | 572 |
| 573 scoped_refptr<cc::ContextProvider> | 573 scoped_refptr<cc::ContextProvider> |
| 574 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { | 574 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { |
| 575 return RenderThreadImpl::current()-> | 575 return RenderThreadImpl::current()-> |
| 576 OffscreenContextProviderForCompositorThread(); | 576 OffscreenContextProviderForCompositorThread(); |
| 577 } | 577 } |
| 578 | 578 |
| 579 } // namespace content | 579 } // namespace content |
| OLD | NEW |