Chromium Code Reviews| 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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 264 settings.strict_layer_property_change_checking = | 264 settings.strict_layer_property_change_checking = |
| 265 cmd->HasSwitch(cc::switches::kStrictLayerPropertyChangeChecking); | 265 cmd->HasSwitch(cc::switches::kStrictLayerPropertyChangeChecking); |
| 266 | 266 |
| 267 settings.use_map_image = cmd->HasSwitch(cc::switches::kUseMapImage); | 267 settings.use_map_image = cmd->HasSwitch(cc::switches::kUseMapImage); |
| 268 | 268 |
| 269 #if defined(OS_ANDROID) | 269 #if defined(OS_ANDROID) |
| 270 // TODO(danakj): Move these to the android code. | 270 // TODO(danakj): Move these to the android code. |
| 271 settings.can_use_lcd_text = false; | 271 settings.can_use_lcd_text = false; |
| 272 settings.max_partial_texture_updates = 0; | 272 settings.max_partial_texture_updates = 0; |
| 273 settings.use_linear_fade_scrollbar_animator = true; | 273 settings.use_linear_fade_scrollbar_animator = true; |
| 274 settings.solid_color_scrollbars = true; | |
| 275 settings.solid_color_scrollbar_color = SkColorSetARGB(128, 128, 128, 128); | |
| 276 settings.solid_color_scrollbar_thickness_dip = 3; | |
| 277 settings.highp_threshold_min = 2048; | 274 settings.highp_threshold_min = 2048; |
| 278 #endif | 275 #endif |
| 279 | 276 |
| 277 if (cmd->HasSwitch(cc::switches::kForceSolidColorScrollbars) ) { | |
| 278 settings.force_solid_color_scrollbars = true; | |
| 279 settings.solid_color_scrollbar_color = SkColorSetARGB(128, 128, 128, 128); | |
| 280 settings.solid_color_scrollbar_thickness_dip = 3; | |
| 281 } else if (settings.use_pinch_virtual_viewport) { | |
|
aelias_OOO_until_Jul13
2013/06/28 17:31:59
I don't think these conditionals make a lot of sen
| |
| 282 settings.solid_color_scrollbar_color = SkColorSetARGB(128, 128, 128, 128); | |
| 283 settings.solid_color_scrollbar_thickness_dip = 10; | |
| 284 } | |
| 285 | |
| 280 if (!compositor->initialize(settings)) | 286 if (!compositor->initialize(settings)) |
| 281 return scoped_ptr<RenderWidgetCompositor>(); | 287 return scoped_ptr<RenderWidgetCompositor>(); |
| 282 | 288 |
| 283 return compositor.Pass(); | 289 return compositor.Pass(); |
| 284 } | 290 } |
| 285 | 291 |
| 286 RenderWidgetCompositor::RenderWidgetCompositor(RenderWidget* widget) | 292 RenderWidgetCompositor::RenderWidgetCompositor(RenderWidget* widget) |
| 287 : suppress_schedule_composite_(false), | 293 : suppress_schedule_composite_(false), |
| 288 widget_(widget) { | 294 widget_(widget) { |
| 289 } | 295 } |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 559 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); | 565 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); |
| 560 } | 566 } |
| 561 | 567 |
| 562 scoped_refptr<cc::ContextProvider> | 568 scoped_refptr<cc::ContextProvider> |
| 563 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { | 569 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { |
| 564 return RenderThreadImpl::current()-> | 570 return RenderThreadImpl::current()-> |
| 565 OffscreenContextProviderForCompositorThread(); | 571 OffscreenContextProviderForCompositorThread(); |
| 566 } | 572 } |
| 567 | 573 |
| 568 } // namespace content | 574 } // namespace content |
| OLD | NEW |