| 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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 | 358 |
| 359 void RenderWidgetCompositor::SetLatencyInfo( | 359 void RenderWidgetCompositor::SetLatencyInfo( |
| 360 const ui::LatencyInfo& latency_info) { | 360 const ui::LatencyInfo& latency_info) { |
| 361 layer_tree_host_->SetLatencyInfo(latency_info); | 361 layer_tree_host_->SetLatencyInfo(latency_info); |
| 362 } | 362 } |
| 363 | 363 |
| 364 bool RenderWidgetCompositor::initialize(cc::LayerTreeSettings settings) { | 364 bool RenderWidgetCompositor::initialize(cc::LayerTreeSettings settings) { |
| 365 scoped_ptr<cc::Thread> impl_thread; | 365 scoped_ptr<cc::Thread> impl_thread; |
| 366 scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy = | 366 scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy = |
| 367 RenderThreadImpl::current()->compositor_message_loop_proxy(); | 367 RenderThreadImpl::current()->compositor_message_loop_proxy(); |
| 368 threaded_ = !!compositor_message_loop_proxy; | 368 threaded_ = !!compositor_message_loop_proxy.get(); |
| 369 if (threaded_) { | 369 if (threaded_) { |
| 370 impl_thread = cc::ThreadImpl::CreateForDifferentThread( | 370 impl_thread = cc::ThreadImpl::CreateForDifferentThread( |
| 371 compositor_message_loop_proxy); | 371 compositor_message_loop_proxy); |
| 372 } | 372 } |
| 373 layer_tree_host_ = cc::LayerTreeHost::Create(this, | 373 layer_tree_host_ = cc::LayerTreeHost::Create(this, |
| 374 settings, | 374 settings, |
| 375 impl_thread.Pass()); | 375 impl_thread.Pass()); |
| 376 return layer_tree_host_; | 376 return layer_tree_host_; |
| 377 } | 377 } |
| 378 | 378 |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); | 569 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); |
| 570 } | 570 } |
| 571 | 571 |
| 572 scoped_refptr<cc::ContextProvider> | 572 scoped_refptr<cc::ContextProvider> |
| 573 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { | 573 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { |
| 574 return RenderThreadImpl::current()-> | 574 return RenderThreadImpl::current()-> |
| 575 OffscreenContextProviderForCompositorThread(); | 575 OffscreenContextProviderForCompositorThread(); |
| 576 } | 576 } |
| 577 | 577 |
| 578 } // namespace content | 578 } // namespace content |
| OLD | NEW |