Flutter Engine
The Flutter Engine
|
#include <SkSpecialImage.h>
Public Types | |
typedef void * | ReleaseContext |
typedef void(* | RasterReleaseProc) (void *pixels, ReleaseContext) |
Public Member Functions | |
const SkSurfaceProps & | props () const |
int | width () const |
int | height () const |
SkISize | dimensions () const |
const SkIRect & | subset () const |
uint32_t | uniqueID () const |
virtual SkISize | backingStoreDimensions () const =0 |
virtual size_t | getSize () const =0 |
bool | isExactFit () const |
const SkColorInfo & | colorInfo () const |
SkAlphaType | alphaType () const |
SkColorType | colorType () const |
SkColorSpace * | getColorSpace () const |
void | draw (SkCanvas *canvas, SkScalar x, SkScalar y, const SkSamplingOptions &sampling, const SkPaint *paint, bool strict=true) const |
void | draw (SkCanvas *canvas, SkScalar x, SkScalar y) const |
sk_sp< SkSpecialImage > | makeSubset (const SkIRect &subset) const |
sk_sp< SkSpecialImage > | makePixelOutset () const |
virtual sk_sp< SkImage > | asImage () const =0 |
virtual sk_sp< SkShader > | asShader (SkTileMode, const SkSamplingOptions &, const SkMatrix &lm, bool strict=true) const |
virtual bool | isGaneshBacked () const |
virtual bool | isGraphiteBacked () const |
virtual GrRecordingContext * | getContext () const |
Public Member Functions inherited from SkRefCntBase | |
SkRefCntBase () | |
virtual | ~SkRefCntBase () |
bool | unique () const |
void | ref () const |
void | unref () const |
Protected Member Functions | |
SkSpecialImage (const SkIRect &subset, uint32_t uniqueID, const SkColorInfo &, const SkSurfaceProps &) | |
virtual sk_sp< SkSpecialImage > | onMakeBackingStoreSubset (const SkIRect &subset) const =0 |
This is a restricted form of SkImage solely intended for internal use. It differs from SkImage in that:
Note: the contents of the backing storage outside of the subset rect are undefined.
Definition at line 49 of file SkSpecialImage.h.
typedef void(* SkSpecialImage::RasterReleaseProc) (void *pixels, ReleaseContext) |
Definition at line 52 of file SkSpecialImage.h.
typedef void* SkSpecialImage::ReleaseContext |
Definition at line 51 of file SkSpecialImage.h.
|
protected |
Definition at line 29 of file SkSpecialImage.cpp.
|
inline |
Definition at line 70 of file SkSpecialImage.h.
Create an SkImage view of the contents of this special image, pointing to the same underlying memory.
TODO: If SkImages::MakeFiltered were to return an SkShader that accounted for the subset constraint and offset, then this could move to a private virtual for use in draw() and asShader().
Implemented in SkSpecialImage_Raster, SkSpecialImage_Gpu, and skgpu::graphite::SpecialImage.
|
virtual |
Create an SkShader that samples the contents of this special image, applying tile mode for any sample that falls outside its internal subset.
'strict' defaults to true and applies shader-based tiling to the subset. If the subset is the same as the backing store dimensions, it is automatically degraded to non-strict (HW tiling and sampling). 'strict' can be set to false if it's known that the subset boundaries aren't visible AND the texel data in adjacent rows/cols is valid to be included by the given sampling options.
Reimplemented in SkSpecialImage_Raster.
Definition at line 52 of file SkSpecialImage.cpp.
|
pure virtual |
Implemented in SkSpecialImage_Raster, SkSpecialImage_Gpu, and skgpu::graphite::SpecialImage.
|
inline |
Definition at line 69 of file SkSpecialImage.h.
|
inline |
Definition at line 71 of file SkSpecialImage.h.
|
inline |
Definition at line 58 of file SkSpecialImage.h.
Definition at line 82 of file SkSpecialImage.h.
void SkSpecialImage::draw | ( | SkCanvas * | canvas, |
SkScalar | x, | ||
SkScalar | y, | ||
const SkSamplingOptions & | sampling, | ||
const SkPaint * | paint, | ||
bool | strict = true |
||
) | const |
Draw this SpecialImage into the canvas, automatically taking into account the image's subset
Definition at line 39 of file SkSpecialImage.cpp.
|
inline |
Definition at line 72 of file SkSpecialImage.h.
|
inlinevirtual |
Return the GrRecordingContext if the SkSpecialImage is GrTexture-backed
Reimplemented in SkSpecialImage_Gpu.
Definition at line 138 of file SkSpecialImage.h.
|
pure virtual |
Implemented in SkSpecialImage_Raster, SkSpecialImage_Gpu, and skgpu::graphite::SpecialImage.
|
inline |
Definition at line 57 of file SkSpecialImage.h.
|
inline |
Definition at line 67 of file SkSpecialImage.h.
|
inlinevirtual |
If the SpecialImage is backed by a gpu texture, return true.
Reimplemented in SkSpecialImage_Gpu.
Definition at line 132 of file SkSpecialImage.h.
|
inlinevirtual |
Reimplemented in skgpu::graphite::SpecialImage.
Definition at line 133 of file SkSpecialImage.h.
|
inline |
Return a special image with a 1px larger subset in the backing store compared to this image. This should only be used when it's externally known that those outer pixels are valid.
Definition at line 100 of file SkSpecialImage.h.
|
inline |
Extract a subset of this special image and return it as a special image. It may or may not point to the same backing memory. The input 'subset' is relative to the special image's content rect.
Definition at line 91 of file SkSpecialImage.h.
|
protectedpure virtual |
Implemented in SkSpecialImage_Raster, SkSpecialImage_Gpu, and skgpu::graphite::SpecialImage.
|
inline |
Definition at line 54 of file SkSpecialImage.h.
|
inline |
Definition at line 59 of file SkSpecialImage.h.
|
inline |
Definition at line 61 of file SkSpecialImage.h.
|
inline |
Definition at line 56 of file SkSpecialImage.h.