| 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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 } | 389 } |
| 390 | 390 |
| 391 scoped_ptr<cc::SwapPromiseMonitor> | 391 scoped_ptr<cc::SwapPromiseMonitor> |
| 392 RenderWidgetCompositor::CreateLatencyInfoSwapPromiseMonitor( | 392 RenderWidgetCompositor::CreateLatencyInfoSwapPromiseMonitor( |
| 393 ui::LatencyInfo* latency) { | 393 ui::LatencyInfo* latency) { |
| 394 return scoped_ptr<cc::SwapPromiseMonitor>( | 394 return scoped_ptr<cc::SwapPromiseMonitor>( |
| 395 new cc::LatencyInfoSwapPromiseMonitor( | 395 new cc::LatencyInfoSwapPromiseMonitor( |
| 396 latency, layer_tree_host_.get(), NULL)); | 396 latency, layer_tree_host_.get(), NULL)); |
| 397 } | 397 } |
| 398 | 398 |
| 399 void RenderWidgetCompositor::QueueSwapPromise( |
| 400 scoped_ptr<cc::SwapPromise> swap_promise) { |
| 401 layer_tree_host_->QueueSwapPromise(swap_promise.Pass()); |
| 402 } |
| 403 |
| 399 int RenderWidgetCompositor::GetLayerTreeId() const { | 404 int RenderWidgetCompositor::GetLayerTreeId() const { |
| 400 return layer_tree_host_->id(); | 405 return layer_tree_host_->id(); |
| 401 } | 406 } |
| 402 | 407 |
| 403 void RenderWidgetCompositor::NotifyInputThrottledUntilCommit() { | 408 void RenderWidgetCompositor::NotifyInputThrottledUntilCommit() { |
| 404 layer_tree_host_->NotifyInputThrottledUntilCommit(); | 409 layer_tree_host_->NotifyInputThrottledUntilCommit(); |
| 405 } | 410 } |
| 406 | 411 |
| 407 const cc::Layer* RenderWidgetCompositor::GetRootLayer() const { | 412 const cc::Layer* RenderWidgetCompositor::GetRootLayer() const { |
| 408 return layer_tree_host_->root_layer(); | 413 return layer_tree_host_->root_layer(); |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 693 widget_->OnSwapBuffersAborted(); | 698 widget_->OnSwapBuffersAborted(); |
| 694 } | 699 } |
| 695 | 700 |
| 696 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { | 701 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { |
| 697 cc::ContextProvider* provider = | 702 cc::ContextProvider* provider = |
| 698 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); | 703 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); |
| 699 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 704 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
| 700 } | 705 } |
| 701 | 706 |
| 702 } // namespace content | 707 } // namespace content |
| OLD | NEW |