| 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 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 } | 365 } |
| 366 | 366 |
| 367 int RenderWidgetCompositor::GetLayerTreeId() const { | 367 int RenderWidgetCompositor::GetLayerTreeId() const { |
| 368 return layer_tree_host_->id(); | 368 return layer_tree_host_->id(); |
| 369 } | 369 } |
| 370 | 370 |
| 371 void RenderWidgetCompositor::NotifyInputThrottledUntilCommit() { | 371 void RenderWidgetCompositor::NotifyInputThrottledUntilCommit() { |
| 372 layer_tree_host_->NotifyInputThrottledUntilCommit(); | 372 layer_tree_host_->NotifyInputThrottledUntilCommit(); |
| 373 } | 373 } |
| 374 | 374 |
| 375 const cc::Layer* RenderWidgetCompositor::GetRootLayer() const { |
| 376 return layer_tree_host_->root_layer(); |
| 377 } |
| 378 |
| 375 bool RenderWidgetCompositor::initialize(cc::LayerTreeSettings settings) { | 379 bool RenderWidgetCompositor::initialize(cc::LayerTreeSettings settings) { |
| 376 scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy = | 380 scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy = |
| 377 RenderThreadImpl::current()->compositor_message_loop_proxy(); | 381 RenderThreadImpl::current()->compositor_message_loop_proxy(); |
| 378 layer_tree_host_ = cc::LayerTreeHost::Create(this, | 382 layer_tree_host_ = cc::LayerTreeHost::Create(this, |
| 379 settings, | 383 settings, |
| 380 compositor_message_loop_proxy); | 384 compositor_message_loop_proxy); |
| 381 return layer_tree_host_; | 385 return layer_tree_host_; |
| 382 } | 386 } |
| 383 | 387 |
| 384 void RenderWidgetCompositor::setSurfaceReady() { | 388 void RenderWidgetCompositor::setSurfaceReady() { |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 583 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); | 587 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); |
| 584 } | 588 } |
| 585 | 589 |
| 586 scoped_refptr<cc::ContextProvider> | 590 scoped_refptr<cc::ContextProvider> |
| 587 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { | 591 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { |
| 588 return RenderThreadImpl::current()-> | 592 return RenderThreadImpl::current()-> |
| 589 OffscreenContextProviderForCompositorThread(); | 593 OffscreenContextProviderForCompositorThread(); |
| 590 } | 594 } |
| 591 | 595 |
| 592 } // namespace content | 596 } // namespace content |
| OLD | NEW |