8#ifndef SurfaceDrawContext_v1_DEFINED
9#define SurfaceDrawContext_v1_DEFINED
81 std::string_view label,
105 std::string_view label);
163 const GrStyle* style =
nullptr);
191 this->drawFilledQuad(
clip, std::move(
paint), &quad);
202 const SkRect* optionalLocalRect =
nullptr) {
205 (optionalLocalRect) ? *optionalLocalRect :
rect);
208 const SkRect& localRect = optionalLocalRect ? *optionalLocalRect :
rect;
210 this->drawFilledQuad(
clip, std::move(
paint), &quad);
227 const SkPoint optionalLocalPoints[4]) {
228 const SkPoint* localPoints = optionalLocalPoints ? optionalLocalPoints :
points;
231 this->drawFilledQuad(
clip, std::move(
paint), &quad);
280 this->drawTexturedQuad(
clip, std::move(view), srcAlphaType, std::move(texXform), filter, mm,
379 bool skipColorXform =
false);
480 std::unique_ptr<SkLatticeIter>,
506 int numClipAnalyticElements);
512 int numClipAnalyticElements);
515 this->internalStencilClear(&scissor, insideStencilMask);
527 const SkMatrix* localMatrix =
nullptr) {
533 this->drawFilledQuad(
clip, std::move(
paint), &quad, ss);
576 const std::function<WillAddOpFn>& = std::function<WillAddOpFn>());
586 bool deleteSemaphoresAfterWait);
598 return GrAA(
paint.isAntiAlias() || this->alwaysAntialias());
602 if (this->
numSamples() > 1 || fCanUseDynamicMSAA) {
615#if defined(GR_TEST_UTILS)
616 void testingOnly_SetPreserveOpsOnFullClear() { fPreserveOpsOnFullClear_TestingOnly =
true; }
625 void willReplaceOpsTask(OpsTask* prevTask, OpsTask* nextTask)
override;
628 void setNeedsStencil();
630 void internalStencilClear(
const SkIRect* scissor,
bool insideStencilMask);
665 const SkRect* subset =
nullptr);
682 [[nodiscard]]
bool setupDstProxyView(
const SkRect& opBounds,
686 OpsTask* replaceOpsTaskIfModifiesColor();
689 const bool fCanUseDynamicMSAA;
691 bool fNeedsStencil =
false;
693#if defined(GR_TEST_UTILS)
694 bool fPreserveOpsOnFullClear_TestingOnly =
false;
@ kBottomLeft_GrSurfaceOrigin
static const int points[]
static SkPath clip(const SkPath &path, const SkHalfPlane &plane)
std::unique_ptr< GrOp > Owner
static GrQuad MakeFromRect(const SkRect &, const SkMatrix &)
static GrQuad MakeFromSkQuad(const SkPoint pts[4], const SkMatrix &)
bool wrapsVkSecondaryCB() const
bool refsWrappedObjects() const
UniqueID uniqueID() const
GrRenderTarget * peekRenderTarget() const
static const SkMatrix & I()
GrSurfaceProxy * asSurfaceProxy()
SkISize dimensions() const
GrRenderTargetProxy * asRenderTargetProxy()
skgpu::Swizzle readSwizzle() const
bool stencilPath(const GrHardClip *, GrAA doStencilMSAA, const SkMatrix &viewMatrix, const SkPath &)
bool canUseDynamicMSAA() const
void clearStencilClip(const SkIRect &scissor, bool insideStencilMask)
void drawArc(const GrClip *, GrPaint &&paint, GrAA, const SkMatrix &viewMatrix, const SkArc &arc, const GrStyle &style)
bool drawFastShadow(const GrClip *, const SkMatrix &viewMatrix, const SkPath &path, const SkDrawShadowRec &rec)
void drawOval(const GrClip *, GrPaint &&paint, GrAA, const SkMatrix &viewMatrix, const SkRect &oval, const GrStyle &style)
void fillQuadWithEdgeAA(const GrClip *clip, GrPaint &&paint, GrQuadAAFlags edgeAA, const SkMatrix &viewMatrix, const SkPoint points[4], const SkPoint optionalLocalPoints[4])
void(GrOp *, uint32_t opsTaskID) WillAddOpFn
SurfaceDrawContext(GrRecordingContext *, GrSurfaceProxyView readView, GrSurfaceProxyView writeView, GrColorType, sk_sp< SkColorSpace >, const SkSurfaceProps &)
bool wrapsVkSecondaryCB() const
void fillPixelsWithLocalMatrix(const GrClip *clip, GrPaint &&paint, const SkIRect &bounds, const SkMatrix &localMatrix)
void drawShape(const GrClip *, GrPaint &&, GrAA, const SkMatrix &viewMatrix, GrStyledShape &&)
void fillRectWithEdgeAA(const GrClip *clip, GrPaint &&paint, GrQuadAAFlags edgeAA, const SkMatrix &viewMatrix, const SkRect &rect, const SkRect *optionalLocalRect=nullptr)
void drawDrawable(std::unique_ptr< SkDrawable::GpuDrawHandler >, const SkRect &bounds)
void drawAtlas(const GrClip *, GrPaint &&paint, const SkMatrix &viewMatrix, int spriteCount, const SkRSXform xform[], const SkRect texRect[], const SkColor colors[])
GrSurfaceProxy::UniqueID uniqueID() const
int maxWindowRectangles() const
void drawTextureSet(const GrClip *, GrTextureSetEntry[], int cnt, int proxyRunCnt, GrSamplerState::Filter, GrSamplerState::MipmapMode, SkBlendMode mode, SkCanvas::SrcRectConstraint, const SkMatrix &viewMatrix, sk_sp< GrColorSpaceXform > texXform)
void setLastClip(uint32_t clipStackGenID, const SkIRect &devClipBounds, int numClipAnalyticElements)
skgpu::Budgeted isBudgeted() const
void drawMesh(const GrClip *, GrPaint &&paint, const SkMatrix &viewMatrix, const SkMesh &mesh, skia_private::TArray< std::unique_ptr< GrFragmentProcessor > > children)
bool alwaysAntialias() const
void addDrawOp(const GrClip *, GrOp::Owner, const std::function< WillAddOpFn > &=std::function< WillAddOpFn >())
bool waitOnSemaphores(int numSemaphores, const GrBackendSemaphore waitSemaphores[], bool deleteSemaphoresAfterWait)
void drawQuadSet(const GrClip *clip, GrPaint &&paint, const SkMatrix &viewMatrix, const GrQuadSetEntry[], int cnt)
void drawImageLattice(const GrClip *, GrPaint &&, const SkMatrix &viewMatrix, GrSurfaceProxyView, SkAlphaType alphaType, sk_sp< GrColorSpaceXform >, GrSamplerState::Filter, std::unique_ptr< SkLatticeIter >, const SkRect &dst)
void drawPath(const GrClip *, GrPaint &&, GrAA, const SkMatrix &viewMatrix, const SkPath &, const GrStyle &)
bool drawAndStencilPath(const GrHardClip *, const GrUserStencilSettings *, SkRegion::Op op, bool invert, GrAA doStencilMSAA, const SkMatrix &viewMatrix, const SkPath &)
bool mustRenderClip(uint32_t clipStackGenID, const SkIRect &devClipBounds, int numClipAnalyticElements)
void drawTextureQuad(const GrClip *clip, GrSurfaceProxyView view, GrColorType srcColorType, SkAlphaType srcAlphaType, GrSamplerState::Filter filter, GrSamplerState::MipmapMode mm, SkBlendMode mode, const SkPMColor4f &color, const SkPoint srcQuad[4], const SkPoint dstQuad[4], GrQuadAAFlags edgeAA, const SkRect *subset, const SkMatrix &viewMatrix, sk_sp< GrColorSpaceXform > texXform)
bool refsWrappedObjects() const
void addDrawOp(GrOp::Owner op)
void drawRRect(const GrClip *, GrPaint &&, GrAA, const SkMatrix &viewMatrix, const SkRRect &rrect, const GrStyle &style)
void drawPaint(const GrClip *, GrPaint &&, const SkMatrix &viewMatrix)
void drawRegion(const GrClip *, GrPaint &&paint, GrAA aa, const SkMatrix &viewMatrix, const SkRegion ®ion, const GrStyle &style, const GrUserStencilSettings *ss=nullptr)
~SurfaceDrawContext() override
static std::unique_ptr< SurfaceDrawContext > MakeFromBackendTexture(GrRecordingContext *, GrColorType, sk_sp< SkColorSpace >, const GrBackendTexture &, int sampleCnt, GrSurfaceOrigin, const SkSurfaceProps &, sk_sp< skgpu::RefCntedCallback > releaseHelper)
GrAA chooseAA(const SkPaint &paint)
void stencilRect(const GrClip *clip, const GrUserStencilSettings *ss, GrPaint &&paint, GrAA doStencilMSAA, const SkMatrix &viewMatrix, const SkRect &rect, const SkMatrix *localMatrix=nullptr)
const SkSurfaceProps & surfaceProps() const
static std::unique_ptr< SurfaceDrawContext > Make(GrRecordingContext *, GrColorType, sk_sp< GrSurfaceProxy >, sk_sp< SkColorSpace >, GrSurfaceOrigin, const SkSurfaceProps &)
void drawRect(const GrClip *, GrPaint &&paint, GrAA, const SkMatrix &viewMatrix, const SkRect &, const GrStyle *style=nullptr)
static std::unique_ptr< SurfaceDrawContext > MakeWithFallback(GrRecordingContext *, GrColorType, sk_sp< SkColorSpace >, SkBackingFit, SkISize dimensions, const SkSurfaceProps &, int sampleCnt, skgpu::Mipmapped, skgpu::Protected, GrSurfaceOrigin=kBottomLeft_GrSurfaceOrigin, skgpu::Budgeted=skgpu::Budgeted::kYes)
GrRenderTarget * accessRenderTarget()
void drawGlyphRunList(SkCanvas *, const GrClip *, const SkMatrix &viewMatrix, const sktext::GlyphRunList &glyphRunList, SkStrikeDeviceInfo strikeDeviceInfo, const SkPaint &paint)
void fillRectToRect(const GrClip *, GrPaint &&, GrAA, const SkMatrix &, const SkRect &rectToDraw, const SkRect &localRect)
void drawVertices(const GrClip *, GrPaint &&paint, const SkMatrix &viewMatrix, sk_sp< SkVertices > vertices, GrPrimitiveType *overridePrimType=nullptr, bool skipColorXform=false)
void drawTexture(const GrClip *, GrSurfaceProxyView, SkAlphaType, GrSamplerState::Filter, GrSamplerState::MipmapMode, SkBlendMode, const SkPMColor4f &, const SkRect &srcRect, const SkRect &dstRect, GrQuadAAFlags, SkCanvas::SrcRectConstraint, const SkMatrix &, sk_sp< GrColorSpaceXform >)
GrAAType chooseAAType(GrAA aa)
void drawStrokedLine(const GrClip *, GrPaint &&, GrAA, const SkMatrix &, const SkPoint[2], const SkStrokeRec &)
Optional< SkRect > bounds
ClipOpAndAA opAA SkRegion region
sk_sp< SkBlender > blender SkRect rect
PODArray< SkColor > colors
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
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 SkRect Make(const SkISize &size)