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