1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "cc/base/switches.h" 6 7 #include "base/command_line.h" 8 9 namespace cc { 10 namespace switches { 11 12 const char kDisableThreadedAnimation[] = "disable-threaded-animation"; 13 14 // Disables layer-edge anti-aliasing in the compositor. 15 const char kDisableCompositedAntialiasing[] = 16 "disable-composited-antialiasing"; 17 18 // Disables sending the next BeginMainFrame before the previous commit 19 // activates. Overrides the kEnableMainFrameBeforeActivation flag. 20 const char kDisableMainFrameBeforeActivation[] = 21 "disable-main-frame-before-activation"; 22 23 // Enables sending the next BeginMainFrame before the previous commit activates. 24 const char kEnableMainFrameBeforeActivation[] = 25 "enable-main-frame-before-activation"; 26 27 // Disabled defering all image decodes to the image decode service, ignoring 28 // DecodingMode preferences specified on PaintImage. 29 const char kDisableCheckerImaging[] = "disable-checker-imaging"; 30 31 // Percentage of the browser controls need to be hidden before they will auto 32 // hide. 33 const char kBrowserControlsHideThreshold[] = "top-controls-hide-threshold"; 34 35 // Percentage of the browser controls need to be shown before they will auto 36 // show. 37 const char kBrowserControlsShowThreshold[] = "top-controls-show-threshold"; 38 39 // Re-rasters everything multiple times to simulate a much slower machine. 40 // Give a scale factor to cause raster to take that many times longer to 41 // complete, such as --slow-down-raster-scale-factor=25. 42 const char kSlowDownRasterScaleFactor[] = "slow-down-raster-scale-factor"; 43 44 // Checks damage early and aborts the frame if no damage, so that clients like 45 // Android WebView don't invalidate unnecessarily. 46 const char kCheckDamageEarly[] = "check-damage-early"; 47 48 // Enables the GPU benchmarking extension 49 const char kEnableGpuBenchmarking[] = "enable-gpu-benchmarking"; 50 51 // Disables LayerTreeHost::OnMemoryPressure 52 const char kDisableLayerTreeHostMemoryPressure[] = 53 "disable-layer-tree-host-memory-pressure"; 54 55 // Renders a border around compositor layers to help debug and study 56 // layer compositing. 57 const char kShowCompositedLayerBorders[] = "show-composited-layer-borders"; 58 const char kUIShowCompositedLayerBorders[] = "ui-show-composited-layer-borders"; 59 // Parameters for kUIShowCompositedLayerBorders. 60 const char kCompositedRenderPassBorders[] = "renderpass"; 61 const char kCompositedSurfaceBorders[] = "surface"; 62 const char kCompositedLayerBorders[] = "layer"; 63 64 #if DCHECK_IS_ON() 65 // Checks and logs double background blur as an error if any. 66 const char kLogOnUIDoubleBackgroundBlur[] = "log-on-ui-double-background-blur"; 67 #endif 68 69 // Draws a heads-up-display showing Frames Per Second as well as GPU memory 70 // usage. If you also use --enable-logging=stderr --vmodule="head*=1" then FPS 71 // will also be output to the console log. 72 const char kShowFPSCounter[] = "show-fps-counter"; 73 const char kUIShowFPSCounter[] = "ui-show-fps-counter"; 74 75 // Renders a border that represents the bounding box for the layer's animation. 76 const char kShowLayerAnimationBounds[] = "show-layer-animation-bounds"; 77 const char kUIShowLayerAnimationBounds[] = "ui-show-layer-animation-bounds"; 78 79 // Show rects in the HUD around layers whose properties have changed. 80 const char kShowPropertyChangedRects[] = "show-property-changed-rects"; 81 const char kUIShowPropertyChangedRects[] = "ui-show-property-changed-rects"; 82 83 // Show rects in the HUD around damage as it is recorded into each render 84 // surface. 85 const char kShowSurfaceDamageRects[] = "show-surface-damage-rects"; 86 const char kUIShowSurfaceDamageRects[] = "ui-show-surface-damage-rects"; 87 88 // Show rects in the HUD around the screen-space transformed bounds of every 89 // layer. 90 const char kShowScreenSpaceRects[] = "show-screenspace-rects"; 91 const char kUIShowScreenSpaceRects[] = "ui-show-screenspace-rects"; 92 93 // Highlights layers that can't use lcd text. Layers containing no text won't 94 // be highlighted. See DebugColors::NonLCDTextHighlightColor() for the colors. 95 const char kHighlightNonLCDTextLayers[] = "highlight-non-lcd-text-layers"; 96 97 // Switches the ui compositor to use layer lists instead of layer trees. 98 const char kUIEnableLayerLists[] = "ui-enable-layer-lists"; 99 100 // Allows scaling clipped images in GpuImageDecodeCache. Note that this may 101 // cause color-bleeding. 102 // TODO(crbug.com/1157548): Remove this workaround flag once the underlying 103 // cache problems are solved. 104 const char kEnableClippedImageScaling[] = "enable-scaling-clipped-images"; 105 106 // Prevents the layer tree unit tests from timing out. 107 const char kCCLayerTreeTestNoTimeout[] = "cc-layer-tree-test-no-timeout"; 108 109 // Increases timeout for memory checkers. 110 const char kCCLayerTreeTestLongTimeout[] = "cc-layer-tree-test-long-timeout"; 111 112 // Controls the duration of the scroll animation curve. 113 const char kCCScrollAnimationDurationForTesting[] = 114 "cc-scroll-animation-duration-in-seconds"; 115 116 } // namespace switches 117 } // namespace cc 118