8#ifndef skgpu_v1_Device_DEFINED
9#define skgpu_v1_Device_DEFINED
57enum class GrAA : bool;
70class TiledTextureUtils;
85class SurfaceFillContext;
103 bool wait(
int numSemaphores,
105 bool deleteSemaphoresAfterWait);
193#if !defined(SK_ENABLE_OPTIMIZE_SIZE)
301 enum class DeviceFlags {
307 GR_DECL_BITFIELD_CLASS_OPS_FRIENDS(DeviceFlags);
309 static SkImageInfo MakeInfo(SurfaceContext*, DeviceFlags);
316 std::unique_ptr<SurfaceDrawContext> fSurfaceDrawContext;
324 Device(std::unique_ptr<SurfaceDrawContext>, DeviceFlags);
328 bool onReadPixels(
const SkPixmap&,
int,
int)
override;
329 bool onWritePixels(
const SkPixmap&,
int,
int)
override;
330 bool onAccessPixels(
SkPixmap*)
override;
336 fClip.clipShader(std::move(shader));
339 const GrClip* clip()
const {
return &fClip; }
343 void drawImageQuadDirect(
const SkImage*,
357 std::unique_ptr<SkLatticeIter>,
362 friend class ::SkSurface_Ganesh;
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
#define GR_MAKE_BITFIELD_CLASS_OPS(X)
static SkColorType colorType(AImageDecoder *decoder, const AImageDecoderHeaderInfo *headerInfo)
const SkM44 & globalToDevice() const
sk_sp< SkSpecialImage > snapSpecial()
const SkMatrix & localToDevice() const
const SkSurfaceProps & surfaceProps() const
void(ReadPixelsContext, std::unique_ptr< const AsyncReadResult >) ReadPixelsCallback
static SkRect MapRect(const SkM44 &m, const SkRect &r)
void clipRRect(const SkMatrix &ctm, const SkRRect &rrect, GrAA aa, SkClipOp op)
void clipRect(const SkMatrix &ctm, const SkRect &rect, GrAA aa, SkClipOp op)
ClipState clipState() const
SkIRect getConservativeBounds() const override
void replaceClip(const SkIRect &rect)
void clipRRect(const SkRRect &rrect, SkClipOp op, bool aa) 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 clipRect(const SkRect &rect, SkClipOp op, bool aa) override
bool isClipEmpty() const 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
bool isClipWideOpen() const override
sk_sp< sktext::gpu::Slug > convertGlyphRunListToSlug(const sktext::GlyphRunList &glyphRunList, const SkPaint &paint) override
void popClipStack() override
bool drawAsTiledImageRect(SkCanvas *, const SkImage *, const SkRect *src, const SkRect &dst, const SkSamplingOptions &, const SkPaint &, SkCanvas::SrcRectConstraint) override
bool isClipAntiAliased() const override
bool shouldDrawAsTiledImageRect() 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 drawEdgeAAImageSet(const SkCanvas::ImageSetEntry[], int count, const SkPoint dstClips[], const SkMatrix preViewMatrices[], const SkSamplingOptions &, const SkPaint &, SkCanvas::SrcRectConstraint) override
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 drawSpecial(SkSpecialImage *, const SkMatrix &localToDevice, const SkSamplingOptions &, const SkPaint &, SkCanvas::SrcRectConstraint) override
void clipPath(const SkPath &path, SkClipOp op, bool aa) override
void drawEdgeAAImage(const SkImage *, const SkRect &src, const SkRect &dst, const SkPoint dstClip[4], SkCanvas::QuadAAFlags, const SkMatrix &localToDevice, const SkSamplingOptions &, const SkPaint &, SkCanvas::SrcRectConstraint, const SkMatrix &srcToDst, SkTileMode)
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
void replaceClip(const SkIRect &rect) override
Device * asGaneshDevice() override
bool isClipRect() const 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
void pushClipStack() override
sk_sp< SkSpecialImage > makeSpecial(const SkBitmap &) override
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
PODArray< SkPoint > dstClips
sk_sp< SkBlender > blender SkRect rect
PODArray< SkMatrix > preViewMatrices
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)
void round(SkIRect *dst) const