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 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 const int kMinSlowDownScaleFactor = 0; | 346 const int kMinSlowDownScaleFactor = 0; |
347 const int kMaxSlowDownScaleFactor = INT_MAX; | 347 const int kMaxSlowDownScaleFactor = INT_MAX; |
348 GetSwitchValueAsInt( | 348 GetSwitchValueAsInt( |
349 *cmd, | 349 *cmd, |
350 cc::switches::kSlowDownRasterScaleFactor, | 350 cc::switches::kSlowDownRasterScaleFactor, |
351 kMinSlowDownScaleFactor, | 351 kMinSlowDownScaleFactor, |
352 kMaxSlowDownScaleFactor, | 352 kMaxSlowDownScaleFactor, |
353 &settings.initial_debug_state.slow_down_raster_scale_factor); | 353 &settings.initial_debug_state.slow_down_raster_scale_factor); |
354 } | 354 } |
355 | 355 |
356 if (cmd->HasSwitch(cc::switches::kMaxTilesForInterestArea)) { | 356 if (cmd->HasSwitch(cc::switches::kTilingInterestAreaViewportMultiplier)) { |
357 int max_tiles_for_interest_area; | 357 int tiling_interest_area_viewport_multiplier; |
358 if (GetSwitchValueAsInt(*cmd, | 358 if (GetSwitchValueAsInt(*cmd, |
359 cc::switches::kMaxTilesForInterestArea, | 359 cc::switches::kTilingInterestAreaViewportMultiplier, |
360 1, std::numeric_limits<int>::max(), | 360 1, std::numeric_limits<int>::max(), |
361 &max_tiles_for_interest_area)) | 361 &tiling_interest_area_viewport_multiplier)) |
362 settings.max_tiles_for_interest_area = max_tiles_for_interest_area; | 362 settings.tiling_interest_area_viewport_multiplier = |
| 363 tiling_interest_area_viewport_multiplier; |
363 } | 364 } |
364 | 365 |
365 if (cmd->HasSwitch(cc::switches::kMaxUnusedResourceMemoryUsagePercentage)) { | 366 if (cmd->HasSwitch(cc::switches::kMaxUnusedResourceMemoryUsagePercentage)) { |
366 int max_unused_resource_memory_percentage; | 367 int max_unused_resource_memory_percentage; |
367 if (GetSwitchValueAsInt( | 368 if (GetSwitchValueAsInt( |
368 *cmd, | 369 *cmd, |
369 cc::switches::kMaxUnusedResourceMemoryUsagePercentage, | 370 cc::switches::kMaxUnusedResourceMemoryUsagePercentage, |
370 0, 100, | 371 0, 100, |
371 &max_unused_resource_memory_percentage)) { | 372 &max_unused_resource_memory_percentage)) { |
372 settings.max_unused_resource_memory_percentage = | 373 settings.max_unused_resource_memory_percentage = |
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
936 cc::ContextProvider* provider = | 937 cc::ContextProvider* provider = |
937 compositor_deps_->GetSharedMainThreadContextProvider(); | 938 compositor_deps_->GetSharedMainThreadContextProvider(); |
938 // provider can be NULL after the GPU process crashed enough times and we | 939 // provider can be NULL after the GPU process crashed enough times and we |
939 // don't want to restart it any more (falling back to software). | 940 // don't want to restart it any more (falling back to software). |
940 if (!provider) | 941 if (!provider) |
941 return; | 942 return; |
942 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 943 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
943 } | 944 } |
944 | 945 |
945 } // namespace content | 946 } // namespace content |
OLD | NEW |