| 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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 } | 376 } |
| 377 | 377 |
| 378 scoped_ptr<cc::SwapPromiseMonitor> | 378 scoped_ptr<cc::SwapPromiseMonitor> |
| 379 RenderWidgetCompositor::CreateLatencyInfoSwapPromiseMonitor( | 379 RenderWidgetCompositor::CreateLatencyInfoSwapPromiseMonitor( |
| 380 ui::LatencyInfo* latency) { | 380 ui::LatencyInfo* latency) { |
| 381 return scoped_ptr<cc::SwapPromiseMonitor>( | 381 return scoped_ptr<cc::SwapPromiseMonitor>( |
| 382 new cc::LatencyInfoSwapPromiseMonitor( | 382 new cc::LatencyInfoSwapPromiseMonitor( |
| 383 latency, layer_tree_host_.get(), NULL)); | 383 latency, layer_tree_host_.get(), NULL)); |
| 384 } | 384 } |
| 385 | 385 |
| 386 void RenderWidgetCompositor::QueueSwapPromise( |
| 387 scoped_ptr<cc::SwapPromise> swap_promise) { |
| 388 layer_tree_host_->QueueSwapPromise(swap_promise.Pass()); |
| 389 } |
| 390 |
| 386 int RenderWidgetCompositor::GetLayerTreeId() const { | 391 int RenderWidgetCompositor::GetLayerTreeId() const { |
| 387 return layer_tree_host_->id(); | 392 return layer_tree_host_->id(); |
| 388 } | 393 } |
| 389 | 394 |
| 390 void RenderWidgetCompositor::NotifyInputThrottledUntilCommit() { | 395 void RenderWidgetCompositor::NotifyInputThrottledUntilCommit() { |
| 391 layer_tree_host_->NotifyInputThrottledUntilCommit(); | 396 layer_tree_host_->NotifyInputThrottledUntilCommit(); |
| 392 } | 397 } |
| 393 | 398 |
| 394 const cc::Layer* RenderWidgetCompositor::GetRootLayer() const { | 399 const cc::Layer* RenderWidgetCompositor::GetRootLayer() const { |
| 395 return layer_tree_host_->root_layer(); | 400 return layer_tree_host_->root_layer(); |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 656 widget_->OnSwapBuffersAborted(); | 661 widget_->OnSwapBuffersAborted(); |
| 657 } | 662 } |
| 658 | 663 |
| 659 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { | 664 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { |
| 660 cc::ContextProvider* provider = | 665 cc::ContextProvider* provider = |
| 661 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); | 666 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); |
| 662 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 667 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
| 663 } | 668 } |
| 664 | 669 |
| 665 } // namespace content | 670 } // namespace content |
| OLD | NEW |