120#define ASSERT_SINGLE_OWNER SKGPU_ASSERT_SINGLE_OWNER(fContext->priv().singleOwner())
122#if defined(GR_TEST_UTILS)
125int gOverrideMaxTextureSizeGanesh = 0;
130std::atomic<int> gNumTilesDrawnGanesh{0};
153std::unique_ptr<GrFragmentProcessor> make_inverse_rrect_fp(
const SkMatrix& viewMatrix,
162 return (success) ? std::move(fp) : nullptr;
192 TArray<std::unique_ptr<GrFragmentProcessor>>* meshChildFPs) {
203 meshChildFPs->push_back(std::move(childFP));
222 std::move(colorSpace),
234 sc->colorInfo().refColorSpace());
240bool Device::CheckAlphaTypeAndGetFlags(
SkAlphaType alphaType,
242 DeviceFlags*
flags) {
243 *
flags = DeviceFlags::kNone;
248 *
flags |= DeviceFlags::kIsOpaque;
254 *
flags |= DeviceFlags::kNeedClear;
275 !CheckAlphaTypeAndGetFlags(alphaType, init, &
flags)) {
311Device::Device(std::unique_ptr<SurfaceDrawContext> sdc, DeviceFlags
flags)
314 , fSDFTControl(sdc->recordingContext()->
priv().getSDFTControl(
315 sdc->surfaceProps().isUseDeviceIndependentFonts()))
316 , fSurfaceDrawContext(
std::move(sdc))
317 , fClip(
SkIRect::MakeSize(fSurfaceDrawContext->dimensions()),
318 &this->localToDevice(),
319 force_aa_clip(fSurfaceDrawContext.get())) {
320 if (
flags & DeviceFlags::kNeedClear) {
338 return fSurfaceDrawContext->readPixels(dContext, pm, {
x,
y});
350 return fSurfaceDrawContext->writePixels(dContext, pm, {
x,
y});
360 return fSurfaceDrawContext.get();
365 return fSurfaceDrawContext.get();
370 return fSurfaceDrawContext.get();
384#if defined(GR_TEST_UTILS)
385 if (fContext->
priv().
options().fAllPathsVolatile && !path.isVolatile()) {
398 GrAA aa =
GrAA(fSurfaceDrawContext->alwaysAntialias());
402 }
else if (globalRgn.
isRect()) {
418 if (e.fShape.isRect() && e.fLocalToDevice.isIdentity()) {
419 tmp.
setRect(e.fShape.rect().roundOut());
422 e.fShape.asPath(&tmpPath);
424 tmp.
setPath(tmpPath, deviceBounds);
436 SkASSERT(!fSurfaceDrawContext->alwaysAntialias());
449 fSurfaceDrawContext->colorInfo(),
451 this->localToDevice(),
452 fSurfaceDrawContext->surfaceProps(),
457 fSurfaceDrawContext->drawPaint(this->clip(), std::move(grPaint), this->
localToDevice());
471 GrAA aa = fSurfaceDrawContext->chooseAA(
paint);
474 if (
paint.getPathEffect()) {
478 fSurfaceDrawContext->colorInfo(),
480 this->localToDevice(),
481 fSurfaceDrawContext->surfaceProps(),
484 path.setIsVolatile(
true);
487 fSurfaceDrawContext->drawPath(this->clip(),
496 if (!
paint.getMaskFilter() &&
497 paint.getStrokeWidth() > 0 &&
502 fSurfaceDrawContext->colorInfo(),
504 this->localToDevice(),
505 fSurfaceDrawContext->surfaceProps(),
507 fSurfaceDrawContext->drawStrokedLine(this->clip(),
533 paint.getPathEffect() ||
534 paint.getMaskFilter() ||
548 fSurfaceDrawContext->colorInfo(),
550 this->localToDevice(),
551 fSurfaceDrawContext->surfaceProps(),
561 fSurfaceDrawContext->drawVertices(this->clip(), std::move(grPaint), this->
localToDevice(),
562 std::move(vertices), &primitiveType);
574 if (
paint.getMaskFilter() ||
paint.getPathEffect()) {
578 this->clip(),
paint, this->localToDevice(), shape);
584 fSurfaceDrawContext->colorInfo(),
586 this->localToDevice(),
587 fSurfaceDrawContext->surfaceProps(),
592 fSurfaceDrawContext->drawRect(this->clip(), std::move(grPaint),
593 fSurfaceDrawContext->chooseAA(
paint), this->localToDevice(), rect,
615 fSurfaceDrawContext->fillQuadWithEdgeAA(this->clip(),
623 fSurfaceDrawContext->fillRectWithEdgeAA(this->clip(),
637 auto mf =
paint.getMaskFilter();
651 this->clip(),
paint, this->localToDevice(), shape);
659 fSurfaceDrawContext->colorInfo(),
661 this->localToDevice(),
662 fSurfaceDrawContext->surfaceProps(),
667 fSurfaceDrawContext->drawRRect(this->clip(), std::move(grPaint),
668 fSurfaceDrawContext->chooseAA(
paint), this->localToDevice(),
688 if (
auto fp = make_inverse_rrect_fp(this->
localToDevice(), inner,
689 fSurfaceDrawContext->chooseAA(
paint),
690 *fSurfaceDrawContext->caps()->shaderCaps())) {
693 fSurfaceDrawContext->colorInfo(),
695 this->localToDevice(),
696 fSurfaceDrawContext->surfaceProps(),
702 fSurfaceDrawContext->drawRRect(this->clip(), std::move(grPaint),
703 fSurfaceDrawContext->chooseAA(
paint),
704 this->localToDevice(), outer,
GrStyle());
710 path.setIsVolatile(
true);
711 path.addRRect(outer);
712 path.addRRect(inner);
720 paint, this->localToDevice(), shape);
728 if (
paint.getMaskFilter()) {
731 path.setIsVolatile(
true);
737 fSurfaceDrawContext->colorInfo(),
739 this->localToDevice(),
740 fSurfaceDrawContext->surfaceProps(),
745 fSurfaceDrawContext->drawRegion(this->clip(), std::move(grPaint),
746 fSurfaceDrawContext->chooseAA(
paint), this->localToDevice(),
754 if (
paint.getMaskFilter()) {
762 fSurfaceDrawContext->colorInfo(),
764 this->localToDevice(),
765 fSurfaceDrawContext->surfaceProps(),
770 fSurfaceDrawContext->drawOval(this->clip(), std::move(grPaint),
771 fSurfaceDrawContext->chooseAA(
paint), this->localToDevice(), oval,
782 if (
paint.getMaskFilter()) {
788 fSurfaceDrawContext->colorInfo(),
790 this->localToDevice(),
791 fSurfaceDrawContext->surfaceProps(),
796 fSurfaceDrawContext->drawArc(this->clip(), std::move(grPaint),
797 fSurfaceDrawContext->chooseAA(
paint), this->localToDevice(), oval,
804#if defined(GR_TEST_UTILS)
812 if (!
paint.getMaskFilter()) {
815 fSurfaceDrawContext->colorInfo(),
817 this->localToDevice(),
818 fSurfaceDrawContext->surfaceProps(),
822 fSurfaceDrawContext->drawPath(this->clip(), std::move(grPaint),
823 fSurfaceDrawContext->chooseAA(
paint), this->localToDevice(),
832 paint, this->localToDevice(), shape);
846 auto view = std::get<0>(
856 return SkSpecialImages::MakeDeferredFromGpu(fContext.
get(),
860 {SkColorTypeToGrColorType(bitmap.colorType()),
862 bitmap.refColorSpace()},
863 this->surfaceProps());
875 return SkSpecialImages::MakeDeferredFromGpu(
880 {ct, kPremul_SkAlphaType, image->refColorSpace()},
881 this->surfaceProps());
895 auto sdc = fSurfaceDrawContext.get();
901 if (sdc->wrapsVkSecondaryCB()) {
914 skgpu::Mipmapped::kNo,
918 "Device_SnapSpecial");
927 return SkSpecialImages::MakeDeferredFromGpu(fContext.
get(),
938 auto sdc = fSurfaceDrawContext.get();
944 if (sdc->wrapsVkSecondaryCB()) {
950 auto scaledContext = sdc->rescale(sdc->imageInfo().makeDimensions(dstDims),
954 RescaleMode::kLinear);
955 if (!scaledContext) {
959 return SkSpecialImages::MakeDeferredFromGpu(fContext.
get(),
962 scaledContext->readSurfaceView(),
984 GrAA aa = fSurfaceDrawContext->chooseAA(
paint);
988 this->drawImageQuadDirect(
image,
1013 GrAA aa = fSurfaceDrawContext->chooseAA(
paint);
1021 size_t cacheSize = 0;
1023 cacheSize = dCtx->getResourceCacheLimit();
1026#if defined(GR_TEST_UTILS)
1027 if (gOverrideMaxTextureSizeGanesh) {
1028 maxTextureSize = gOverrideMaxTextureSizeGanesh;
1030 gNumTilesDrawnGanesh.store(0, std::memory_order_relaxed);
1044#if defined(GR_TEST_UTILS)
1045 gNumTilesDrawnGanesh.store(numTiles, std::memory_order_relaxed);
1052 std::unique_ptr<SkLatticeIter> iter,
1061 if (!
info.isAlphaOnly() && (
paint->getColor() & 0x00FFFFFF) != 0x00FFFFFF) {
1067 fSurfaceDrawContext->colorInfo(),
1069 this->localToDevice(),
1071 fSurfaceDrawContext->surfaceProps(),
1076 if (
info.isAlphaOnly()) {
1083 fSurfaceDrawContext->drawImageLattice(this->clip(),
1100 auto iter = std::make_unique<SkLatticeIter>(lattice, dst);
1105 this->drawViewLattice(
1106 std::move(view), std::move(colorInfo), std::move(iter), dst, filter,
paint);
1113 bool skipColorXform) {
1118#ifdef SK_LEGACY_IGNORE_DRAW_VERTICES_BLEND_WITH_NO_SHADER
1119 if (!
paint.getShader()) {
1127 if (!init_vertices_paint(fContext.
get(),
1128 fSurfaceDrawContext->colorInfo(),
1130 this->localToDevice(),
1133 fSurfaceDrawContext->surfaceProps(),
1137 fSurfaceDrawContext->drawVertices(this->clip(),
1153 if (!init_vertices_paint(fContext.
get(),
1154 fSurfaceDrawContext->colorInfo(),
1156 this->localToDevice(),
1159 fSurfaceDrawContext->surfaceProps(),
1165 if (!init_mesh_child_effects(fContext.
get(),
1166 fSurfaceDrawContext->colorInfo(),
1167 fSurfaceDrawContext->surfaceProps(),
1172 fSurfaceDrawContext->drawMesh(this->clip(), std::move(grPaint), this->
localToDevice(), mesh,
1173 std::move(meshChildFPs));
1178#if !defined(SK_ENABLE_OPTIMIZE_SIZE)
1180#if defined(GR_TEST_UTILS)
1181 if (fContext->
priv().
options().fAllPathsVolatile && !path.isVolatile()) {
1189 if (!fSurfaceDrawContext->drawFastShadow(this->clip(), this->localToDevice(), path, rec)) {
1210 fSurfaceDrawContext->colorInfo(),
1212 this->localToDevice(),
1214 fSurfaceDrawContext->surfaceProps(),
1220 fSurfaceDrawContext->colorInfo(),
1222 this->localToDevice(),
1223 fSurfaceDrawContext->surfaceProps(),
1229 fSurfaceDrawContext->drawAtlas(this->clip(), std::move(grPaint), this->
localToDevice(), count,
1230 xform, texRect, colors);
1242 if (glyphRunList.
blob() ==
nullptr) {
1246 if (slug !=
nullptr) {
1250 fSurfaceDrawContext->drawGlyphRunList(canvas,
1268 std::unique_ptr<SkDrawable::GpuDrawHandler> gpuDraw =
1272 fSurfaceDrawContext->drawDrawable(
1293 bool deleteSemaphoresAfterWait) {
1296 return fSurfaceDrawContext->waitOnSemaphores(numSemaphores, waitSemaphores,
1297 deleteSemaphoresAfterWait);
1301 fSurfaceDrawContext->discard();
1305 fSurfaceDrawContext->resolveMSAA();
1315 std::move(colorSpace), origin, props);
1320 SkASSERT(sdc->dimensions() == fSurfaceDrawContext->dimensions());
1321 SkASSERT(sdc->numSamples() == fSurfaceDrawContext->numSamples());
1322 SkASSERT(sdc->asSurfaceProxy()->priv().isExact());
1328 SkASSERT(fSurfaceDrawContext->asTextureProxy());
1329 SkAssertResult(sdc->blitTexture(fSurfaceDrawContext->readSurfaceView(),
1334 fSurfaceDrawContext = std::move(sdc);
1363 "BaseDevice_ReplaceBackingProxy");
1369 grColorType, ii.refColorSpace(), oldView.
origin(),
1370 this->surfaceProps());
1379 auto* sdc = fSurfaceDrawContext.get();
1381 auto dContext = sdc->recordingContext()->asDirectContext();
1385 sdc->asyncRescaleAndReadPixels(dContext,
info, srcRect, rescaleGamma, rescaleMode,
callback,
1398 auto* sdc = fSurfaceDrawContext.get();
1400 auto dContext = sdc->recordingContext()->asDirectContext();
1404 sdc->asyncRescaleAndReadPixelsYUV420(dContext,
1407 std::move(dstColorSpace),
1433 fSurfaceDrawContext->numSamples(),
1434 skgpu::Mipmapped::kNo,
1435 fSurfaceDrawContext->asSurfaceProxy()->isProtected(),
1436 fSurfaceDrawContext->origin(),
1456 fSurfaceDrawContext->numSamples(),
1457 fSurfaceDrawContext->origin(),
1471 auto sdc = fSurfaceDrawContext.get();
1485 GrAA aa =
GrAA(fSurfaceDrawContext->alwaysAntialias());
1508#if defined(SK_DEBUG)
1516 SkASSERT(slugMatrix == positionMatrix);
1524 auto[drawingClip, op] = subRun->makeAtlasTextOp(
1526 std::move(subRunStorage), fSurfaceDrawContext.get());
1527 if (op !=
nullptr) {
1528 fSurfaceDrawContext->addDrawOp(drawingClip, std::move(op));
1532 slugImpl->
subRuns()->draw(canvas, slugImpl->
origin(),
paint, slugImpl, atlasDelegate);
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
static GrDirectContext * GrAsDirectContext(GrContext_Base *base)
#define GR_CREATE_TRACE_MARKER_CONTEXT(classname, op, context)
static GrQuadAAFlags SkToGrQuadAAFlags(unsigned flags)
static constexpr SkColorType GrColorTypeToSkColorType(GrColorType ct)
static constexpr GrColorType SkColorTypeToGrColorType(SkColorType ct)
@ kOpaque_SkAlphaType
pixel is opaque
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
#define SkAssertResult(cond)
#define SK_ABORT(message,...)
@ kSrcOver
r = s + (1-sa)*d
constexpr SkPMColor4f SK_PMColor4fTRANSPARENT
@ kRGBA_1010102_SkColorType
10 bits for red, green, blue; 2 bits for alpha; in 32-bit word
static constexpr SkColor SkColorSetARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
bool SkPaintToGrPaintReplaceShader(GrRecordingContext *context, const GrColorInfo &dstColorInfo, const SkPaint &skPaint, const SkMatrix &ctm, std::unique_ptr< GrFragmentProcessor > shaderFP, const SkSurfaceProps &surfaceProps, GrPaint *grPaint)
SkColor4f SkColor4fPrepForDst(SkColor4f color, const GrColorInfo &colorInfo)
bool SkPaintToGrPaintWithBlend(GrRecordingContext *context, const GrColorInfo &dstColorInfo, const SkPaint &skPaint, const SkMatrix &ctm, SkBlender *primColorBlender, const SkSurfaceProps &surfaceProps, GrPaint *grPaint)
bool SkPaintToGrPaint(GrRecordingContext *context, const GrColorInfo &dstColorInfo, const SkPaint &skPaint, const SkMatrix &ctm, const SkSurfaceProps &surfaceProps, GrPaint *grPaint)
std::tuple< GrSurfaceProxyView, GrColorType > GrMakeCachedBitmapProxyView(GrRecordingContext *rContext, const SkBitmap &bitmap, std::string_view label, skgpu::Mipmapped mipmapped)
static SkColorType colorType(AImageDecoder *decoder, const AImageDecoderHeaderInfo *headerInfo)
static bool SkImageInfoValidConversion(const SkImageInfo &dst, const SkImageInfo &src)
static SkPath clip(const SkPath &path, const SkHalfPlane &plane)
sk_sp< T > sk_ref_sp(T *obj)
static bool SkScalarNearlyEqual(SkScalar x, SkScalar y, SkScalar tolerance=SK_ScalarNearlyZero)
@ kNeedNewImageUniqueID_SpecialImage
constexpr int32_t SkToS32(S x)
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
const GrContextOptions & options() const
const GrCaps * caps() const
bool avoidLineDraws() const
GrBackendFormat getDefaultBackendFormat(GrColorType, GrRenderable) const
GrColorType colorType() const
virtual GrDirectContext * asDirectContext()
SK_API GrBackendApi backend() const
static const GrDisableColorXPFactory * Get()
void setXPFactory(const GrXPFactory *xpFactory)
int hasCoverageFragmentProcessor() const
void setColor4f(const SkPMColor4f &color)
void setCoverageFragmentProcessor(std::unique_ptr< GrFragmentProcessor > fp)
sk_sp< GrTextureProxy > createProxy(const GrBackendFormat &, SkISize dimensions, GrRenderable, int renderTargetSampleCnt, skgpu::Mipmapped, SkBackingFit, skgpu::Budgeted, GrProtected, std::string_view label, GrInternalSurfaceFlags=GrInternalSurfaceFlags::kNone, UseAllocator useAllocator=UseAllocator::kYes)
GrProxyProvider * proxyProvider()
GrRecordingContextPriv priv()
bool abandoned() override
SK_API bool colorTypeSupportedAsSurface(SkColorType colorType) const
SK_API int maxTextureSize() const
SkPathEffect * pathEffect() const
static const GrStyle & SimpleFill()
skgpu::Mipmapped mipmapped() const
void concatSwizzle(skgpu::Swizzle swizzle)
GrTextureProxy * asTextureProxy() const
SkISize dimensions() const
GrSurfaceOrigin origin() const
GrRenderTargetProxy * asRenderTargetProxy() const
static GrSurfaceProxyView Copy(GrRecordingContext *context, GrSurfaceProxyView src, skgpu::Mipmapped mipmapped, SkIRect srcRect, SkBackingFit fit, skgpu::Budgeted budgeted, std::string_view label)
GrProtected isProtected() const
skgpu::Budgeted isBudgeted() const
static const GrXPFactory * FromBlendMode(SkBlendMode)
bool installPixels(const SkImageInfo &info, void *pixels, size_t rowBytes, void(*releaseProc)(void *addr, void *context), void *context)
static sk_sp< SkBlender > Mode(SkBlendMode mode)
virtual GrRecordingContext * recordingContext() const
@ kLines_PointMode
draw each pair of points as a line segment
@ kPolygon_PointMode
draw the array of points as a open polygon
@ kPoints_PointMode
draw each point separately
const SkImageInfo & imageInfo() const
SkScalerContextFlags scalerContextFlags() const
virtual void drawShadow(const SkPath &, const SkDrawShadowRec &)
const SkM44 & globalToDevice() const
sk_sp< SkSpecialImage > snapSpecial()
const SkMatrix & localToDevice() const
virtual void drawDevice(SkDevice *, const SkSamplingOptions &, const SkPaint &)
const SkSurfaceProps & surfaceProps() const
virtual void drawDrawable(SkCanvas *, SkDrawable *, const SkMatrix *)
virtual void drawArc(const SkRect &oval, SkScalar startAngle, SkScalar sweepAngle, bool useCenter, const SkPaint &paint)
std::unique_ptr< GpuDrawHandler > snapGpuDrawHandler(GrBackendApi backendApi, const SkMatrix &matrix, const SkIRect &clipBounds, const SkImageInfo &bufferInfo)
uint32_t uniqueID() const
SkAlphaType alphaType() const
bool peekPixels(SkPixmap *pixmap) const
virtual bool isTextureBacked() const =0
sk_sp< SkColorSpace > refColorSpace() const
bool getMinMaxScales(SkScalar scaleFactors[2]) const
static SkMatrix Concat(const SkMatrix &a, const SkMatrix &b)
static const SkMatrix & I()
SkMatrix & preTranslate(SkScalar dx, SkScalar dy)
bool mapRect(SkRect *dst, const SkRect &src, SkApplyPerspectiveClip pc=SkApplyPerspectiveClip::kYes) const
SkMeshSpecification * spec() const
@ kStroke_Style
set to stroke geometry
void transform(const SkMatrix &matrix, SkPath *dst, SkApplyPerspectiveClip pc=SkApplyPerspectiveClip::kYes) const
const SkImageInfo & info() const
static SkRRect MakeOval(const SkRect &oval)
bool transform(const SkMatrix &matrix, SkRRect *dst) const
bool getBoundaryPath(SkPath *path) const
const SkIRect & getBounds() const
bool op(const SkIRect &rect, Op op)
bool setRect(const SkIRect &rect)
bool setPath(const SkPath &path, const SkRegion &clip)
static SkStrikeCache * GlobalStrikeCache()
SkSurfaceProps cloneWithPixelGeometry(SkPixelGeometry newPixelGeometry) const
@ kRetain_ContentChangeMode
preserves surface on change
static sk_sp< SkVertices > MakeCopy(VertexMode mode, int vertexCount, const SkPoint positions[], const SkPoint texs[], const SkColor colors[], int indexCount, const uint16_t indices[])
static std::tuple< bool, size_t > DrawAsTiledImageRect(SkCanvas *, const SkImage *, const SkRect &srcRect, const SkRect &dstRect, SkCanvas::QuadAAFlags, const SkSamplingOptions &, const SkPaint *, SkCanvas::SrcRectConstraint, size_t cacheSize, size_t maxTextureSize)
void clipPath(const SkMatrix &ctm, const SkPath &path, GrAA aa, SkClipOp op)
void clipRect(const SkMatrix &ctm, const SkRect &rect, GrAA aa, SkClipOp op)
SkIRect getConservativeBounds() const override
void drawArc(const SkRect &oval, SkScalar startAngle, SkScalar sweepAngle, bool useCenter, const SkPaint &paint) override
void drawShadow(const SkPath &, const SkDrawShadowRec &) override
void drawOval(const SkRect &oval, const SkPaint &paint) override
void android_utils_clipAsRgn(SkRegion *) const override
void drawDRRect(const SkRRect &outer, const SkRRect &inner, const SkPaint &paint) override
void drawPath(const SkPath &path, const SkPaint &paint, bool pathIsMutable) override
SkImage::ReadPixelsContext ReadPixelsContext
void drawPaint(const SkPaint &paint) override
SkStrikeDeviceInfo strikeDeviceInfo() const override
GrSurfaceProxyView readSurfaceView()
void drawRect(const SkRect &r, const SkPaint &paint) override
void drawVertices(const SkVertices *, sk_sp< SkBlender >, const SkPaint &, bool) override
void drawEdgeAAQuad(const SkRect &rect, const SkPoint clip[4], SkCanvas::QuadAAFlags aaFlags, const SkColor4f &color, SkBlendMode mode) override
bool android_utils_clipWithStencil() override
void drawDrawable(SkCanvas *, SkDrawable *, const SkMatrix *) override
sk_sp< sktext::gpu::Slug > convertGlyphRunListToSlug(const sktext::GlyphRunList &glyphRunList, const SkPaint &paint) override
bool drawAsTiledImageRect(SkCanvas *, const SkImage *, const SkRect *src, const SkRect &dst, const SkSamplingOptions &, const SkPaint &, SkCanvas::SrcRectConstraint) override
bool isClipAntiAliased() const override
void drawPoints(SkCanvas::PointMode mode, size_t count, const SkPoint[], const SkPaint &paint) override
bool onWritePixels(const SkPixmap &, int, int) override
bool onReadPixels(const SkPixmap &, int, int) override
sk_sp< SkSpecialImage > snapSpecialScaled(const SkIRect &subset, const SkISize &dstDims) override
sk_sp< SkSurface > makeSurface(const SkImageInfo &, const SkSurfaceProps &) override
GrRenderTargetProxy * targetProxy()
bool wait(int numSemaphores, const GrBackendSemaphore *waitSemaphores, bool deleteSemaphoresAfterWait)
void drawAtlas(const SkRSXform[], const SkRect[], const SkColor[], int count, sk_sp< SkBlender >, const SkPaint &) override
SurfaceFillContext * surfaceFillContext()
void drawMesh(const SkMesh &, sk_sp< SkBlender >, const SkPaint &) override
void asyncRescaleAndReadPixelsYUV420(SkYUVColorSpace yuvColorSpace, bool readAlpha, sk_sp< SkColorSpace > dstColorSpace, const SkIRect &srcRect, SkISize dstSize, RescaleGamma rescaleGamma, RescaleMode, ReadPixelsCallback callback, ReadPixelsContext context)
sk_sp< skif::Backend > createImageFilteringBackend(const SkSurfaceProps &surfaceProps, SkColorType colorType) const override
void asyncRescaleAndReadPixels(const SkImageInfo &info, const SkIRect &srcRect, RescaleGamma rescaleGamma, RescaleMode rescaleMode, ReadPixelsCallback callback, ReadPixelsContext context)
SkImage::ReadPixelsCallback ReadPixelsCallback
bool onAccessPixels(SkPixmap *) override
void drawImageRect(const SkImage *, const SkRect *src, const SkRect &dst, const SkSamplingOptions &, const SkPaint &, SkCanvas::SrcRectConstraint) override
void drawDevice(SkDevice *, const SkSamplingOptions &, const SkPaint &) override
void clipRegion(const SkRegion &globalRgn, SkClipOp op) override
SkIRect devClipBounds() const override
void drawRRect(const SkRRect &r, const SkPaint &paint) override
SurfaceDrawContext * surfaceDrawContext()
bool replaceBackingProxy(SkSurface::ContentChangeMode, sk_sp< GrRenderTargetProxy >, GrColorType, sk_sp< SkColorSpace >, GrSurfaceOrigin, const SkSurfaceProps &)
void clipPath(const SkPath &path, SkClipOp op, bool aa) override
static sk_sp< Device > Make(GrRecordingContext *, GrColorType, sk_sp< GrSurfaceProxy >, sk_sp< SkColorSpace >, GrSurfaceOrigin, const SkSurfaceProps &, InitContents)
void onDrawGlyphRunList(SkCanvas *, const sktext::GlyphRunList &, const SkPaint &paint) override
GrRecordingContext * recordingContext() const override
void drawRegion(const SkRegion &r, const SkPaint &paint) override
void drawSlug(SkCanvas *, const sktext::gpu::Slug *slug, const SkPaint &paint) override
sk_sp< SkDevice > createDevice(const CreateInfo &, const SkPaint *) override
void drawImageLattice(const SkImage *, const SkCanvas::Lattice &, const SkRect &dst, SkFilterMode, const SkPaint &) override
sk_sp< SkSpecialImage > makeSpecial(const SkBitmap &) override
const GrColorInfo & colorInfo() const
GrSurfaceProxyView readSurfaceView()
bool alwaysAntialias() const
static std::unique_ptr< SurfaceDrawContext > Make(GrRecordingContext *, GrColorType, sk_sp< GrSurfaceProxy >, sk_sp< SkColorSpace >, GrSurfaceOrigin, const SkSurfaceProps &)
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)
const SkTextBlob * blob() const
const gpu::SubRunContainerOwner & subRuns() const
const SkMatrix & initialPositionMatrix() const
static sk_sp< SlugImpl > Make(const SkMatrix &viewMatrix, const sktext::GlyphRunList &glyphRunList, const SkPaint &paint, SkStrikeDeviceInfo strikeDeviceInfo, sktext::StrikeForGPUCacheInterface *strikeCache)
FlutterSemanticsFlag flags
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
FlPixelBufferTexturePrivate * priv
uint32_t uint32_t * format
#define ASSERT_SINGLE_OWNER
void DrawShapeWithMaskFilter(GrRecordingContext *rContext, skgpu::ganesh::SurfaceDrawContext *sdc, const GrClip *clip, const GrStyledShape &shape, GrPaint &&paint, const SkMatrix &viewMatrix, const SkMaskFilter *mf)
GrFPResult MakeChildFP(const SkRuntimeEffect::ChildPtr &child, const GrFPArgs &childArgs)
bool IsSupported(const SkMaskFilter *maskfilter)
GrFPResult Make(std::unique_ptr< GrFragmentProcessor >, GrClipEdgeType, const SkRRect &, const GrShaderCaps &)
SK_API sk_sp< SkSurface > RenderTarget(GrRecordingContext *context, skgpu::Budgeted budgeted, const SkImageInfo &imageInfo, int sampleCount, GrSurfaceOrigin surfaceOrigin, const SkSurfaceProps *surfaceProps, bool shouldCreateWithMips=false, bool isProtected=false)
std::tuple< GrSurfaceProxyView, GrColorType > AsView(GrRecordingContext *rContext, const SkImage *img, skgpu::Mipmapped mipmapped, GrImageTexGenPolicy policy)
sk_sp< Backend > MakeGaneshBackend(sk_sp< GrRecordingContext > context, GrSurfaceOrigin origin, const SkSurfaceProps &surfaceProps, SkColorType colorType)
bool fSupportBilerpFromGlyphAtlas
static constexpr Init< Ref, Test, TestMask, PassOp, FailOp, WriteMask > StaticInit()
const SkPixelGeometry fPixelGeometry
static constexpr SkIPoint Make(int32_t x, int32_t y)
static constexpr SkIRect MakeSize(const SkISize &size)
static constexpr SkIRect MakeWH(int32_t w, int32_t h)
sk_sp< SkColorSpace > refColorSpace() const
SkISize dimensions() const
static SkImageInfo MakeUnknown()
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)
SkAlphaType alphaType() const
SkColorType colorType() const
static bool HasColors(const SkMeshSpecification &spec)
constexpr float y() const
constexpr float x() const
static SkRect Make(const SkISize &size)
static constexpr SkRect MakeEmpty()
static SkRect MakeIWH(int w, int h)