| 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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 settings.strict_layer_property_change_checking = | 262 settings.strict_layer_property_change_checking = |
| 263 cmd->HasSwitch(cc::switches::kStrictLayerPropertyChangeChecking); | 263 cmd->HasSwitch(cc::switches::kStrictLayerPropertyChangeChecking); |
| 264 | 264 |
| 265 settings.use_map_image = cmd->HasSwitch(cc::switches::kUseMapImage); | 265 settings.use_map_image = cmd->HasSwitch(cc::switches::kUseMapImage); |
| 266 | 266 |
| 267 #if defined(OS_ANDROID) | 267 #if defined(OS_ANDROID) |
| 268 // TODO(danakj): Move these to the android code. | 268 // TODO(danakj): Move these to the android code. |
| 269 settings.can_use_lcd_text = false; | 269 settings.can_use_lcd_text = false; |
| 270 settings.max_partial_texture_updates = 0; | 270 settings.max_partial_texture_updates = 0; |
| 271 settings.use_linear_fade_scrollbar_animator = true; | 271 settings.use_linear_fade_scrollbar_animator = true; |
| 272 // TODO(wjmaclean) Remove this once the remaining references to it are |
| 273 // removed. |
| 272 settings.solid_color_scrollbars = true; | 274 settings.solid_color_scrollbars = true; |
| 273 settings.solid_color_scrollbar_color = SkColorSetARGB(128, 128, 128, 128); | |
| 274 settings.solid_color_scrollbar_thickness_dip = 3; | |
| 275 settings.highp_threshold_min = 2048; | 275 settings.highp_threshold_min = 2048; |
| 276 #endif | 276 #endif |
| 277 | 277 |
| 278 if (!compositor->initialize(settings)) | 278 if (!compositor->initialize(settings)) |
| 279 return scoped_ptr<RenderWidgetCompositor>(); | 279 return scoped_ptr<RenderWidgetCompositor>(); |
| 280 | 280 |
| 281 return compositor.Pass(); | 281 return compositor.Pass(); |
| 282 } | 282 } |
| 283 | 283 |
| 284 RenderWidgetCompositor::RenderWidgetCompositor(RenderWidget* widget) | 284 RenderWidgetCompositor::RenderWidgetCompositor(RenderWidget* widget) |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); | 557 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); |
| 558 } | 558 } |
| 559 | 559 |
| 560 scoped_refptr<cc::ContextProvider> | 560 scoped_refptr<cc::ContextProvider> |
| 561 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { | 561 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { |
| 562 return RenderThreadImpl::current()-> | 562 return RenderThreadImpl::current()-> |
| 563 OffscreenContextProviderForCompositorThread(); | 563 OffscreenContextProviderForCompositorThread(); |
| 564 } | 564 } |
| 565 | 565 |
| 566 } // namespace content | 566 } // namespace content |
| OLD | NEW |