| 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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 | 331 |
| 332 void RenderWidgetCompositor::SetOverdrawBottomHeight( | 332 void RenderWidgetCompositor::SetOverdrawBottomHeight( |
| 333 float overdraw_bottom_height) { | 333 float overdraw_bottom_height) { |
| 334 layer_tree_host_->SetOverdrawBottomHeight(overdraw_bottom_height); | 334 layer_tree_host_->SetOverdrawBottomHeight(overdraw_bottom_height); |
| 335 } | 335 } |
| 336 | 336 |
| 337 void RenderWidgetCompositor::SetNeedsRedrawRect(gfx::Rect damage_rect) { | 337 void RenderWidgetCompositor::SetNeedsRedrawRect(gfx::Rect damage_rect) { |
| 338 layer_tree_host_->SetNeedsRedrawRect(damage_rect); | 338 layer_tree_host_->SetNeedsRedrawRect(damage_rect); |
| 339 } | 339 } |
| 340 | 340 |
| 341 void RenderWidgetCompositor::SetLatencyInfo( |
| 342 const cc::LatencyInfo& latency_info) { |
| 343 layer_tree_host_->SetLatencyInfo(latency_info); |
| 344 } |
| 345 |
| 341 bool RenderWidgetCompositor::initialize(cc::LayerTreeSettings settings) { | 346 bool RenderWidgetCompositor::initialize(cc::LayerTreeSettings settings) { |
| 342 scoped_ptr<cc::Thread> impl_thread; | 347 scoped_ptr<cc::Thread> impl_thread; |
| 343 scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy = | 348 scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy = |
| 344 RenderThreadImpl::current()->compositor_message_loop_proxy(); | 349 RenderThreadImpl::current()->compositor_message_loop_proxy(); |
| 345 threaded_ = !!compositor_message_loop_proxy; | 350 threaded_ = !!compositor_message_loop_proxy; |
| 346 if (threaded_) { | 351 if (threaded_) { |
| 347 impl_thread = cc::ThreadImpl::CreateForDifferentThread( | 352 impl_thread = cc::ThreadImpl::CreateForDifferentThread( |
| 348 compositor_message_loop_proxy); | 353 compositor_message_loop_proxy); |
| 349 } | 354 } |
| 350 layer_tree_host_ = cc::LayerTreeHost::Create(this, | 355 layer_tree_host_ = cc::LayerTreeHost::Create(this, |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 555 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); | 560 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); |
| 556 } | 561 } |
| 557 | 562 |
| 558 scoped_refptr<cc::ContextProvider> | 563 scoped_refptr<cc::ContextProvider> |
| 559 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { | 564 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { |
| 560 return RenderThreadImpl::current()-> | 565 return RenderThreadImpl::current()-> |
| 561 OffscreenContextProviderForCompositorThread(); | 566 OffscreenContextProviderForCompositorThread(); |
| 562 } | 567 } |
| 563 | 568 |
| 564 } // namespace content | 569 } // namespace content |
| OLD | NEW |