Lines Matching defs:element
150 // clip or draw would snap outside an aa element.
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
205 // size of the element indicates stenciling will be worth it, vs. making a mask.
206 // - Try to put the individual element into a clip atlas, which is then sampled during the draw
207 // - Render the element into a SW mask and upload it. If possible, the SW rasterization happens
262 // If the first element to draw is an intersect, we clear to 0 and will draw it directly with
264 // If the first element to draw is a difference, we clear to 1, and in all cases we draw the
265 // difference element directly with coverage 0.
274 // draw the inverse-filled shape with 0 coverage to erase everything outside the element
275 // But if we are the first element, we can draw directly with coverage 1 since we
292 // every element is drawn with the kReplace_Op
407 // Be slightly more forgiving on whether or not a draw is inside a clip element.
646 // Can reduce to a single element
679 // Already doesn't do anything, so skip this element
683 // 'A' refers to this element, 'B' refers to 'added'.
692 // This element already clips more than 'added', so mark 'added' is invalid to skip it
697 // 'added' clips more than this element, so mark this as invalid
836 bool ClipStack::SaveRecord::contains(const ClipStack::RawElement& element) const {
837 return fInnerBounds.contains(element.outerBounds());
850 // still-present element can be un-invalidated based on that.
888 // The total coverage is computed by multiplying the coverage from each element (shape or
896 // Validity check the element's state first; if the shape class isn't empty, the outer bounds
900 // And we shouldn't be adding an element if we have a deferred save
904 // The clip is already empty, and we only shrink, so there's no need to record this element.
914 // element.
927 // just the new element.
932 // The new element combines in a complex manner, so update the stack's bounds based on
933 // the combination of its and the new element's ops (handled below)
939 // simply to keep the element and update the stack bounds to be the element's intersected
945 // Some form of actual clip element(s) to combine with.
983 // If we get here, we're keeping the new element and the stack's bounds have been updated.
993 // Update past elements to account for the new element
998 // newest element; since it's the active part of the stack, no restore() can bring them back).
1003 // After the loop, this is the earliest active element that was invalidated. It may be
1005 // the new element instead of allocating more.
1023 // The new element doesn't change the clip beyond what the old element already does
1027 // The new element cancels out the old element. The new element may have been modified
1028 // to account for the old element's geometry.
1030 // Still active, so the invalidated index could be used to store the new element
1086 // The aggregate state of the save record mirrors the element
1092 // All prior active element can be removed from the stack: [startingIndex, count - 1]
1116 // encountered element stack depth was 5 and the max save depth was 6. Using an increment of 8 for
1245 // iterate per element like we would in apply(), but preApply() is meant to be
1333 // We tighten it later if any form of mask or atlas element is needed.
1340 // have an element that wouldn't affect the scissored draw bounds, but does affect the regular
1342 // element but definitely cannot then drop the scissor.
1376 // We don't need to produce a coverage FP or mask for the element
1380 // Shouldn't happen for draws, fall through to regular element processing
1385 // The element must apply coverage to the draw, enable the scissor to limit overdraw
1451 // More detailed analysis of the element shapes determined no clip is needed
1545 void ClipStack::clip(RawElement&& element) {
1551 // and ensures the element's bounds are clipped to the device (NOT the conservative clip bounds,
1554 element.simplify(fDeviceBounds, fForceAA);
1555 SkASSERT(!element.shape().inverted());
1559 if (element.shape().isEmpty()) {
1560 if (element.op() == SkClipOp::kDifference) {
1572 if (!save.addElement(std::move(element), &fElements)) {
1574 // We made a new save record, but ended up not adding an element to the stack.
1580 // Should not have changed gen ID if the element and save were not modified