Lines Matching defs:clip
49 // is empty). This behavior is desired for the following clip effect policies.
150 // clip or draw would snap outside an aa element.
201 // Functions for rendering / applying clip shapes in various ways
203 // - Represent the clip element as an analytic FP that tests sk_FragCoord vs. its device shape
204 // - Render the clip element to the stencil, if stencil is allowed and supports the AA, and the
206 // - Try to put the individual element into a clip atlas, which is then sampled during the draw
214 // All analytic clip shape FPs need to be in device space
332 // the clip stack is modified on the main thread
348 SkDEBUGFAIL("Unable to allocate SW clip mask.");
407 // Be slightly more forgiving on whether or not a draw is inside a clip element.
414 // Common clip type interface
515 // with the clip op toggled.
540 // Except for axis-aligned clip rects, upgrade to AA when forced. We skip axis-aligned clip
561 // clip rects we always just round so that they can be scissor-only (avoiding the
589 // center. We could round out, but rasterization would still result in an empty clip.
614 // pixel aligned, so after intersection clip behavior should respect its aa type.
686 // Mark both elements as invalid to signal that the clip is fully empty
713 // Map from the internal shape kind to the clip state enum
763 // baked into it, so it can be reused to clip the smaller draw.
904 // The clip is already empty, and we only shrink, so there's no need to record this element.
917 // The combination results in an empty clip
922 // The combination would not be any different than the existing clip
938 // When the stack was wide open and the clip effect was kBoth, the "complex" manner is
945 // Some form of actual clip element(s) to combine with.
985 // clip, so assert that's the case.
1019 // Both new and old invalid implies the entire clip becomes empty
1023 // The new element doesn't change the clip beyond what the old element already does
1105 // This invalidates all older elements that are owned by save records lower in the clip stack.
1113 // NOTE: Based on draw calls in all GMs, SKPs, and SVGs as of 08/20, 98% use a clip stack with
1117 // these stacks means that clip management will incur a single allocation for the remaining 2%
1126 // And from this same draw call set, the most complex clip could only use 5 analytic coverage FPs.
1149 // Invalidate all mask keys that remain. Since we're tearing the clip stack down, we don't need
1209 // Early out if we know a priori that the clip is full 0s or full 1s.
1217 // Given argument order, 'A' == current clip, 'B' == draw
1230 // But if it did, it technically means the draw covered the clip and should be
1244 // The clip stack has complex shapes, multiple elements, or a shader; we could
1278 // Early out if we know a priori that the clip is full 0s or full 1s.
1286 // Convert any clip shader first, since it's not geometrically related to the draw bounds
1295 // is multiplied properly with the alpha of the clip shader.
1300 // A refers to the entire clip stack, B refers to the draw
1320 // The draw is combined with the saved clip elements; the below logic tries to skip
1331 // Initially we keep this as large as possible; if the clip is applied solely with coverage
1392 // First check if the op knows how to apply this clip internally.
1451 // More detailed analysis of the element shapes determined no clip is needed
1476 // Must use a texture mask to represent the combined clip elements since the stencil
1527 // Masks and geometry elements are not invalidated by updating the clip shader
1545 void ClipStack::clip(RawElement&& element) {
1551 // and ensures the element's bounds are clipped to the device (NOT the conservative clip bounds,
1561 // If the shape is empty and we're subtracting, this has no effect on the clip
1564 // else we will make the clip empty, but we need a new save record to record that change
1565 // in the clip state; fall through to below and updateForElement() will handle it.
1600 SkIRect maskBounds; // may not be 'bounds' if we reuse a large clip mask