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

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

Issue 961023002: (Reland) Always create top controls manager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing bad patch (Patches since "rebase" were from wrong branch) 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);
280 if (cmd->HasSwitch(cc::switches::kTopControlsShowThreshold)) { 278 if (cmd->HasSwitch(cc::switches::kTopControlsShowThreshold)) {
281 std::string top_threshold_str = 279 std::string top_threshold_str =
282 cmd->GetSwitchValueASCII(cc::switches::kTopControlsShowThreshold); 280 cmd->GetSwitchValueASCII(cc::switches::kTopControlsShowThreshold);
283 double show_threshold; 281 double show_threshold;
284 if (base::StringToDouble(top_threshold_str, &show_threshold) && 282 if (base::StringToDouble(top_threshold_str, &show_threshold) &&
285 show_threshold >= 0.f && show_threshold <= 1.f) 283 show_threshold >= 0.f && show_threshold <= 1.f)
286 settings.top_controls_show_threshold = show_threshold; 284 settings.top_controls_show_threshold = show_threshold;
287 } 285 }
288 286
289 if (cmd->HasSwitch(cc::switches::kTopControlsHideThreshold)) { 287 if (cmd->HasSwitch(cc::switches::kTopControlsHideThreshold)) {
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 cc::ContextProvider* provider = 905 cc::ContextProvider* provider =
908 compositor_deps_->GetSharedMainThreadContextProvider(); 906 compositor_deps_->GetSharedMainThreadContextProvider();
909 // provider can be NULL after the GPU process crashed enough times and we 907 // provider can be NULL after the GPU process crashed enough times and we
910 // don't want to restart it any more (falling back to software). 908 // don't want to restart it any more (falling back to software).
911 if (!provider) 909 if (!provider)
912 return; 910 return;
913 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); 911 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM();
914 } 912 }
915 913
916 } // namespace content 914 } // 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