Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Side by Side Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 901813002: Normalize top controls offset to (0, 1), Chromium-side. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace more EXPECT_EQ with EXPECT_FLOAT_EQ for windows bots Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.h ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.h ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698