# This test exercises offscreen pipelines (See Transaction::render_offscreen).
# Two offscreen pipelines are submitted, both producing snapshots. Only one
# of the snapshot is used, no red should be visible in the final output.
---
pipelines:
# The first offscreen pipeline will be rendered, but its output won't be used.
# The test only sanity-checks that this doesn't affect the test output.
- id: [0, 1]
  offscreen: true
  items:
  - type: stacking-context
    bounds: [0, 0, 200, 200]
    snapshot:
      name: "snap0"
      area: [0, 0, 200, 200]
    items:
      - type: rect
        bounds: [ 0, 0, 200, 200 ]
        color: [255, 0, 0]
- id: [0, 2]
  offscreen: true
  items:
  # This rect should not be visible, since it isn't part of a snapshot.
  - type: rect
    bounds: [-200, -200, 20000, 20000 ]
    color: [255, 0, 0]
  - type: stacking-context
    bounds: [0, 0, 100, 100]
    snapshot:
      name: "snap1"
      area: [0, 0, 100, 100]
    items:
      - type: rect
        bounds: [ 0, 0, 100, 100 ]
        color: [0, 0, 255]
root:
  items:
    - type: stacking-context
      bounds: [0, 0, 100, 100]
      items:
      - image: snapshot(snap1)
        bounds: [0, 0, 100, 100]
