| 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 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 | 746 |
| 747 void RenderWidgetCompositor::setShowScrollBottleneckRects(bool show) { | 747 void RenderWidgetCompositor::setShowScrollBottleneckRects(bool show) { |
| 748 cc::LayerTreeDebugState debug_state = layer_tree_host_->debug_state(); | 748 cc::LayerTreeDebugState debug_state = layer_tree_host_->debug_state(); |
| 749 debug_state.show_touch_event_handler_rects = show; | 749 debug_state.show_touch_event_handler_rects = show; |
| 750 debug_state.show_wheel_event_handler_rects = show; | 750 debug_state.show_wheel_event_handler_rects = show; |
| 751 debug_state.show_non_fast_scrollable_rects = show; | 751 debug_state.show_non_fast_scrollable_rects = show; |
| 752 layer_tree_host_->SetDebugState(debug_state); | 752 layer_tree_host_->SetDebugState(debug_state); |
| 753 } | 753 } |
| 754 | 754 |
| 755 void RenderWidgetCompositor::setTopControlsContentOffset(float offset) { | 755 void RenderWidgetCompositor::setTopControlsContentOffset(float offset) { |
| 756 layer_tree_host_->SetTopControlsContentOffset(offset); | 756 setTopControlsShownRatio(offset); |
| 757 } |
| 758 |
| 759 void RenderWidgetCompositor::setTopControlsShownRatio(float ratio) { |
| 760 layer_tree_host_->SetTopControlsShownRatio(ratio); |
| 757 } | 761 } |
| 758 | 762 |
| 759 void RenderWidgetCompositor::WillBeginMainFrame() { | 763 void RenderWidgetCompositor::WillBeginMainFrame() { |
| 760 widget_->willBeginCompositorFrame(); | 764 widget_->willBeginCompositorFrame(); |
| 761 } | 765 } |
| 762 | 766 |
| 763 void RenderWidgetCompositor::DidBeginMainFrame() { | 767 void RenderWidgetCompositor::DidBeginMainFrame() { |
| 764 } | 768 } |
| 765 | 769 |
| 766 void RenderWidgetCompositor::BeginMainFrame(const cc::BeginFrameArgs& args) { | 770 void RenderWidgetCompositor::BeginMainFrame(const cc::BeginFrameArgs& args) { |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 879 widget_->OnSwapBuffersAborted(); | 883 widget_->OnSwapBuffersAborted(); |
| 880 } | 884 } |
| 881 | 885 |
| 882 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { | 886 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { |
| 883 cc::ContextProvider* provider = | 887 cc::ContextProvider* provider = |
| 884 compositor_deps_->GetSharedMainThreadContextProvider(); | 888 compositor_deps_->GetSharedMainThreadContextProvider(); |
| 885 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 889 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
| 886 } | 890 } |
| 887 | 891 |
| 888 } // namespace content | 892 } // namespace content |
| OLD | NEW |