| 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 #if defined(OS_ANDROID) | 10 #if defined(OS_ANDROID) |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 } | 393 } |
| 394 | 394 |
| 395 scoped_ptr<cc::SwapPromiseMonitor> | 395 scoped_ptr<cc::SwapPromiseMonitor> |
| 396 RenderWidgetCompositor::CreateLatencyInfoSwapPromiseMonitor( | 396 RenderWidgetCompositor::CreateLatencyInfoSwapPromiseMonitor( |
| 397 ui::LatencyInfo* latency) { | 397 ui::LatencyInfo* latency) { |
| 398 return scoped_ptr<cc::SwapPromiseMonitor>( | 398 return scoped_ptr<cc::SwapPromiseMonitor>( |
| 399 new cc::LatencyInfoSwapPromiseMonitor( | 399 new cc::LatencyInfoSwapPromiseMonitor( |
| 400 latency, layer_tree_host_.get(), NULL)); | 400 latency, layer_tree_host_.get(), NULL)); |
| 401 } | 401 } |
| 402 | 402 |
| 403 void RenderWidgetCompositor::QueueSwapPromise( |
| 404 scoped_ptr<cc::SwapPromise> swap_promise) { |
| 405 layer_tree_host_->QueueSwapPromise(swap_promise.Pass()); |
| 406 } |
| 407 |
| 403 int RenderWidgetCompositor::GetLayerTreeId() const { | 408 int RenderWidgetCompositor::GetLayerTreeId() const { |
| 404 return layer_tree_host_->id(); | 409 return layer_tree_host_->id(); |
| 405 } | 410 } |
| 406 | 411 |
| 407 void RenderWidgetCompositor::NotifyInputThrottledUntilCommit() { | 412 void RenderWidgetCompositor::NotifyInputThrottledUntilCommit() { |
| 408 layer_tree_host_->NotifyInputThrottledUntilCommit(); | 413 layer_tree_host_->NotifyInputThrottledUntilCommit(); |
| 409 } | 414 } |
| 410 | 415 |
| 411 const cc::Layer* RenderWidgetCompositor::GetRootLayer() const { | 416 const cc::Layer* RenderWidgetCompositor::GetRootLayer() const { |
| 412 return layer_tree_host_->root_layer(); | 417 return layer_tree_host_->root_layer(); |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 widget_->OnSwapBuffersAborted(); | 703 widget_->OnSwapBuffersAborted(); |
| 699 } | 704 } |
| 700 | 705 |
| 701 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { | 706 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { |
| 702 cc::ContextProvider* provider = | 707 cc::ContextProvider* provider = |
| 703 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); | 708 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); |
| 704 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 709 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
| 705 } | 710 } |
| 706 | 711 |
| 707 } // namespace content | 712 } // namespace content |
| OLD | NEW |