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

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

Issue 12502016: cc: Add command line switch to control resource usage for impl-side painting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 250
251 if (cmd->HasSwitch(cc::switches::kMaxTilesForInterestArea)) { 251 if (cmd->HasSwitch(cc::switches::kMaxTilesForInterestArea)) {
252 int max_tiles_for_interest_area; 252 int max_tiles_for_interest_area;
253 if (GetSwitchValueAsInt(*cmd, 253 if (GetSwitchValueAsInt(*cmd,
254 cc::switches::kMaxTilesForInterestArea, 254 cc::switches::kMaxTilesForInterestArea,
255 1, std::numeric_limits<int>::max(), 255 1, std::numeric_limits<int>::max(),
256 &max_tiles_for_interest_area)) 256 &max_tiles_for_interest_area))
257 settings.max_tiles_for_interest_area = max_tiles_for_interest_area; 257 settings.max_tiles_for_interest_area = max_tiles_for_interest_area;
258 } 258 }
259 259
260 if (cmd->HasSwitch(cc::switches::kMaxUnusedResourceMemoryUsagePercentage)) {
261 int max_unused_resource_memory_percentage;
262 if (GetSwitchValueAsInt(
263 *cmd,
264 cc::switches::kMaxUnusedResourceMemoryUsagePercentage,
265 0, 100,
266 &max_unused_resource_memory_percentage)) {
267 settings.max_unused_resource_memory_percentage =
268 max_unused_resource_memory_percentage;
269 }
270 }
271
260 #if defined(OS_ANDROID) 272 #if defined(OS_ANDROID)
261 // TODO(danakj): Move these to the android code. 273 // TODO(danakj): Move these to the android code.
262 settings.can_use_lcd_text = false; 274 settings.can_use_lcd_text = false;
263 settings.max_partial_texture_updates = 0; 275 settings.max_partial_texture_updates = 0;
264 settings.use_linear_fade_scrollbar_animator = true; 276 settings.use_linear_fade_scrollbar_animator = true;
265 settings.solid_color_scrollbars = true; 277 settings.solid_color_scrollbars = true;
266 settings.solid_color_scrollbar_color = SkColorSetARGB(128, 128, 128, 128); 278 settings.solid_color_scrollbar_color = SkColorSetARGB(128, 128, 128, 128);
267 settings.solid_color_scrollbar_thickness_dip = 3; 279 settings.solid_color_scrollbar_thickness_dip = 3;
268 #endif 280 #endif
269 281
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); 547 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread();
536 } 548 }
537 549
538 scoped_refptr<cc::ContextProvider> 550 scoped_refptr<cc::ContextProvider>
539 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { 551 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() {
540 return RenderThreadImpl::current()-> 552 return RenderThreadImpl::current()->
541 OffscreenContextProviderForCompositorThread(); 553 OffscreenContextProviderForCompositorThread();
542 } 554 }
543 555
544 } // namespace content 556 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698