| 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 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 626 void RenderWidgetCompositor::DidCommitAndDrawFrame() { | 626 void RenderWidgetCompositor::DidCommitAndDrawFrame() { |
| 627 widget_->didCommitAndDrawCompositorFrame(); | 627 widget_->didCommitAndDrawCompositorFrame(); |
| 628 } | 628 } |
| 629 | 629 |
| 630 void RenderWidgetCompositor::DidCompleteSwapBuffers() { | 630 void RenderWidgetCompositor::DidCompleteSwapBuffers() { |
| 631 widget_->didCompleteSwapBuffers(); | 631 widget_->didCompleteSwapBuffers(); |
| 632 if (!threaded_) | 632 if (!threaded_) |
| 633 widget_->OnSwapBuffersComplete(); | 633 widget_->OnSwapBuffersComplete(); |
| 634 } | 634 } |
| 635 | 635 |
| 636 scoped_refptr<cc::ContextProvider> | |
| 637 RenderWidgetCompositor::OffscreenContextProvider() { | |
| 638 return RenderThreadImpl::current()->OffscreenCompositorContextProvider(); | |
| 639 } | |
| 640 | |
| 641 void RenderWidgetCompositor::ScheduleComposite() { | 636 void RenderWidgetCompositor::ScheduleComposite() { |
| 642 if (!suppress_schedule_composite_) | 637 if (!suppress_schedule_composite_) |
| 643 widget_->scheduleComposite(); | 638 widget_->scheduleComposite(); |
| 644 } | 639 } |
| 645 | 640 |
| 646 void RenderWidgetCompositor::ScheduleAnimation() { | 641 void RenderWidgetCompositor::ScheduleAnimation() { |
| 647 widget_->scheduleAnimation(); | 642 widget_->scheduleAnimation(); |
| 648 } | 643 } |
| 649 | 644 |
| 650 void RenderWidgetCompositor::DidPostSwapBuffers() { | 645 void RenderWidgetCompositor::DidPostSwapBuffers() { |
| 651 widget_->OnSwapBuffersPosted(); | 646 widget_->OnSwapBuffersPosted(); |
| 652 } | 647 } |
| 653 | 648 |
| 654 void RenderWidgetCompositor::DidAbortSwapBuffers() { | 649 void RenderWidgetCompositor::DidAbortSwapBuffers() { |
| 655 widget_->OnSwapBuffersAborted(); | 650 widget_->OnSwapBuffersAborted(); |
| 656 } | 651 } |
| 657 | 652 |
| 658 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { | 653 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { |
| 659 cc::ContextProvider* provider = | 654 cc::ContextProvider* provider = |
| 660 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); | 655 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); |
| 661 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 656 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
| 662 } | 657 } |
| 663 | 658 |
| 664 } // namespace content | 659 } // namespace content |
| OLD | NEW |