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

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

Issue 22422010: Chromium side for using overlay scrollbars on Aura or Linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « content/public/common/content_switches.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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 settings.solid_color_scrollbars = true; 270 settings.solid_color_scrollbars = true;
271 settings.solid_color_scrollbar_color = 271 settings.solid_color_scrollbar_color =
272 cmd->HasSwitch(switches::kHideScrollbars) 272 cmd->HasSwitch(switches::kHideScrollbars)
273 ? SK_ColorTRANSPARENT 273 ? SK_ColorTRANSPARENT
274 : SkColorSetARGB(128, 128, 128, 128); 274 : SkColorSetARGB(128, 128, 128, 128);
275 settings.solid_color_scrollbar_thickness_dip = 3; 275 settings.solid_color_scrollbar_thickness_dip = 3;
276 settings.highp_threshold_min = 2048; 276 settings.highp_threshold_min = 2048;
277 // Android WebView handles root layer flings itself. 277 // Android WebView handles root layer flings itself.
278 settings.ignore_root_layer_flings = 278 settings.ignore_root_layer_flings =
279 widget->UsingSynchronousRendererCompositor(); 279 widget->UsingSynchronousRendererCompositor();
280 #elif !defined(OS_MACOSX)
281 if (cmd->HasSwitch(switches::kEnableOverlayScrollbars)) {
282 settings.use_linear_fade_scrollbar_animator = true;
283 settings.solid_color_scrollbars = true;
284 settings.solid_color_scrollbar_color = SkColorSetARGB(128, 128, 128, 128);
285 settings.solid_color_scrollbar_thickness_dip = 3;
286 }
280 #endif 287 #endif
281 288
282 if (!compositor->initialize(settings)) 289 if (!compositor->initialize(settings))
283 return scoped_ptr<RenderWidgetCompositor>(); 290 return scoped_ptr<RenderWidgetCompositor>();
284 291
285 return compositor.Pass(); 292 return compositor.Pass();
286 } 293 }
287 294
288 RenderWidgetCompositor::RenderWidgetCompositor(RenderWidget* widget, 295 RenderWidgetCompositor::RenderWidgetCompositor(RenderWidget* widget,
289 bool threaded) 296 bool threaded)
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); 583 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread();
577 } 584 }
578 585
579 scoped_refptr<cc::ContextProvider> 586 scoped_refptr<cc::ContextProvider>
580 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { 587 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() {
581 return RenderThreadImpl::current()-> 588 return RenderThreadImpl::current()->
582 OffscreenContextProviderForCompositorThread(); 589 OffscreenContextProviderForCompositorThread();
583 } 590 }
584 591
585 } // namespace content 592 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/content_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698