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