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

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

Issue 1136843009: cc: Remove unused use_pinch_zoom_scrollbars flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | « cc/trees/layer_tree_settings.cc ('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 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 426
427 // TODO(danakj): Only do this on low end devices. 427 // TODO(danakj): Only do this on low end devices.
428 settings.create_low_res_tiling = true; 428 settings.create_low_res_tiling = true;
429 429
430 settings.use_external_begin_frame_source = true; 430 settings.use_external_begin_frame_source = true;
431 431
432 #elif !defined(OS_MACOSX) 432 #elif !defined(OS_MACOSX)
433 if (ui::IsOverlayScrollbarEnabled()) { 433 if (ui::IsOverlayScrollbarEnabled()) {
434 settings.scrollbar_animator = cc::LayerTreeSettings::THINNING; 434 settings.scrollbar_animator = cc::LayerTreeSettings::THINNING;
435 settings.solid_color_scrollbar_color = SkColorSetARGB(128, 128, 128, 128); 435 settings.solid_color_scrollbar_color = SkColorSetARGB(128, 128, 128, 128);
436 } else if (cmd->HasSwitch(cc::switches::kEnablePinchVirtualViewport)) { 436 } else if (settings.use_pinch_virtual_viewport) {
437 // use_pinch_zoom_scrollbars is only true on desktop when non-overlay
438 // scrollbars are in use.
439 settings.use_pinch_zoom_scrollbars = true;
440 settings.scrollbar_animator = cc::LayerTreeSettings::LINEAR_FADE; 437 settings.scrollbar_animator = cc::LayerTreeSettings::LINEAR_FADE;
441 settings.solid_color_scrollbar_color = SkColorSetARGB(128, 128, 128, 128); 438 settings.solid_color_scrollbar_color = SkColorSetARGB(128, 128, 128, 128);
442 } 439 }
443 settings.scrollbar_fade_delay_ms = 500; 440 settings.scrollbar_fade_delay_ms = 500;
444 settings.scrollbar_fade_resize_delay_ms = 500; 441 settings.scrollbar_fade_resize_delay_ms = 500;
445 settings.scrollbar_fade_duration_ms = 300; 442 settings.scrollbar_fade_duration_ms = 300;
446 443
447 // When pinching in, only show the pinch-viewport overlay scrollbars if the 444 // When pinching in, only show the pinch-viewport overlay scrollbars if the
448 // page scale is at least some threshold away from the minimum. i.e. don't 445 // page scale is at least some threshold away from the minimum. i.e. don't
449 // show the pinch scrollbars when at minimum scale. 446 // show the pinch scrollbars when at minimum scale.
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
967 cc::ContextProvider* provider = 964 cc::ContextProvider* provider =
968 compositor_deps_->GetSharedMainThreadContextProvider(); 965 compositor_deps_->GetSharedMainThreadContextProvider();
969 // provider can be NULL after the GPU process crashed enough times and we 966 // provider can be NULL after the GPU process crashed enough times and we
970 // don't want to restart it any more (falling back to software). 967 // don't want to restart it any more (falling back to software).
971 if (!provider) 968 if (!provider)
972 return; 969 return;
973 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); 970 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM();
974 } 971 }
975 972
976 } // namespace content 973 } // namespace content
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_settings.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698