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

Unified Diff: cc/layer_tree_settings.cc

Issue 11830040: cc: Do not request redraw on commit when impl-side painting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@decouple_draw3
Patch Set: fix cc_unittests Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: cc/layer_tree_settings.cc
diff --git a/cc/layer_tree_settings.cc b/cc/layer_tree_settings.cc
index 70f2b2c42a22a980f645e39a66319ff10c1b1908..98e4b739561e7e30482f4520d91a7fef95f692b4 100644
--- a/cc/layer_tree_settings.cc
+++ b/cc/layer_tree_settings.cc
@@ -36,12 +36,6 @@ LayerTreeSettings::LayerTreeSettings()
, maxUntiledLayerSize(gfx::Size(512, 512))
, minimumOcclusionTrackingSize(gfx::Size(160, 160))
{
- // TODO(danakj): Move this to chromium when we don't go through the WebKit API anymore.
- compositorFrameMessage = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kEnableCompositorFrameMessage);
- partialSwapEnabled = CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnablePartialSwap);
- backgroundColorInsteadOfCheckerboard = CommandLine::ForCurrentProcess()->HasSwitch(switches::kBackgroundColorInsteadOfCheckerboard);
- showOverdrawInTracing = CommandLine::ForCurrentProcess()->HasSwitch(switches::kTraceOverdraw);
-
// TODO(alokp): Remove this hard-coded setting.
// Platforms that need to disable LCD text must explicitly set this value.
#if defined(OS_ANDROID)
@@ -58,18 +52,26 @@ LayerTreeSettings::LayerTreeSettings()
useLinearFadeScrollbarAnimator = true;
#endif
- initialDebugState.showPropertyChangedRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kShowPropertyChangedRects);
- initialDebugState.showSurfaceDamageRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kShowSurfaceDamageRects);
- initialDebugState.showScreenSpaceRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kShowScreenSpaceRects);
- initialDebugState.showReplicaScreenSpaceRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kShowReplicaScreenSpaceRects);
- initialDebugState.showOccludingRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kShowOccludingRects);
- initialDebugState.showNonOccludingRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kShowNonOccludingRects);
+ CommandLine* command_line = CommandLine::ForCurrentProcess();
+
+ // TODO(danakj): Move this to chromium when we don't go through the WebKit API anymore.
+ compositorFrameMessage = command_line->HasSwitch(cc::switches::kEnableCompositorFrameMessage);
+ partialSwapEnabled = command_line->HasSwitch(switches::kEnablePartialSwap);
+ backgroundColorInsteadOfCheckerboard = command_line->HasSwitch(switches::kBackgroundColorInsteadOfCheckerboard);
+ showOverdrawInTracing = command_line->HasSwitch(switches::kTraceOverdraw);
+
+ initialDebugState.showPropertyChangedRects = command_line->HasSwitch(cc::switches::kShowPropertyChangedRects);
+ initialDebugState.showSurfaceDamageRects = command_line->HasSwitch(cc::switches::kShowSurfaceDamageRects);
+ initialDebugState.showScreenSpaceRects = command_line->HasSwitch(cc::switches::kShowScreenSpaceRects);
+ initialDebugState.showReplicaScreenSpaceRects = command_line->HasSwitch(cc::switches::kShowReplicaScreenSpaceRects);
+ initialDebugState.showOccludingRects = command_line->HasSwitch(cc::switches::kShowOccludingRects);
+ initialDebugState.showNonOccludingRects = command_line->HasSwitch(cc::switches::kShowNonOccludingRects);
- if (CommandLine::ForCurrentProcess()->HasSwitch(
nduca 2013/01/15 01:54:54 i'm confused about the code movement here, whats t
brianderson 2013/01/15 02:01:56 I should undo this. At some point, I was adding a
+ if (command_line->HasSwitch(
switches::kNumRasterThreads)) {
const size_t kMaxRasterThreads = 64;
std::string num_raster_threads =
- CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ command_line->GetSwitchValueASCII(
switches::kNumRasterThreads);
int num_threads;
if (base::StringToInt(num_raster_threads, &num_threads) &&

Powered by Google App Engine
This is Rietveld 408576698