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 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 *cmd, | 368 *cmd, |
369 cc::switches::kSlowDownRasterScaleFactor, | 369 cc::switches::kSlowDownRasterScaleFactor, |
370 kMinSlowDownScaleFactor, | 370 kMinSlowDownScaleFactor, |
371 kMaxSlowDownScaleFactor, | 371 kMaxSlowDownScaleFactor, |
372 &settings.initial_debug_state.slow_down_raster_scale_factor); | 372 &settings.initial_debug_state.slow_down_raster_scale_factor); |
373 } | 373 } |
374 | 374 |
375 settings.invert_viewport_scroll_order = | 375 settings.invert_viewport_scroll_order = |
376 cmd->HasSwitch(switches::kInvertViewportScrollOrder); | 376 cmd->HasSwitch(switches::kInvertViewportScrollOrder); |
377 | 377 |
378 if (cmd->HasSwitch(cc::switches::kMaxUnusedResourceMemoryUsagePercentage)) { | |
379 int max_unused_resource_memory_percentage; | |
380 if (GetSwitchValueAsInt( | |
381 *cmd, | |
382 cc::switches::kMaxUnusedResourceMemoryUsagePercentage, | |
383 0, 100, | |
384 &max_unused_resource_memory_percentage)) { | |
385 settings.max_unused_resource_memory_percentage = | |
386 max_unused_resource_memory_percentage; | |
387 } | |
388 } | |
389 | |
390 settings.strict_layer_property_change_checking = | 378 settings.strict_layer_property_change_checking = |
391 cmd->HasSwitch(cc::switches::kStrictLayerPropertyChangeChecking); | 379 cmd->HasSwitch(cc::switches::kStrictLayerPropertyChangeChecking); |
392 | 380 |
393 #if defined(OS_ANDROID) | 381 #if defined(OS_ANDROID) |
394 SynchronousCompositorFactory* synchronous_compositor_factory = | 382 SynchronousCompositorFactory* synchronous_compositor_factory = |
395 SynchronousCompositorFactory::GetInstance(); | 383 SynchronousCompositorFactory::GetInstance(); |
396 | 384 |
397 // We can't use GPU rasterization on low-end devices, because the Ganesh | 385 // We can't use GPU rasterization on low-end devices, because the Ganesh |
398 // cache would consume too much memory. | 386 // cache would consume too much memory. |
399 if (base::SysInfo::IsLowEndDevice()) | 387 if (base::SysInfo::IsLowEndDevice()) |
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1055 return; | 1043 return; |
1056 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 1044 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
1057 } | 1045 } |
1058 | 1046 |
1059 void RenderWidgetCompositor::SetSurfaceIdNamespace( | 1047 void RenderWidgetCompositor::SetSurfaceIdNamespace( |
1060 uint32_t surface_id_namespace) { | 1048 uint32_t surface_id_namespace) { |
1061 layer_tree_host_->set_surface_id_namespace(surface_id_namespace); | 1049 layer_tree_host_->set_surface_id_namespace(surface_id_namespace); |
1062 } | 1050 } |
1063 | 1051 |
1064 } // namespace content | 1052 } // namespace content |
OLD | NEW |