Package icyllis.arc3d.engine.trash.ops

# Class Op

java.lang.Object
icyllis.arc3d.core.Rect2f
icyllis.arc3d.engine.trash.ops.Op

All Implemented Interfaces:
  `Rect2fc`

Direct Known Subclasses:
  `ClearOp`, `DrawOp`

@Deprecated public abstract class Op extends Rect2f
Deprecated.
Op is the base class for all deferred GPU operations. To facilitate reordering and to minimize draw calls, Engine does not generate geometry inline with draw calls. Instead, it captures the arguments to the draw and then generates the geometry when flushing. This gives Op subclasses complete freedom to decide how/when to combine in order to produce fewer draw calls and minimize state changes.

Ops of the same subclass may be merged or chained using combineIfPossible. When two ops merge, one takes on the union of the data and the other is left empty. The merged op becomes responsible for drawing the data from both the original ops. When ops are chained each op maintains its own data but they are linked in a list and the head op becomes responsible for executing the work for the chain.

It is required that chain-ability is transitive. Moreover, if op A is able to merge with B then it must be the case that any op that can chain with A will either merge or chain with any op that can chain to B.

The bounds of the op must contain all the vertices in device space *irrespective* of the clip. The bounds are used in determining which clip elements must be applied and thus the bounds cannot in turn depend upon the clip.

- ## Field Summary

  ### Fields inherited from class icyllis.arc3d.core.Rect2f

  `mBottom, mLeft, mRight, mTop`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Op()`
  Deprecated.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final void`
  `chainConcat(Op next)`
  Deprecated.
  Concatenates two op chains.
  `final Op`
  `chainSplit()`
  Deprecated.
  Cuts the chain after this op.
  `final boolean`
  `hasAABloat()`
  Deprecated.
  `final boolean`
  `hasZeroArea()`
  Deprecated.
  `final boolean`
  `isChainHead()`
  Deprecated.
  Returns true if this is the head of a chain (including a length 1 chain).
  `final boolean`
  `isChainTail()`
  Deprecated.
  Returns true if this is the tail of a chain (including a length 1 chain).
  `final boolean`
  `mayChain(Op op)`
  Deprecated.
  The op that this method was called on now represents its own work plus that of the passed op.
  `final Op`
  `nextInChain()`
  Deprecated.
  The next op in the chain.
  `abstract void`
  `onExecute(OpFlushState state, Rect2f chainBounds)`
  Deprecated.
  Issues the op chain's commands to `OpsRenderPass`.
  `protected boolean`
  `onMayChain(Op op)`
  Deprecated.
  `abstract void`
  `onPrepare(OpFlushState state, ImageProxyView writeView, int pipelineFlags)`
  Deprecated.
  Called prior to executing.
  `abstract void`
  `onPrePrepare(RecordingContext context, ImageProxyView writeView, int pipelineFlags)`
  Deprecated.
  This can optionally be called before 'prepare' (but after sorting).
  `final Op`
  `prevInChain()`
  Deprecated.
  The previous op in the chain.
  `protected final void`
  `setBoundsFlags(boolean aaBloat, boolean zeroArea)`
  Deprecated.
  Must be called at least once before use.
  `final void`
  `setClippedBounds(Rect2f clippedBounds)`
  Deprecated.
  `final boolean`
  `validateChain(Op expectedTail)`
  Deprecated.
  Debug tool.
  `void`
  `visitProxies(SurfaceVisitor func)`
  Deprecated.

  ### Methods inherited from class icyllis.arc3d.core.Rect2f

  `adjust, adjust, adjust, bottom, centerX, centerY, contains, contains, contains, contains, empty, equals, halfHeight, halfWidth, hashCode, height, inset, inset, inset, inset, intersect, intersect, intersect, intersect, intersectNoCheck, intersectNoCheck, intersectNoCheck, intersects, intersects, intersects, intersects, isEmpty, isFinite, isSorted, join, join, join, join, joinNoCheck, joinNoCheck, joinNoCheck, left, offset, offsetTo, outset, rectsOverlap, rectsTouchOrOverlap, right, round, round, roundIn, roundIn, roundOut, roundOut, set, set, set, setBounds, setBoundsNoCheck, setEmpty, sort, store, store, subtract, top, toString, width, x, y`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### Op

    public Op()
    Deprecated.

- ## Method Details

  - ### visitProxies

    public void visitProxies(SurfaceVisitor func)
    Deprecated.

  - ### mayChain

    public final boolean mayChain(@Nonnull Op op)
    Deprecated.
    The op that this method was called on now represents its own work plus that of the passed op. If the pipeline state used by two ops is the same, they can be batched through indexed rendering or instanced rendering. If this method returns true, it means that the passed op will be added to the tail of the chain, while the head op is responsible for rendering the chain.

  - ### onMayChain

    protected boolean onMayChain(@Nonnull Op op)
    Deprecated.

  - ### setBoundsFlags

    protected final void setBoundsFlags(boolean aaBloat, boolean zeroArea)
    Deprecated.
    Must be called at least once before use.

  - ### setClippedBounds

    public final void setClippedBounds(Rect2f clippedBounds)
    Deprecated.

  - ### hasAABloat

    public final boolean hasAABloat()
    Deprecated.
    Returns:
      true if this has DEAA bloat when determining coverage (outset by 0.5)

  - ### hasZeroArea

    public final boolean hasZeroArea()
    Deprecated.
    Returns:
      true if this draws a primitive that has zero area, we can also call hairline

  - ### onPrePrepare

    public abstract void onPrePrepare(RecordingContext context, ImageProxyView writeView, int pipelineFlags)
    Deprecated.
    This can optionally be called before 'prepare' (but after sorting). Each op that overrides onPrePrepare must be prepared to handle both cases (when onPrePrepare has been called ahead of time and when it has not been called).

  - ### onPrepare

    public abstract void onPrepare(OpFlushState state, ImageProxyView writeView, int pipelineFlags)
    Deprecated.
    Called prior to executing. The op should perform any resource creation or data transfers necessary before execute() is called.

  - ### onExecute

    public abstract void onExecute(OpFlushState state, Rect2f chainBounds)
    Deprecated.
    Issues the op chain's commands to `OpsRenderPass`.
    Parameters:
      `chainBounds` - If this op is chained then chainBounds is the union of the bounds of all ops in the chain. Otherwise, this op's bounds.

  - ### chainConcat

    public final void chainConcat(@Nonnull Op next)
    Deprecated.
    Concatenates two op chains. This op must be a tail and the passed op must be a head. The ops must be of the same subclass.

  - ### isChainHead

    public final boolean isChainHead()
    Deprecated.
    Returns true if this is the head of a chain (including a length 1 chain).

  - ### isChainTail

    public final boolean isChainTail()
    Deprecated.
    Returns true if this is the tail of a chain (including a length 1 chain).

  - ### nextInChain

    public final Op nextInChain()
    Deprecated.
    The next op in the chain.

  - ### prevInChain

    public final Op prevInChain()
    Deprecated.
    The previous op in the chain.

  - ### chainSplit

    @Nullable public final Op chainSplit()
    Deprecated.
    Cuts the chain after this op. The returned op is the op that was previously next in the chain or null if this was already a tail.

  - ### validateChain

    public final boolean validateChain(Op expectedTail)
    Deprecated.
    Debug tool.