| OLD | NEW |
| 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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 #if defined(OS_ANDROID) | 265 #if defined(OS_ANDROID) |
| 266 // TODO(danakj): Move these to the android code. | 266 // TODO(danakj): Move these to the android code. |
| 267 settings.can_use_lcd_text = false; | 267 settings.can_use_lcd_text = false; |
| 268 settings.max_partial_texture_updates = 0; | 268 settings.max_partial_texture_updates = 0; |
| 269 settings.use_linear_fade_scrollbar_animator = true; | 269 settings.use_linear_fade_scrollbar_animator = true; |
| 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; | |
| 276 settings.highp_threshold_min = 2048; | 275 settings.highp_threshold_min = 2048; |
| 277 // Android WebView handles root layer flings itself. | 276 // Android WebView handles root layer flings itself. |
| 278 settings.ignore_root_layer_flings = | 277 settings.ignore_root_layer_flings = |
| 279 widget->UsingSynchronousRendererCompositor(); | 278 widget->UsingSynchronousRendererCompositor(); |
| 280 #elif !defined(OS_MACOSX) | 279 #elif !defined(OS_MACOSX) |
| 281 if (cmd->HasSwitch(switches::kEnableOverlayScrollbars)) { | 280 if (cmd->HasSwitch(switches::kEnableOverlayScrollbars)) { |
| 282 settings.use_linear_fade_scrollbar_animator = true; | 281 settings.use_linear_fade_scrollbar_animator = true; |
| 283 settings.solid_color_scrollbars = true; | 282 settings.solid_color_scrollbars = true; |
| 284 settings.solid_color_scrollbar_color = SkColorSetARGB(128, 128, 128, 128); | 283 settings.solid_color_scrollbar_color = SkColorSetARGB(128, 128, 128, 128); |
| 285 settings.solid_color_scrollbar_thickness_dip = 3; | |
| 286 } | 284 } |
| 287 #endif | 285 #endif |
| 288 | 286 |
| 289 if (!compositor->initialize(settings)) | 287 if (!compositor->initialize(settings)) |
| 290 return scoped_ptr<RenderWidgetCompositor>(); | 288 return scoped_ptr<RenderWidgetCompositor>(); |
| 291 | 289 |
| 292 return compositor.Pass(); | 290 return compositor.Pass(); |
| 293 } | 291 } |
| 294 | 292 |
| 295 RenderWidgetCompositor::RenderWidgetCompositor(RenderWidget* widget, | 293 RenderWidgetCompositor::RenderWidgetCompositor(RenderWidget* widget, |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); | 585 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); |
| 588 } | 586 } |
| 589 | 587 |
| 590 scoped_refptr<cc::ContextProvider> | 588 scoped_refptr<cc::ContextProvider> |
| 591 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { | 589 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { |
| 592 return RenderThreadImpl::current()-> | 590 return RenderThreadImpl::current()-> |
| 593 OffscreenContextProviderForCompositorThread(); | 591 OffscreenContextProviderForCompositorThread(); |
| 594 } | 592 } |
| 595 | 593 |
| 596 } // namespace content | 594 } // namespace content |
| OLD | NEW |