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

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

Issue 2816923002: change overlay scrollbar hover show to hover fade in (Closed)
Patch Set: merge fade-in and fade-out to same code method Created 3 years, 8 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
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <limits> 10 #include <limits>
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 // most long-term caching. 437 // most long-term caching.
438 settings.decoded_image_cache_budget_bytes = 2 * 1024 * 1024; 438 settings.decoded_image_cache_budget_bytes = 2 * 1024 * 1024;
439 } 439 }
440 440
441 // TODO(danakj): Only do this on low end devices. 441 // TODO(danakj): Only do this on low end devices.
442 settings.create_low_res_tiling = true; 442 settings.create_low_res_tiling = true;
443 #else // defined(OS_ANDROID) 443 #else // defined(OS_ANDROID)
444 #if !defined(OS_MACOSX) 444 #if !defined(OS_MACOSX)
445 if (ui::IsOverlayScrollbarEnabled()) { 445 if (ui::IsOverlayScrollbarEnabled()) {
446 settings.scrollbar_animator = cc::LayerTreeSettings::AURA_OVERLAY; 446 settings.scrollbar_animator = cc::LayerTreeSettings::AURA_OVERLAY;
447 settings.scrollbar_show_delay = ui::kOverlayScrollbarShowDelay; 447 settings.scrollbar_fade_in_delay = ui::kOverlayScrollbarFadeInDelay;
448 settings.scrollbar_fade_out_delay = ui::kOverlayScrollbarFadeOutDelay; 448 settings.scrollbar_fade_out_delay = ui::kOverlayScrollbarFadeOutDelay;
449 settings.scrollbar_fade_out_resize_delay = 449 settings.scrollbar_fade_out_resize_delay =
450 ui::kOverlayScrollbarFadeOutDelay; 450 ui::kOverlayScrollbarFadeOutDelay;
451 settings.scrollbar_fade_in_duration = ui::kOverlayScrollbarFadeInDuration;
451 settings.scrollbar_fade_out_duration = ui::kOverlayScrollbarFadeOutDuration; 452 settings.scrollbar_fade_out_duration = ui::kOverlayScrollbarFadeOutDuration;
452 settings.scrollbar_thinning_duration = 453 settings.scrollbar_thinning_duration =
453 ui::kOverlayScrollbarThinningDuration; 454 ui::kOverlayScrollbarThinningDuration;
454 } else { 455 } else {
455 // TODO(bokan): This section is probably unneeded? We don't use scrollbar 456 // TODO(bokan): This section is probably unneeded? We don't use scrollbar
456 // animations for non overlay scrollbars. 457 // animations for non overlay scrollbars.
457 settings.scrollbar_animator = cc::LayerTreeSettings::ANDROID_OVERLAY; 458 settings.scrollbar_animator = cc::LayerTreeSettings::ANDROID_OVERLAY;
458 settings.solid_color_scrollbar_color = SkColorSetARGB(128, 128, 128, 128); 459 settings.solid_color_scrollbar_color = SkColorSetARGB(128, 128, 128, 128);
459 settings.scrollbar_fade_out_delay = base::TimeDelta::FromMilliseconds(500); 460 settings.scrollbar_fade_out_delay = base::TimeDelta::FromMilliseconds(500);
460 settings.scrollbar_fade_out_resize_delay = 461 settings.scrollbar_fade_out_resize_delay =
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 void RenderWidgetCompositor::SetContentSourceId(uint32_t id) { 1151 void RenderWidgetCompositor::SetContentSourceId(uint32_t id) {
1151 layer_tree_host_->SetContentSourceId(id); 1152 layer_tree_host_->SetContentSourceId(id);
1152 } 1153 }
1153 1154
1154 void RenderWidgetCompositor::SetLocalSurfaceId( 1155 void RenderWidgetCompositor::SetLocalSurfaceId(
1155 const cc::LocalSurfaceId& local_surface_id) { 1156 const cc::LocalSurfaceId& local_surface_id) {
1156 layer_tree_host_->SetLocalSurfaceId(local_surface_id); 1157 layer_tree_host_->SetLocalSurfaceId(local_surface_id);
1157 } 1158 }
1158 1159
1159 } // namespace content 1160 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698