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 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
789 void RenderWidgetCompositor::ApplyViewportDeltas( | 789 void RenderWidgetCompositor::ApplyViewportDeltas( |
790 const gfx::Vector2d& scroll_delta, | 790 const gfx::Vector2d& scroll_delta, |
791 float page_scale, | 791 float page_scale, |
792 float top_controls_delta) { | 792 float top_controls_delta) { |
793 widget_->webwidget()->applyViewportDeltas( | 793 widget_->webwidget()->applyViewportDeltas( |
794 scroll_delta, | 794 scroll_delta, |
795 page_scale, | 795 page_scale, |
796 top_controls_delta); | 796 top_controls_delta); |
797 } | 797 } |
798 | 798 |
799 void RenderWidgetCompositor::RequestNewOutputSurface(bool fallback) { | 799 scoped_ptr<cc::OutputSurface> RenderWidgetCompositor::CreateOutputSurface( |
800 layer_tree_host_->SetOutputSurface(widget_->CreateOutputSurface(fallback)); | 800 bool fallback) { |
| 801 return widget_->CreateOutputSurface(fallback); |
801 } | 802 } |
802 | 803 |
803 void RenderWidgetCompositor::DidInitializeOutputSurface() { | 804 void RenderWidgetCompositor::DidInitializeOutputSurface() { |
804 } | 805 } |
805 | 806 |
806 void RenderWidgetCompositor::WillCommit() { | 807 void RenderWidgetCompositor::WillCommit() { |
807 widget_->InstrumentWillComposite(); | 808 widget_->InstrumentWillComposite(); |
808 } | 809 } |
809 | 810 |
810 void RenderWidgetCompositor::DidCommit() { | 811 void RenderWidgetCompositor::DidCommit() { |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
848 widget_->OnSwapBuffersAborted(); | 849 widget_->OnSwapBuffersAborted(); |
849 } | 850 } |
850 | 851 |
851 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { | 852 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { |
852 cc::ContextProvider* provider = | 853 cc::ContextProvider* provider = |
853 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); | 854 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); |
854 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 855 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
855 } | 856 } |
856 | 857 |
857 } // namespace content | 858 } // namespace content |
OLD | NEW |