Home | History | Annotate | Download | only in base
      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 has
     19 // drawn.
     20 const char kDisableMainFrameBeforeDraw[] = "disable-main-frame-before-draw";
     21 
     22 // Disables sending the next BeginMainFrame before the previous commit
     23 // activates. Overrides the kEnableMainFrameBeforeActivation flag.
     24 const char kDisableMainFrameBeforeActivation[] =
     25     "disable-main-frame-before-activation";
     26 
     27 // Enables sending the next BeginMainFrame before the previous commit activates.
     28 const char kEnableMainFrameBeforeActivation[] =
     29     "enable-main-frame-before-activation";
     30 
     31 const char kEnableTopControlsPositionCalculation[] =
     32     "enable-top-controls-position-calculation";
     33 
     34 // The height of the movable top controls.
     35 const char kTopControlsHeight[] = "top-controls-height";
     36 
     37 // Percentage of the top controls need to be hidden before they will auto hide.
     38 const char kTopControlsHideThreshold[] = "top-controls-hide-threshold";
     39 
     40 // Percentage of the top controls need to be shown before they will auto show.
     41 const char kTopControlsShowThreshold[] = "top-controls-show-threshold";
     42 
     43 // Re-rasters everything multiple times to simulate a much slower machine.
     44 // Give a scale factor to cause raster to take that many times longer to
     45 // complete, such as --slow-down-raster-scale-factor=25.
     46 const char kSlowDownRasterScaleFactor[] = "slow-down-raster-scale-factor";
     47 
     48 // Max tiles allowed for each tilings interest area.
     49 const char kMaxTilesForInterestArea[] = "max-tiles-for-interest-area";
     50 
     51 // The amount of unused resource memory compositor is allowed to keep around.
     52 const char kMaxUnusedResourceMemoryUsagePercentage[] =
     53     "max-unused-resource-memory-usage-percentage";
     54 
     55 // Causes the compositor to render to textures which are then sent to the parent
     56 // through the texture mailbox mechanism.
     57 // Requires --enable-compositor-frame-message.
     58 const char kCompositeToMailbox[] = "composite-to-mailbox";
     59 
     60 // Check that property changes during paint do not occur.
     61 const char kStrictLayerPropertyChangeChecking[] =
     62     "strict-layer-property-change-checking";
     63 
     64 // Virtual viewport for fixed-position elements, scrollbars during pinch.
     65 const char kEnablePinchVirtualViewport[] = "enable-pinch-virtual-viewport";
     66 const char kDisablePinchVirtualViewport[] = "disable-pinch-virtual-viewport";
     67 
     68 // Disable partial swap which is needed for some OpenGL drivers / emulators.
     69 const char kUIDisablePartialSwap[] = "ui-disable-partial-swap";
     70 
     71 // Enables the GPU benchmarking extension
     72 const char kEnableGpuBenchmarking[] = "enable-gpu-benchmarking";
     73 
     74 // Renders a border around compositor layers to help debug and study
     75 // layer compositing.
     76 const char kShowCompositedLayerBorders[] = "show-composited-layer-borders";
     77 const char kUIShowCompositedLayerBorders[] = "ui-show-layer-borders";
     78 
     79 // Draws a FPS indicator
     80 const char kShowFPSCounter[] = "show-fps-counter";
     81 const char kUIShowFPSCounter[] = "ui-show-fps-counter";
     82 
     83 // Renders a border that represents the bounding box for the layer's animation.
     84 const char kShowLayerAnimationBounds[] = "show-layer-animation-bounds";
     85 const char kUIShowLayerAnimationBounds[] = "ui-show-layer-animation-bounds";
     86 
     87 // Show rects in the HUD around layers whose properties have changed.
     88 const char kShowPropertyChangedRects[] = "show-property-changed-rects";
     89 const char kUIShowPropertyChangedRects[] = "ui-show-property-changed-rects";
     90 
     91 // Show rects in the HUD around damage as it is recorded into each render
     92 // surface.
     93 const char kShowSurfaceDamageRects[] = "show-surface-damage-rects";
     94 const char kUIShowSurfaceDamageRects[] = "ui-show-surface-damage-rects";
     95 
     96 // Show rects in the HUD around the screen-space transformed bounds of every
     97 // layer.
     98 const char kShowScreenSpaceRects[] = "show-screenspace-rects";
     99 const char kUIShowScreenSpaceRects[] = "ui-show-screenspace-rects";
    100 
    101 // Show rects in the HUD around the screen-space transformed bounds of every
    102 // layer's replica, when they have one.
    103 const char kShowReplicaScreenSpaceRects[] = "show-replica-screenspace-rects";
    104 const char kUIShowReplicaScreenSpaceRects[] =
    105     "ui-show-replica-screenspace-rects";
    106 
    107 // Show rects in the HUD wherever something is known to be drawn opaque and is
    108 // considered occluding the pixels behind it.
    109 const char kShowOccludingRects[] = "show-occluding-rects";
    110 const char kUIShowOccludingRects[] = "ui-show-occluding-rects";
    111 
    112 // Show rects in the HUD wherever something is not known to be drawn opaque and
    113 // is not considered to be occluding the pixels behind it.
    114 const char kShowNonOccludingRects[] = "show-nonoccluding-rects";
    115 const char kUIShowNonOccludingRects[] = "ui-show-nonoccluding-rects";
    116 
    117 // Prevents the layer tree unit tests from timing out.
    118 const char kCCLayerTreeTestNoTimeout[] = "cc-layer-tree-test-no-timeout";
    119 
    120 // Makes pixel tests write their output instead of read it.
    121 const char kCCRebaselinePixeltests[] = "cc-rebaseline-pixeltests";
    122 
    123 }  // namespace switches
    124 }  // namespace cc
    125