Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / cc / base / switches.cc
index be4a2c5..c287256 100644 (file)
@@ -36,10 +36,14 @@ const char kEnableImplSidePainting[] = "enable-impl-side-painting";
 const char kEnableTopControlsPositionCalculation[] =
     "enable-top-controls-position-calculation";
 
-// For any layers that can get drawn directly to screen, draw them with the Skia
-// GPU backend.  Only valid with gl rendering + threaded compositing + impl-side
-// painting.
-const char kForceDirectLayerDrawing[] = "force-direct-layer-drawing";
+// Allow heuristics to determine when a layer tile should be drawn with
+// the Skia GPU backend.  Only valid with GPU accelerated compositing +
+// impl-side painting.
+const char kEnableGPURasterization[] = "enable-gpu-rasterization";
+
+// Disable GPU rasterization, i.e. rasterize on the CPU only.
+// Overrides the kEnableGPURasterization flag.
+const char kDisableGPURasterization[] = "disable-gpu-rasterization";
 
 // The height of the movable top controls.
 const char kTopControlsHeight[] = "top-controls-height";
@@ -50,9 +54,6 @@ const char kTopControlsHideThreshold[] = "top-controls-hide-threshold";
 // Percentage of the top controls need to be shown before they will auto show.
 const char kTopControlsShowThreshold[] = "top-controls-show-threshold";
 
-// Number of worker threads used to rasterize content.
-const char kNumRasterThreads[] = "num-raster-threads";
-
 // Show metrics about overdraw in about:tracing recordings, such as the number
 // of pixels culled, and the number of pixels drawn, for each frame.
 const char kTraceOverdraw[] = "trace-overdraw";
@@ -62,10 +63,6 @@ const char kTraceOverdraw[] = "trace-overdraw";
 // complete, such as --slow-down-raster-scale-factor=25.
 const char kSlowDownRasterScaleFactor[] = "slow-down-raster-scale-factor";
 
-// The scale factor for low resolution tile contents.
-const char kLowResolutionContentsScaleFactor[] =
-    "low-resolution-contents-scale-factor";
-
 // Max tiles allowed for each tilings interest area.
 const char kMaxTilesForInterestArea[] = "max-tiles-for-interest-area";
 
@@ -85,13 +82,15 @@ const char kStrictLayerPropertyChangeChecking[] =
 // Virtual viewport for fixed-position elements, scrollbars during pinch.
 const char kEnablePinchVirtualViewport[] = "enable-pinch-virtual-viewport";
 
-const char kEnablePartialSwap[] = "enable-partial-swap";
 // Disable partial swap which is needed for some OpenGL drivers / emulators.
 const char kUIDisablePartialSwap[] = "ui-disable-partial-swap";
 
 const char kEnablePerTilePainting[] = "enable-per-tile-painting";
 const char kUIEnablePerTilePainting[] = "ui-enable-per-tile-painting";
 
+// Enables the GPU benchmarking extension
+const char kEnableGpuBenchmarking[] = "enable-gpu-benchmarking";
+
 // Renders a border around compositor layers to help debug and study
 // layer compositing.
 const char kShowCompositedLayerBorders[] = "show-composited-layer-borders";
@@ -101,6 +100,10 @@ const char kUIShowCompositedLayerBorders[] = "ui-show-layer-borders";
 const char kShowFPSCounter[] = "show-fps-counter";
 const char kUIShowFPSCounter[] = "ui-show-fps-counter";
 
+// Renders a border that represents the bounding box for the layer's animation.
+const char kShowLayerAnimationBounds[] = "show-layer-animation-bounds";
+const char kUIShowLayerAnimationBounds[] = "ui-show-layer-animation-bounds";
+
 // Show rects in the HUD around layers whose properties have changed.
 const char kShowPropertyChangedRects[] = "show-property-changed-rects";
 const char kUIShowPropertyChangedRects[] = "ui-show-property-changed-rects";
@@ -153,9 +156,9 @@ const char kDisableCompositorTouchHitTesting[] =
 
 bool IsLCDTextEnabled() {
   const CommandLine* command_line = CommandLine::ForCurrentProcess();
-  if (command_line->HasSwitch(cc::switches::kDisableLCDText))
+  if (command_line->HasSwitch(switches::kDisableLCDText))
     return false;
-  else if (command_line->HasSwitch(cc::switches::kEnableLCDText))
+  else if (command_line->HasSwitch(switches::kEnableLCDText))
     return true;
 
 #if defined(OS_ANDROID)
@@ -165,13 +168,23 @@ bool IsLCDTextEnabled() {
 #endif
 }
 
-namespace {
-bool CheckImplSidePaintingStatus() {
+bool IsGpuRasterizationEnabled() {
   const CommandLine& command_line = *CommandLine::ForCurrentProcess();
 
-  if (command_line.HasSwitch(cc::switches::kDisableImplSidePainting))
+  if (command_line.HasSwitch(switches::kDisableGPURasterization))
     return false;
-  else if (command_line.HasSwitch(cc::switches::kEnableImplSidePainting))
+  else if (command_line.HasSwitch(switches::kEnableGPURasterization))
+    return true;
+
+  return false;
+}
+
+bool IsImplSidePaintingEnabled() {
+  const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+
+  if (command_line.HasSwitch(switches::kDisableImplSidePainting))
+    return false;
+  else if (command_line.HasSwitch(switches::kEnableImplSidePainting))
     return true;
 
 #if defined(OS_ANDROID)
@@ -180,19 +193,13 @@ bool CheckImplSidePaintingStatus() {
   return false;
 #endif
 }
-}  // namespace
-
-bool IsImplSidePaintingEnabled() {
-  static bool enabled = CheckImplSidePaintingStatus();
-  return enabled;
-}
 
 bool IsMapImageEnabled() {
   const CommandLine& command_line = *CommandLine::ForCurrentProcess();
 
-  if (command_line.HasSwitch(cc::switches::kDisableMapImage))
+  if (command_line.HasSwitch(switches::kDisableMapImage))
     return false;
-  else if (command_line.HasSwitch(cc::switches::kEnableMapImage))
+  else if (command_line.HasSwitch(switches::kEnableMapImage))
     return true;
 
   return false;