| 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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 347 | 347 | 
| 348 void RenderWidgetCompositor::SetNeedsRedrawRect(gfx::Rect damage_rect) { | 348 void RenderWidgetCompositor::SetNeedsRedrawRect(gfx::Rect damage_rect) { | 
| 349   layer_tree_host_->SetNeedsRedrawRect(damage_rect); | 349   layer_tree_host_->SetNeedsRedrawRect(damage_rect); | 
| 350 } | 350 } | 
| 351 | 351 | 
| 352 void RenderWidgetCompositor::SetLatencyInfo( | 352 void RenderWidgetCompositor::SetLatencyInfo( | 
| 353     const ui::LatencyInfo& latency_info) { | 353     const ui::LatencyInfo& latency_info) { | 
| 354   layer_tree_host_->SetLatencyInfo(latency_info); | 354   layer_tree_host_->SetLatencyInfo(latency_info); | 
| 355 } | 355 } | 
| 356 | 356 | 
|  | 357 int RenderWidgetCompositor::GetLayerTreeId() const { | 
|  | 358   return layer_tree_host_->id(); | 
|  | 359 } | 
|  | 360 | 
| 357 bool RenderWidgetCompositor::initialize(cc::LayerTreeSettings settings) { | 361 bool RenderWidgetCompositor::initialize(cc::LayerTreeSettings settings) { | 
| 358   scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy = | 362   scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy = | 
| 359       RenderThreadImpl::current()->compositor_message_loop_proxy(); | 363       RenderThreadImpl::current()->compositor_message_loop_proxy(); | 
| 360   layer_tree_host_ = cc::LayerTreeHost::Create(this, | 364   layer_tree_host_ = cc::LayerTreeHost::Create(this, | 
| 361                                                settings, | 365                                                settings, | 
| 362                                                compositor_message_loop_proxy); | 366                                                compositor_message_loop_proxy); | 
| 363   return layer_tree_host_; | 367   return layer_tree_host_; | 
| 364 } | 368 } | 
| 365 | 369 | 
| 366 void RenderWidgetCompositor::setSurfaceReady() { | 370 void RenderWidgetCompositor::setSurfaceReady() { | 
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 564   return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); | 568   return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); | 
| 565 } | 569 } | 
| 566 | 570 | 
| 567 scoped_refptr<cc::ContextProvider> | 571 scoped_refptr<cc::ContextProvider> | 
| 568 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { | 572 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { | 
| 569   return RenderThreadImpl::current()-> | 573   return RenderThreadImpl::current()-> | 
| 570       OffscreenContextProviderForCompositorThread(); | 574       OffscreenContextProviderForCompositorThread(); | 
| 571 } | 575 } | 
| 572 | 576 | 
| 573 }  // namespace content | 577 }  // namespace content | 
| OLD | NEW | 
|---|