name: wrench
version: "0.1"
author: Vladimir Vukicevic <vladimir@pobox.com>
about: WebRender testing and debugging utility

args:
  - precache:
      short: c
      long: precache
      help: Precache shaders
  - verbose:
      short: v
      long: verbose
      help: Enable verbose display
  - shaders:
      long: shaders
      help: Override path for shaders
      takes_value: true
  - use_unoptimized_shaders:
      long: use-unoptimized-shaders
      help: Use unoptimized shaders rather than the shaders optimized at build-time
  - rebuild:
      short: r
      long: rebuild
      help: Rebuild display list from scratch every frame
  - no_subpixel_aa:
      short: a
      long: no-subpixel-aa
      help: Disable subpixel aa
  - slow_subpixel:
      long: slow-subpixel
      help: Disable dual source blending
  - headless:
      long: headless
      help: Enable headless rendering
  - angle:
      long: angle
      help: Enable ANGLE rendering (on Windows only)
  - compositor:
      long: compositor
      help: Enable native OS compositor integration
  - software:
      long: software
      help: Enable software rendering
  - size:
      short: s
      long: size
      help: Window size, specified as widthxheight (e.g. 1024x768), in pixels
      takes_value: true
  - vsync:
      long: vsync
      help: Enable vsync for OpenGL window
  - no_scissor:
      long: no-scissor
      help: Disable scissors when clearing render targets
  - no_batch:
      long: no-batch
      help: Disable batching of instanced draw calls
  - chase:
      long: chase
      help: Chase a particular primitive matching the local rect or ID
      takes_value: true
  - dump_shader_source:
      long: dump-shader-source
      help: Dump the source of the specified shader
      takes_value: true
      global: true
  - renderer:
      long: renderer
      help: Select rendering API (gl3, es3)
      takes_value: true
      global: true
  - no_block:
      long: no-block
      help: Don't block on UI events - run event loop as fast as possible.
  - profiler_ui:
      long: profiler-ui
      takes_value: true
      help: A string describing what to show on in the profiler HUD (See https://github.com/servo/webrender/wiki/Debugging-WebRender#anchor_6).

subcommands:
    - png:
        about: render frame described by YAML and save it to a png file
        args:
          - surface:
              short: s
              long: surface
              help: 'What rendered surface to save as PNG, one of: screen, gpu-cache'
              takes_value: true
          - INPUT:
              help: The input YAML file
              required: true
              index: 1
          - OUTPUT:
              help: Optional output path to save to.
              required: false
              index: 2
    - show:
        about: show frame(s) described by YAML, binary recording, or capture
        aliases: ['load', 'replay']
        args:
          - include:
              long: include
              help: Include the given element type. Can be specified multiple times. (rect/image/text/glyphs/border) (YAML only)
              multiple: true
              takes_value: true
          - list-resources:
              long: list-resources
              help: List the resources used by this render (YAML only)
          - watch:
              short: w
              long: watch
              help: Watch the given file, reloading whenever it changes (YAML only)
          - keyframes:
              short: k
              long: keyframes
              takes_value: true
              help: Provide a keyframes file, that can be used to animate the yaml input file
          - scene-id:
              short: s
              long: scene-id
              takes_value: true
              help: Select a starting scene sequence ID (YAML capture sequence only).
          - frame-id:
              short: f
              long: frame-id
              takes_value: true
              help: Select a starting frame sequence ID (YAML capture sequence only).
          - INPUT:
              help: The input YAML, binary recording, or capture directory
              required: true
              index: 1
    - reftest:
        about: run reftests
        args:
          - fuzz_tolerance:
              long: fuzzy
              takes_value: true
              help: Add a minimum fuzziness tolerance to all tests.
              required: false
          - REFTEST:
              help: a specific reftest or directory to run
              required: false
              index: 1
    - rawtest:
        about: run rawtests
    - perf:
        about: run benchmarks
        args:
          - filename:
              help: name of the file to save benchmarks to
              required: true
              index: 1
          - benchmark:
              help: benchmark list filename (default is benchmarks/benchmarks.list)
              required: false
              index: 2
          - auto-filename:
              long: auto-filename
              help: generate output filename from date and time (user provided filename is the directory prefix)
              required: false
          - csv:
              long: csv
              help: save benchmark results as .csv (default is json)
              required: false
          - warmup_frames:
              long: warmup_frames
              takes_value: true
              help: number of frames to skip before recording timings
              required: false
          - sample_count:
              long: sample_count
              takes_value: true
              help: number of samples to capture
    - test_invalidation:
        about: run invalidation tests
    - compare_perf:
        about: compare two benchmark files
        args:
          - first_filename:
              help: first benchmark file to compare
              required: true
              index: 1
          - second_filename:
              help: second benchmark file to compare
              required: true
              index: 2
    - test_init:
        about: Test for successful initialization then exit immediately
    - test_shaders:
        about: run shader tests
