| 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 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 743 | 743 |
| 744 void RenderWidgetCompositor::setShowScrollBottleneckRects(bool show) { | 744 void RenderWidgetCompositor::setShowScrollBottleneckRects(bool show) { |
| 745 cc::LayerTreeDebugState debug_state = layer_tree_host_->debug_state(); | 745 cc::LayerTreeDebugState debug_state = layer_tree_host_->debug_state(); |
| 746 debug_state.show_touch_event_handler_rects = show; | 746 debug_state.show_touch_event_handler_rects = show; |
| 747 debug_state.show_wheel_event_handler_rects = show; | 747 debug_state.show_wheel_event_handler_rects = show; |
| 748 debug_state.show_non_fast_scrollable_rects = show; | 748 debug_state.show_non_fast_scrollable_rects = show; |
| 749 layer_tree_host_->SetDebugState(debug_state); | 749 layer_tree_host_->SetDebugState(debug_state); |
| 750 } | 750 } |
| 751 | 751 |
| 752 void RenderWidgetCompositor::setTopControlsContentOffset(float offset) { | 752 void RenderWidgetCompositor::setTopControlsContentOffset(float offset) { |
| 753 layer_tree_host_->SetTopControlsContentOffset(offset); | 753 setTopControlsShownRatio(offset); |
| 754 } |
| 755 |
| 756 void RenderWidgetCompositor::setTopControlsShownRatio(float ratio) { |
| 757 layer_tree_host_->SetTopControlsShownRatio(ratio); |
| 754 } | 758 } |
| 755 | 759 |
| 756 void RenderWidgetCompositor::WillBeginMainFrame(int frame_id) { | 760 void RenderWidgetCompositor::WillBeginMainFrame(int frame_id) { |
| 757 widget_->InstrumentWillBeginFrame(frame_id); | 761 widget_->InstrumentWillBeginFrame(frame_id); |
| 758 widget_->willBeginCompositorFrame(); | 762 widget_->willBeginCompositorFrame(); |
| 759 } | 763 } |
| 760 | 764 |
| 761 void RenderWidgetCompositor::DidBeginMainFrame() { | 765 void RenderWidgetCompositor::DidBeginMainFrame() { |
| 762 widget_->InstrumentDidBeginFrame(); | 766 widget_->InstrumentDidBeginFrame(); |
| 763 } | 767 } |
| (...skipping 115 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 |