Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Side by Side Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 1236533004: cc: Change max_tiles_for_interest_rect to be screen pixels padding. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 *cmd, 357 *cmd,
358 cc::switches::kSlowDownRasterScaleFactor, 358 cc::switches::kSlowDownRasterScaleFactor,
359 kMinSlowDownScaleFactor, 359 kMinSlowDownScaleFactor,
360 kMaxSlowDownScaleFactor, 360 kMaxSlowDownScaleFactor,
361 &settings.initial_debug_state.slow_down_raster_scale_factor); 361 &settings.initial_debug_state.slow_down_raster_scale_factor);
362 } 362 }
363 363
364 settings.invert_viewport_scroll_order = 364 settings.invert_viewport_scroll_order =
365 cmd->HasSwitch(switches::kInvertViewportScrollOrder); 365 cmd->HasSwitch(switches::kInvertViewportScrollOrder);
366 366
367 if (cmd->HasSwitch(cc::switches::kMaxTilesForInterestArea)) {
368 int max_tiles_for_interest_area;
369 if (GetSwitchValueAsInt(*cmd,
370 cc::switches::kMaxTilesForInterestArea,
371 1, std::numeric_limits<int>::max(),
372 &max_tiles_for_interest_area))
373 settings.max_tiles_for_interest_area = max_tiles_for_interest_area;
374 }
375
376 if (cmd->HasSwitch(cc::switches::kMaxUnusedResourceMemoryUsagePercentage)) { 367 if (cmd->HasSwitch(cc::switches::kMaxUnusedResourceMemoryUsagePercentage)) {
377 int max_unused_resource_memory_percentage; 368 int max_unused_resource_memory_percentage;
378 if (GetSwitchValueAsInt( 369 if (GetSwitchValueAsInt(
379 *cmd, 370 *cmd,
380 cc::switches::kMaxUnusedResourceMemoryUsagePercentage, 371 cc::switches::kMaxUnusedResourceMemoryUsagePercentage,
381 0, 100, 372 0, 100,
382 &max_unused_resource_memory_percentage)) { 373 &max_unused_resource_memory_percentage)) {
383 settings.max_unused_resource_memory_percentage = 374 settings.max_unused_resource_memory_percentage =
384 max_unused_resource_memory_percentage; 375 max_unused_resource_memory_percentage;
385 } 376 }
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
1037 return; 1028 return;
1038 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); 1029 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM();
1039 } 1030 }
1040 1031
1041 void RenderWidgetCompositor::SetSurfaceIdNamespace( 1032 void RenderWidgetCompositor::SetSurfaceIdNamespace(
1042 uint32_t surface_id_namespace) { 1033 uint32_t surface_id_namespace) {
1043 layer_tree_host_->set_surface_id_namespace(surface_id_namespace); 1034 layer_tree_host_->set_surface_id_namespace(surface_id_namespace);
1044 } 1035 }
1045 1036
1046 } // namespace content 1037 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698