Flutter Engine
The Flutter Engine
|
#include <Device.h>
Classes | |
class | IntersectionTreeSet |
Public Member Functions | |
~Device () override | |
Device * | asGraphiteDevice () override |
Recorder * | recorder () const override |
void | abandonRecorder () |
void | flushPendingWorkToRecorder (Recorder *recorder=nullptr) |
const Transform & | localToDeviceTransform () |
void | setImmutable () override |
SkStrikeDeviceInfo | strikeDeviceInfo () const override |
TextureProxy * | target () |
TextureProxyView | readSurfaceView () const |
sk_sp< Image > | makeImageCopy (const SkIRect &subset, Budgeted, Mipmapped, SkBackingFit) |
bool | isScratchDevice () const |
sk_sp< Task > | lastDrawTask () const |
bool | useDrawCoverageMaskForMaskFilters () const override |
void | pushClipStack () override |
void | popClipStack () override |
bool | isClipWideOpen () const override |
bool | isClipEmpty () const override |
bool | isClipRect () const override |
bool | isClipAntiAliased () const override |
SkIRect | devClipBounds () const override |
void | android_utils_clipAsRgn (SkRegion *) const override |
void | clipRect (const SkRect &rect, SkClipOp, bool aa) override |
void | clipRRect (const SkRRect &rrect, SkClipOp, bool aa) override |
void | clipPath (const SkPath &path, SkClipOp, bool aa) override |
void | clipRegion (const SkRegion &globalRgn, SkClipOp) override |
void | replaceClip (const SkIRect &rect) override |
void | drawPaint (const SkPaint &paint) override |
void | drawRect (const SkRect &r, const SkPaint &paint) override |
void | drawOval (const SkRect &oval, const SkPaint &paint) override |
void | drawRRect (const SkRRect &rr, const SkPaint &paint) override |
void | drawPoints (SkCanvas::PointMode mode, size_t count, const SkPoint[], const SkPaint &paint) override |
void | drawPath (const SkPath &path, const SkPaint &paint, bool pathIsMutable=false) override |
void | drawEdgeAAQuad (const SkRect &rect, const SkPoint clip[4], SkCanvas::QuadAAFlags aaFlags, const SkColor4f &color, SkBlendMode mode) override |
void | drawEdgeAAImageSet (const SkCanvas::ImageSetEntry[], int count, const SkPoint dstClips[], const SkMatrix preViewMatrices[], const SkSamplingOptions &, const SkPaint &, SkCanvas::SrcRectConstraint) override |
void | drawImageRect (const SkImage *, const SkRect *src, const SkRect &dst, const SkSamplingOptions &, const SkPaint &, SkCanvas::SrcRectConstraint) override |
void | drawVertices (const SkVertices *, sk_sp< SkBlender >, const SkPaint &, bool) override |
bool | drawAsTiledImageRect (SkCanvas *, const SkImage *, const SkRect *src, const SkRect &dst, const SkSamplingOptions &, const SkPaint &, SkCanvas::SrcRectConstraint) override |
void | drawImageLattice (const SkImage *, const SkCanvas::Lattice &, const SkRect &dst, SkFilterMode, const SkPaint &) override |
void | drawAtlas (const SkRSXform[], const SkRect[], const SkColor[], int count, sk_sp< SkBlender >, const SkPaint &) override |
void | drawDrawable (SkCanvas *, SkDrawable *, const SkMatrix *) override |
void | drawMesh (const SkMesh &, sk_sp< SkBlender >, const SkPaint &) override |
void | drawShadow (const SkPath &, const SkDrawShadowRec &) override |
sk_sp< SkSurface > | makeSurface (const SkImageInfo &, const SkSurfaceProps &) override |
sk_sp< SkDevice > | createDevice (const CreateInfo &, const SkPaint *) override |
sk_sp< SkSpecialImage > | snapSpecial (const SkIRect &subset, bool forceCopy=false) override |
void | drawSpecial (SkSpecialImage *, const SkMatrix &localToDevice, const SkSamplingOptions &, const SkPaint &, SkCanvas::SrcRectConstraint) override |
void | drawCoverageMask (const SkSpecialImage *, const SkMatrix &localToDevice, const SkSamplingOptions &, const SkPaint &) override |
bool | drawBlurredRRect (const SkRRect &, const SkPaint &, float deviceSigma) override |
Public Member Functions inherited from SkDevice | |
SkDevice (const SkImageInfo &, const SkSurfaceProps &) | |
const SkImageInfo & | imageInfo () const |
int | width () const |
int | height () const |
bool | isOpaque () const |
SkIRect | bounds () const |
SkISize | size () const |
const SkSurfaceProps & | surfaceProps () const |
SkScalerContextFlags | scalerContextFlags () const |
bool | writePixels (const SkPixmap &src, int x, int y) |
bool | readPixels (const SkPixmap &dst, int x, int y) |
bool | accessPixels (SkPixmap *pmap) |
bool | peekPixels (SkPixmap *) |
const SkM44 & | localToDevice44 () const |
const SkMatrix & | localToDevice () const |
const SkM44 & | deviceToGlobal () const |
const SkM44 & | globalToDevice () const |
SkIPoint | getOrigin () const |
bool | isPixelAlignedToGlobal () const |
SkMatrix | getRelativeTransform (const SkDevice &) const |
void | setLocalToDevice (const SkM44 &localToDevice) |
void | setGlobalCTM (const SkM44 &ctm) |
void | getGlobalBounds (SkIRect *bounds) const |
SkIRect | getGlobalBounds () const |
void | clipShader (sk_sp< SkShader > sh, SkClipOp op) |
virtual bool | android_utils_clipWithStencil () |
virtual bool | isNoPixelsDevice () const |
virtual void * | getRasterHandle () const |
virtual GrRecordingContext * | recordingContext () const |
virtual skgpu::ganesh::Device * | asGaneshDevice () |
void | drawGlyphRunList (SkCanvas *, const sktext::GlyphRunList &glyphRunList, const SkPaint &paint) |
virtual void | drawRegion (const SkRegion &r, const SkPaint &paint) |
virtual void | drawArc (const SkRect &oval, SkScalar startAngle, SkScalar sweepAngle, bool useCenter, const SkPaint &paint) |
virtual void | drawDRRect (const SkRRect &outer, const SkRRect &inner, const SkPaint &) |
virtual bool | shouldDrawAsTiledImageRect () const |
virtual void | drawPatch (const SkPoint cubics[12], const SkColor colors[4], const SkPoint texCoords[4], sk_sp< SkBlender >, const SkPaint &paint) |
virtual void | drawAnnotation (const SkRect &, const char[], SkData *) |
virtual sk_sp< SkSpecialImage > | snapSpecialScaled (const SkIRect &subset, const SkISize &dstDims) |
sk_sp< SkSpecialImage > | snapSpecial () |
virtual void | drawDevice (SkDevice *, const SkSamplingOptions &, const SkPaint &) |
void | drawFilteredImage (const skif::Mapping &mapping, SkSpecialImage *src, SkColorType ct, const SkImageFilter *, const SkSamplingOptions &, const SkPaint &) |
Public Member Functions inherited from SkRefCntBase | |
SkRefCntBase () | |
virtual | ~SkRefCntBase () |
bool | unique () const |
void | ref () const |
void | unref () const |
Static Public Member Functions | |
static sk_sp< Device > | Make (Recorder *recorder, sk_sp< TextureProxy >, SkISize deviceSize, const SkColorInfo &, const SkSurfaceProps &, LoadOp initialLoadOp, bool registerWithRecorder=true) |
static sk_sp< Device > | Make (Recorder *, const SkImageInfo &, Budgeted, Mipmapped, SkBackingFit, const SkSurfaceProps &, LoadOp initialLoadOp, bool registerWithRecorder=true) |
Private Member Functions | |
sk_sp< SkSpecialImage > | makeSpecial (const SkBitmap &) override |
sk_sp< SkSpecialImage > | makeSpecial (const SkImage *) override |
bool | onReadPixels (const SkPixmap &, int x, int y) override |
bool | onWritePixels (const SkPixmap &, int x, int y) override |
void | onDrawGlyphRunList (SkCanvas *, const sktext::GlyphRunList &, const SkPaint &) override |
void | onClipShader (sk_sp< SkShader > shader) override |
sk_sp< skif::Backend > | createImageFilteringBackend (const SkSurfaceProps &surfaceProps, SkColorType colorType) const override |
sk_sp< sktext::gpu::Slug > | convertGlyphRunListToSlug (const sktext::GlyphRunList &glyphRunList, const SkPaint &paint) override |
void | drawSlug (SkCanvas *, const sktext::gpu::Slug *slug, const SkPaint &paint) override |
Friends | |
class | ClipStack |
Additional Inherited Members | |
Protected Member Functions inherited from SkDevice | |
void | setDeviceCoordinateSystem (const SkM44 &deviceToGlobal, const SkM44 &globalToDevice, const SkM44 &localToDevice, int bufferOriginX, int bufferOriginY) |
void | setOrigin (const SkM44 &globalCTM, int x, int y) |
bool | checkLocalToDeviceDirty () |
|
override |
Definition at line 343 of file Device.cpp.
|
inline |
|
overridevirtual |
Implements SkDevice.
Definition at line 539 of file Device.cpp.
|
inlineoverridevirtual |
|
overridevirtual |
Implements SkDevice.
Definition at line 571 of file Device.cpp.
|
overridevirtual |
Implements SkDevice.
Definition at line 558 of file Device.cpp.
|
overridevirtual |
Implements SkDevice.
Definition at line 584 of file Device.cpp.
|
overridevirtual |
Implements SkDevice.
Definition at line 564 of file Device.cpp.
|
overrideprivatevirtual |
Reimplemented from SkDevice.
Definition at line 1658 of file Device.cpp.
|
overridevirtual |
Create a new device based on CreateInfo. If the paint is not null, then it represents a preview of how the new device will be composed with its creator device (this).
The subclass may be handed this device in drawDevice(), so it must always return a device that it knows how to draw, and that it knows how to identify if it is not of the same subclass (since drawDevice is passed a SkDevice*). If the subclass cannot fulfill that contract (e.g. PDF cannot support some settings on the paint) it should return NULL, and the caller may then decide to explicitly create a bitmapdevice, knowing that later it could not call drawDevice with it (but it could call drawSprite or drawBitmap).
Reimplemented from SkDevice.
Definition at line 385 of file Device.cpp.
|
overrideprivatevirtual |
Reimplemented from SkDevice.
Definition at line 1636 of file Device.cpp.
|
overridevirtual |
Returns the bounding box of the current clip, in this device's coordinate space. No pixels outside of these bounds will be touched by draws unless the clip is further modified (at which point this will return the updated bounds).
Implements SkDevice.
Definition at line 534 of file Device.cpp.
|
overridevirtual |
Reimplemented from SkDevice.
Definition at line 672 of file Device.cpp.
|
overridevirtual |
Draw rrect with an optimized path for analytic blurs, if provided by the device.
Reimplemented from SkDevice.
Definition at line 1672 of file Device.cpp.
|
overridevirtual |
Draw the special image's subset to this device, treating its alpha channel as coverage for the draw and ignoring any RGB channels that might be present. This will be drawn using the provided matrix transform instead of the device's current local to device matrix.
Coverage values beyond the image's subset are treated as 0 (i.e. kDecal tiling). Color values before coverage are determined as normal by the SkPaint, ignoring style, path effects, mask filters and image filters. The local coords of any SkShader on the paint should be relative to the SkDevice's current matrix (i.e. 'maskToDevice' determines how the coverage mask aligns with device-space, but otherwise shading proceeds like other draws).
Reimplemented from SkDevice.
Definition at line 1552 of file Device.cpp.
|
inlineoverridevirtual |
|
overridevirtual |
Reimplemented from SkDevice.
Definition at line 786 of file Device.cpp.
|
overridevirtual |
Reimplemented from SkDevice.
Definition at line 768 of file Device.cpp.
|
inlineoverridevirtual |
|
overridevirtual |
Implements SkDevice.
Definition at line 847 of file Device.cpp.
|
overridevirtual |
Implements SkDevice.
Definition at line 716 of file Device.cpp.
|
overridevirtual |
Implements SkDevice.
Definition at line 620 of file Device.cpp.
|
overridevirtual |
If pathIsMutable, then the implementation is allowed to cast path to a non-const pointer and modify it in place (as an optimization). Canvas may do this to implement helpers such as drawOval, by placing a temp path on the stack to hold the representation of the oval.
Implements SkDevice.
Definition at line 735 of file Device.cpp.
|
overridevirtual |
Implements SkDevice.
|
overridevirtual |
|
inlineoverridevirtual |
|
overrideprivatevirtual |
Reimplemented from SkDevice.
Definition at line 1667 of file Device.cpp.
|
overridevirtual |
Draw the special image's subset to this device, subject to the given matrix transform instead of the device's current local to device matrix.
If 'constraint' is kFast, the rendered geometry of the image still reflects the extent of the SkSpecialImage's subset, but it's assumed that the pixel data beyond the subset is valid (e.g. SkSpecialImage::makeSubset() was called to crop a larger image).
Reimplemented from SkDevice.
Definition at line 1520 of file Device.cpp.
|
overridevirtual |
If skipColorXform is true, then the implementation should assume that the provided vertex colors are already in the destination color space.
Implements SkDevice.
Definition at line 660 of file Device.cpp.
void skgpu::graphite::Device::flushPendingWorkToRecorder | ( | Recorder * | recorder = nullptr | ) |
Definition at line 1410 of file Device.cpp.
|
overridevirtual |
Implements SkDevice.
Definition at line 520 of file Device.cpp.
|
inlineoverridevirtual |
Implements SkDevice.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Implements SkDevice.
bool skgpu::graphite::Device::isScratchDevice | ( | ) | const |
Definition at line 1645 of file Device.cpp.
Definition at line 1405 of file Device.cpp.
const Transform & skgpu::graphite::Device::localToDeviceTransform | ( | ) |
Definition at line 374 of file Device.cpp.
|
static |
Definition at line 237 of file Device.cpp.
|
static |
Definition at line 268 of file Device.cpp.
sk_sp< Image > skgpu::graphite::Device::makeImageCopy | ( | const SkIRect & | subset, |
Budgeted | budgeted, | ||
Mipmapped | mipmapped, | ||
SkBackingFit | backingFit | ||
) |
Definition at line 411 of file Device.cpp.
|
overrideprivatevirtual |
Reimplemented from SkDevice.
Definition at line 1598 of file Device.cpp.
|
overrideprivatevirtual |
Reimplemented from SkDevice.
Definition at line 1602 of file Device.cpp.
|
overridevirtual |
Reimplemented from SkDevice.
Definition at line 407 of file Device.cpp.
Implements SkDevice.
Definition at line 579 of file Device.cpp.
|
overrideprivatevirtual |
Implements SkDevice.
Definition at line 868 of file Device.cpp.
|
overrideprivatevirtual |
Reimplemented from SkDevice.
Definition at line 430 of file Device.cpp.
|
overrideprivatevirtual |
Reimplemented from SkDevice.
Definition at line 455 of file Device.cpp.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
TextureProxyView skgpu::graphite::Device::readSurfaceView | ( | ) | const |
Definition at line 1643 of file Device.cpp.
|
inlineoverridevirtual |
|
overridevirtual |
Implements SkDevice.
Definition at line 603 of file Device.cpp.
|
overridevirtual |
Reimplemented from SkDevice.
Definition at line 359 of file Device.cpp.
|
overridevirtual |
Reimplemented from SkDevice.
Definition at line 1606 of file Device.cpp.
|
overridevirtual |
Reimplemented from SkDevice.
Definition at line 381 of file Device.cpp.
TextureProxy * skgpu::graphite::Device::target | ( | ) |
Definition at line 1641 of file Device.cpp.
|
inlineoverridevirtual |