8#ifndef GrAppliedClip_DEFINED
9#define GrAppliedClip_DEFINED
34 : fScissorState(backingStoreDims) {
56 fScissorState.
set(irect);
61 fWindowRectsState = windowState;
66 fWindowRectsState.
set(windows,
mode);
79 return fScissorState == that.fScissorState &&
80 fWindowRectsState == that.fWindowRectsState &&
81 fStencilStackID == that.fStencilStackID;
102 : fHardClip(logicalRTDims, backingStoreDims) {}
114 return fCoverageFP.get();
118 return std::move(fCoverageFP);
125 if (fCoverageFP ==
nullptr) {
126 fCoverageFP = std::move(
fp);
134 return fHardClip.
doesClip() || fCoverageFP !=
nullptr;
138 if (fHardClip != that.fHardClip ||
142 if (fCoverageFP !=
nullptr && !fCoverageFP->isEqual(*that.fCoverageFP)) {
150 if (fCoverageFP !=
nullptr) {
151 fCoverageFP->visitProxies(func);
157 std::unique_ptr<GrFragmentProcessor> fCoverageFP;
std::function< void(GrSurfaceProxy *, skgpu::Mipmapped)> GrVisitProxyFunc
const GrAppliedHardClip & hardClip() const
std::unique_ptr< GrFragmentProcessor > detachCoverageFragmentProcessor()
static GrAppliedClip Disabled()
const GrWindowRectsState & windowRectsState() const
uint32_t stencilStackID() const
void visitProxies(const GrVisitProxyFunc &func) const
GrAppliedClip(const GrAppliedClip &)=delete
GrAppliedClip(const SkISize &rtDims)
bool hasStencilClip() const
GrAppliedHardClip & hardClip()
bool operator==(const GrAppliedClip &that) const
const GrFragmentProcessor * coverageFragmentProcessor() const
bool operator!=(const GrAppliedClip &that) const
const GrScissorState & scissorState() const
GrAppliedClip(const SkISize &logicalRTDims, const SkISize &backingStoreDims)
GrAppliedClip(GrAppliedClip &&that)=default
int hasCoverageFragmentProcessor() const
void addCoverageFP(std::unique_ptr< GrFragmentProcessor > fp)
void setScissor(const SkIRect &irect)
bool addScissor(const SkIRect &irect, SkRect *clippedDrawBounds)
bool operator!=(const GrAppliedHardClip &that) const
void addWindowRectangles(const GrWindowRectsState &windowState)
static const GrAppliedHardClip & Disabled()
const GrScissorState & scissorState() const
bool hasStencilClip() const
bool operator==(const GrAppliedHardClip &that) const
void addWindowRectangles(const GrWindowRectangles &windows, GrWindowRectsState::Mode mode)
GrAppliedHardClip(const SkISize &logicalRTDims, const SkISize &backingStoreDims)
GrAppliedHardClip(const SkISize &rtDims)
GrAppliedHardClip(GrAppliedHardClip &&that)=default
GrAppliedHardClip(const GrAppliedHardClip &)=default
const GrWindowRectsState & windowRectsState() const
uint32_t stencilStackID() const
void addStencilClip(uint32_t stencilStackID)
static std::unique_ptr< GrFragmentProcessor > Compose(std::unique_ptr< GrFragmentProcessor > f, std::unique_ptr< GrFragmentProcessor > g)
bool set(const SkIRect &rect)
bool intersect(const SkIRect &rect)
void set(const GrWindowRectangles &windows, Mode mode)
static const uint32_t kInvalidGenID
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive mode
static constexpr SkIRect MakeSize(const SkISize &size)
static SkRect Make(const SkISize &size)
bool intersect(const SkRect &r)