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";
// 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";
// 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";
// 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";
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";
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)
#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)
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;