121#define ASSERT_SINGLE_OWNER SKGPU_ASSERT_SINGLE_OWNER(fContext->priv().singleOwner())
123#if defined(GR_TEST_UTILS)
126int gOverrideMaxTextureSizeGanesh = 0;
131std::atomic<int> gNumTilesDrawnGanesh{0};
154std::unique_ptr<GrFragmentProcessor> make_inverse_rrect_fp(
const SkMatrix& viewMatrix,
163 return (success) ? std::move(
fp) : nullptr;
193 TArray<std::unique_ptr<GrFragmentProcessor>>* meshChildFPs) {
204 meshChildFPs->push_back(std::move(childFP));
223 std::move(colorSpace),
241bool Device::CheckAlphaTypeAndGetFlags(
SkAlphaType alphaType,
243 DeviceFlags*
flags) {
244 *
flags = DeviceFlags::kNone;
249 *
flags |= DeviceFlags::kIsOpaque;
255 *
flags |= DeviceFlags::kNeedClear;
276 !CheckAlphaTypeAndGetFlags(alphaType,
init, &
flags)) {
312Device::Device(std::unique_ptr<SurfaceDrawContext> sdc, DeviceFlags
flags)
315 , fSDFTControl(sdc->recordingContext()->
priv().getSDFTControl(
316 sdc->surfaceProps().isUseDeviceIndependentFonts()))
317 , fSurfaceDrawContext(
std::move(sdc))
318 , fClip(
SkIRect::MakeSize(fSurfaceDrawContext->dimensions()),
319 &this->localToDevice(),
320 force_aa_clip(fSurfaceDrawContext.
get())) {
321 if (
flags & DeviceFlags::kNeedClear) {
330bool Device::onReadPixels(
const SkPixmap& pm,
int x,
int y) {
339 return fSurfaceDrawContext->readPixels(dContext, pm, {
x,
y});
342bool Device::onWritePixels(
const SkPixmap& pm,
int x,
int y) {
351 return fSurfaceDrawContext->writePixels(dContext, pm, {
x,
y});
354bool Device::onAccessPixels(
SkPixmap* pmap) {
361 return fSurfaceDrawContext.get();
366 return fSurfaceDrawContext.get();
371 return fSurfaceDrawContext.get();
385#if defined(GR_TEST_UTILS)
386 if (fContext->
priv().
options().fAllPathsVolatile && !
path.isVolatile()) {
399 GrAA aa =
GrAA(fSurfaceDrawContext->alwaysAntialias());
403 }
else if (globalRgn.
isRect()) {
419 if (
e.fShape.isRect() &&
e.fLocalToDevice.isIdentity()) {
420 tmp.
setRect(
e.fShape.rect().roundOut());
423 e.fShape.asPath(&tmpPath);
425 tmp.
setPath(tmpPath, deviceBounds);
437 SkASSERT(!fSurfaceDrawContext->alwaysAntialias());
450 fSurfaceDrawContext->colorInfo(),
452 this->localToDevice(),
453 fSurfaceDrawContext->surfaceProps(),
458 fSurfaceDrawContext->drawPaint(this->clip(), std::move(grPaint), this->
localToDevice());
472 GrAA aa = fSurfaceDrawContext->chooseAA(
paint);
475 if (
paint.getPathEffect()) {
479 fSurfaceDrawContext->colorInfo(),
481 this->localToDevice(),
482 fSurfaceDrawContext->surfaceProps(),
485 path.setIsVolatile(
true);
488 fSurfaceDrawContext->drawPath(this->clip(),
497 if (!
paint.getMaskFilter() &&
498 paint.getStrokeWidth() > 0 &&
503 fSurfaceDrawContext->colorInfo(),
505 this->localToDevice(),
506 fSurfaceDrawContext->surfaceProps(),
508 fSurfaceDrawContext->drawStrokedLine(this->clip(),
534 paint.getPathEffect() ||
535 paint.getMaskFilter() ||
549 fSurfaceDrawContext->colorInfo(),
551 this->localToDevice(),
552 fSurfaceDrawContext->surfaceProps(),
562 fSurfaceDrawContext->drawVertices(this->clip(), std::move(grPaint), this->
localToDevice(),
563 std::move(vertices), &primitiveType);
575 if (
paint.getMaskFilter() ||
paint.getPathEffect()) {
579 this->clip(),
paint, this->localToDevice(), shape);
585 fSurfaceDrawContext->colorInfo(),
587 this->localToDevice(),
588 fSurfaceDrawContext->surfaceProps(),
593 fSurfaceDrawContext->drawRect(this->clip(), std::move(grPaint),
594 fSurfaceDrawContext->chooseAA(
paint), this->localToDevice(),
rect,
616 fSurfaceDrawContext->fillQuadWithEdgeAA(this->clip(),
624 fSurfaceDrawContext->fillRectWithEdgeAA(this->clip(),
638 auto mf =
paint.getMaskFilter();
652 this->clip(),
paint, this->localToDevice(), shape);
660 fSurfaceDrawContext->colorInfo(),
662 this->localToDevice(),
663 fSurfaceDrawContext->surfaceProps(),
668 fSurfaceDrawContext->drawRRect(this->clip(), std::move(grPaint),
669 fSurfaceDrawContext->chooseAA(
paint), this->localToDevice(),
686 if (
stroke.isFillStyle() && !
paint.getMaskFilter() && !
paint.getPathEffect()) {
690 fSurfaceDrawContext->chooseAA(
paint),
691 *fSurfaceDrawContext->caps()->shaderCaps())) {
694 fSurfaceDrawContext->colorInfo(),
696 this->localToDevice(),
697 fSurfaceDrawContext->surfaceProps(),
703 fSurfaceDrawContext->drawRRect(this->clip(), std::move(grPaint),
704 fSurfaceDrawContext->chooseAA(
paint),
705 this->localToDevice(), outer,
GrStyle());
711 path.setIsVolatile(
true);
712 path.addRRect(outer);
713 path.addRRect(inner);
721 paint, this->localToDevice(), shape);
729 if (
paint.getMaskFilter()) {
732 path.setIsVolatile(
true);
738 fSurfaceDrawContext->colorInfo(),
740 this->localToDevice(),
741 fSurfaceDrawContext->surfaceProps(),
746 fSurfaceDrawContext->drawRegion(this->clip(), std::move(grPaint),
747 fSurfaceDrawContext->chooseAA(
paint), this->localToDevice(),
755 if (
paint.getMaskFilter()) {
763 fSurfaceDrawContext->colorInfo(),
765 this->localToDevice(),
766 fSurfaceDrawContext->surfaceProps(),
771 fSurfaceDrawContext->drawOval(this->clip(), std::move(grPaint),
772 fSurfaceDrawContext->chooseAA(
paint), this->localToDevice(),
oval,
779 if (
paint.getMaskFilter()) {
785 fSurfaceDrawContext->colorInfo(),
787 this->localToDevice(),
788 fSurfaceDrawContext->surfaceProps(),
793 fSurfaceDrawContext->drawArc(this->clip(),
795 fSurfaceDrawContext->chooseAA(
paint),
796 this->localToDevice(),
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);
860 {SkColorTypeToGrColorType(bitmap.colorType()),
862 bitmap.refColorSpace()},
863 this->surfaceProps());
880 {ct, kPremul_SkAlphaType, image->refColorSpace()},
881 this->surfaceProps());
895 auto sdc = fSurfaceDrawContext.get();
901 if (sdc->wrapsVkSecondaryCB()) {
918 "Device_SnapSpecial");
938 auto sdc = fSurfaceDrawContext.get();
944 if (sdc->wrapsVkSecondaryCB()) {
950 auto scaledContext = sdc->rescale(sdc->imageInfo().makeDimensions(dstDims),
955 if (!scaledContext) {
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,
1235void Device::onDrawGlyphRunList(
SkCanvas* canvas,
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(),
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
SkAssertResult(font.textToGlyphs("Hello", 5, SkTextEncoding::kUTF8, glyphs, std::size(glyphs))==count)
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 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
sk_sp< SkColorSpace > refColorSpace() 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
virtual GrRenderTargetProxy * asRenderTargetProxy()
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 SkArc &arc, 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
SkSpan< const ChildPtr > children() 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 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
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)
void asyncRescaleAndReadPixels(const SkImageInfo &info, const SkIRect &srcRect, RescaleGamma rescaleGamma, RescaleMode rescaleMode, ReadPixelsCallback callback, ReadPixelsContext context)
SkImage::ReadPixelsCallback ReadPixelsCallback
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 drawArc(const SkArc &arc, 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 &)
unsigned useCenter Optional< SkMatrix > matrix
sk_sp< const SkImage > image
ClipOpAndAA opAA SkRegion region
sk_sp< SkBlender > blender SkRect rect
PODArray< SkColor > colors
SkSamplingOptions sampling
sk_sp< SkSpecialImage > MakeDeferredFromGpu(GrRecordingContext *context, const SkIRect &subset, uint32_t uniqueID, GrSurfaceProxyView view, const GrColorInfo &colorInfo, const SkSurfaceProps &props)
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)
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
const myers::Point & get< 0 >(const myers::Segment &s)
const myers::Point & get(const myers::Segment &)
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)