| 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 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 780 WebBeginFrameArgs web_begin_frame_args = | 780 WebBeginFrameArgs web_begin_frame_args = |
| 781 WebBeginFrameArgs(frame_time_sec, deadline_sec, interval_sec); | 781 WebBeginFrameArgs(frame_time_sec, deadline_sec, interval_sec); |
| 782 widget_->webwidget()->beginFrame(web_begin_frame_args); | 782 widget_->webwidget()->beginFrame(web_begin_frame_args); |
| 783 } | 783 } |
| 784 | 784 |
| 785 void RenderWidgetCompositor::Layout() { | 785 void RenderWidgetCompositor::Layout() { |
| 786 widget_->webwidget()->layout(); | 786 widget_->webwidget()->layout(); |
| 787 } | 787 } |
| 788 | 788 |
| 789 void RenderWidgetCompositor::ApplyViewportDeltas( | 789 void RenderWidgetCompositor::ApplyViewportDeltas( |
| 790 const gfx::Vector2d& inner_delta, |
| 791 const gfx::Vector2d& outer_delta, |
| 792 float page_scale, |
| 793 float top_controls_delta) { |
| 794 widget_->webwidget()->applyViewportDeltas( |
| 795 inner_delta, |
| 796 outer_delta, |
| 797 page_scale, |
| 798 top_controls_delta); |
| 799 } |
| 800 |
| 801 void RenderWidgetCompositor::ApplyViewportDeltas( |
| 790 const gfx::Vector2d& scroll_delta, | 802 const gfx::Vector2d& scroll_delta, |
| 791 float page_scale, | 803 float page_scale, |
| 792 float top_controls_delta) { | 804 float top_controls_delta) { |
| 793 widget_->webwidget()->applyViewportDeltas( | 805 widget_->webwidget()->applyViewportDeltas( |
| 794 scroll_delta, | 806 scroll_delta, |
| 795 page_scale, | 807 page_scale, |
| 796 top_controls_delta); | 808 top_controls_delta); |
| 797 } | 809 } |
| 798 | 810 |
| 799 scoped_ptr<cc::OutputSurface> RenderWidgetCompositor::CreateOutputSurface( | 811 scoped_ptr<cc::OutputSurface> RenderWidgetCompositor::CreateOutputSurface( |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 849 widget_->OnSwapBuffersAborted(); | 861 widget_->OnSwapBuffersAborted(); |
| 850 } | 862 } |
| 851 | 863 |
| 852 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { | 864 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { |
| 853 cc::ContextProvider* provider = | 865 cc::ContextProvider* provider = |
| 854 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); | 866 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); |
| 855 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 867 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
| 856 } | 868 } |
| 857 | 869 |
| 858 } // namespace content | 870 } // namespace content |
| OLD | NEW |