| 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 ui::LatencyInfo& latency_info) { | 358 const ui::LatencyInfo& latency_info) { |
| 359 layer_tree_host_->SetLatencyInfo(latency_info); | 359 layer_tree_host_->SetLatencyInfo(latency_info); |
| 360 } | 360 } |
| 361 | 361 |
| 362 int RenderWidgetCompositor::GetLayerTreeId() const { |
| 363 return layer_tree_host_->id(); |
| 364 } |
| 365 |
| 362 bool RenderWidgetCompositor::initialize(cc::LayerTreeSettings settings) { | 366 bool RenderWidgetCompositor::initialize(cc::LayerTreeSettings settings) { |
| 363 scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy = | 367 scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy = |
| 364 RenderThreadImpl::current()->compositor_message_loop_proxy(); | 368 RenderThreadImpl::current()->compositor_message_loop_proxy(); |
| 365 layer_tree_host_ = cc::LayerTreeHost::Create(this, | 369 layer_tree_host_ = cc::LayerTreeHost::Create(this, |
| 366 settings, | 370 settings, |
| 367 compositor_message_loop_proxy); | 371 compositor_message_loop_proxy); |
| 368 return layer_tree_host_; | 372 return layer_tree_host_; |
| 369 } | 373 } |
| 370 | 374 |
| 371 void RenderWidgetCompositor::setSurfaceReady() { | 375 void RenderWidgetCompositor::setSurfaceReady() { |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); | 573 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); |
| 570 } | 574 } |
| 571 | 575 |
| 572 scoped_refptr<cc::ContextProvider> | 576 scoped_refptr<cc::ContextProvider> |
| 573 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { | 577 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { |
| 574 return RenderThreadImpl::current()-> | 578 return RenderThreadImpl::current()-> |
| 575 OffscreenContextProviderForCompositorThread(); | 579 OffscreenContextProviderForCompositorThread(); |
| 576 } | 580 } |
| 577 | 581 |
| 578 } // namespace content | 582 } // namespace content |
| OLD | NEW |