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

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

Issue 986433004: Revert of Always create top controls manager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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/public/android/java/src/org/chromium/content/common/ContentSwitches.java ('k') | no next file » | 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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 268
269 settings.can_use_lcd_text = compositor_deps_->IsLcdTextEnabled(); 269 settings.can_use_lcd_text = compositor_deps_->IsLcdTextEnabled();
270 settings.use_distance_field_text = 270 settings.use_distance_field_text =
271 compositor_deps_->IsDistanceFieldTextEnabled(); 271 compositor_deps_->IsDistanceFieldTextEnabled();
272 settings.use_zero_copy = compositor_deps_->IsZeroCopyEnabled(); 272 settings.use_zero_copy = compositor_deps_->IsZeroCopyEnabled();
273 settings.use_one_copy = compositor_deps_->IsOneCopyEnabled(); 273 settings.use_one_copy = compositor_deps_->IsOneCopyEnabled();
274 settings.enable_elastic_overscroll = 274 settings.enable_elastic_overscroll =
275 compositor_deps_->IsElasticOverscrollEnabled(); 275 compositor_deps_->IsElasticOverscrollEnabled();
276 settings.use_image_texture_target = compositor_deps_->GetImageTextureTarget(); 276 settings.use_image_texture_target = compositor_deps_->GetImageTextureTarget();
277 277
278 settings.calculate_top_controls_position =
279 cmd->HasSwitch(cc::switches::kEnableTopControlsPositionCalculation);
278 if (cmd->HasSwitch(cc::switches::kTopControlsShowThreshold)) { 280 if (cmd->HasSwitch(cc::switches::kTopControlsShowThreshold)) {
279 std::string top_threshold_str = 281 std::string top_threshold_str =
280 cmd->GetSwitchValueASCII(cc::switches::kTopControlsShowThreshold); 282 cmd->GetSwitchValueASCII(cc::switches::kTopControlsShowThreshold);
281 double show_threshold; 283 double show_threshold;
282 if (base::StringToDouble(top_threshold_str, &show_threshold) && 284 if (base::StringToDouble(top_threshold_str, &show_threshold) &&
283 show_threshold >= 0.f && show_threshold <= 1.f) 285 show_threshold >= 0.f && show_threshold <= 1.f)
284 settings.top_controls_show_threshold = show_threshold; 286 settings.top_controls_show_threshold = show_threshold;
285 } 287 }
286 288
287 if (cmd->HasSwitch(cc::switches::kTopControlsHideThreshold)) { 289 if (cmd->HasSwitch(cc::switches::kTopControlsHideThreshold)) {
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
909 cc::ContextProvider* provider = 911 cc::ContextProvider* provider =
910 compositor_deps_->GetSharedMainThreadContextProvider(); 912 compositor_deps_->GetSharedMainThreadContextProvider();
911 // provider can be NULL after the GPU process crashed enough times and we 913 // provider can be NULL after the GPU process crashed enough times and we
912 // don't want to restart it any more (falling back to software). 914 // don't want to restart it any more (falling back to software).
913 if (!provider) 915 if (!provider)
914 return; 916 return;
915 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); 917 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM();
916 } 918 }
917 919
918 } // namespace content 920 } // namespace content
OLDNEW
« no previous file with comments | « content/public/android/java/src/org/chromium/content/common/ContentSwitches.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698