Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
skgpu::graphite::SpecialImage Class Referencefinal
Inheritance diagram for skgpu::graphite::SpecialImage:
SkSpecialImage SkRefCnt SkRefCntBase

Public Member Functions

 SpecialImage (const SkIRect &subset, sk_sp< SkImage > image, const SkSurfaceProps &props)
 
size_t getSize () const override
 
bool isGraphiteBacked () const override
 
SkISize backingStoreDimensions () const override
 
sk_sp< SkSpecialImageonMakeBackingStoreSubset (const SkIRect &subset) const override
 
sk_sp< SkImageasImage () const override
 
- Public Member Functions inherited from SkSpecialImage
const SkSurfacePropsprops () const
 
int width () const
 
int height () const
 
SkISize dimensions () const
 
const SkIRectsubset () const
 
uint32_t uniqueID () const
 
virtual SkISize backingStoreDimensions () const =0
 
virtual size_t getSize () const =0
 
bool isExactFit () const
 
const SkColorInfocolorInfo () const
 
SkAlphaType alphaType () const
 
SkColorType colorType () const
 
SkColorSpacegetColorSpace () 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< SkSpecialImagemakeSubset (const SkIRect &subset) const
 
sk_sp< SkSpecialImagemakePixelOutset () const
 
virtual sk_sp< SkImageasImage () const =0
 
virtual sk_sp< SkShaderasShader (SkTileMode, const SkSamplingOptions &, const SkMatrix &lm, bool strict=true) const
 
virtual bool isGaneshBacked () const
 
virtual bool isGraphiteBacked () const
 
virtual GrRecordingContextgetContext () const
 
- Public Member Functions inherited from SkRefCntBase
 SkRefCntBase ()
 
virtual ~SkRefCntBase ()
 
bool unique () const
 
void ref () const
 
void unref () const
 

Additional Inherited Members

- Public Types inherited from SkSpecialImage
typedef void * ReleaseContext
 
typedef void(* RasterReleaseProc) (void *pixels, ReleaseContext)
 
- Protected Member Functions inherited from SkSpecialImage
 SkSpecialImage (const SkIRect &subset, uint32_t uniqueID, const SkColorInfo &, const SkSurfaceProps &)
 
virtual sk_sp< SkSpecialImageonMakeBackingStoreSubset (const SkIRect &subset) const =0
 

Detailed Description

Definition at line 20 of file SpecialImage_Graphite.cpp.

Constructor & Destructor Documentation

◆ SpecialImage()

skgpu::graphite::SpecialImage::SpecialImage ( const SkIRect subset,
sk_sp< SkImage image,
const SkSurfaceProps props 
)
inline

Definition at line 22 of file SpecialImage_Graphite.cpp.

24 , fImage(std::move(image)) {
26 }
#define SkASSERT(cond)
Definition: SkAssert.h:116
static SkImage_Base * as_IB(SkImage *image)
Definition: SkImage_Base.h:201
const SkImageInfo & imageInfo() const
Definition: SkImage.h:279
uint32_t uniqueID() const
Definition: SkImage.h:311
SkSpecialImage(const SkIRect &subset, uint32_t uniqueID, const SkColorInfo &, const SkSurfaceProps &)
const SkIRect & subset() const
const SkSurfaceProps & props() const
bool isGraphiteBacked() const override
sk_sp< const SkImage > image
Definition: SkRecords.h:269
const SkColorInfo & colorInfo() const
Definition: SkImageInfo.h:404

Member Function Documentation

◆ asImage()

sk_sp< SkImage > skgpu::graphite::SpecialImage::asImage ( ) const
inlineoverridevirtual

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().

Implements SkSpecialImage.

Definition at line 43 of file SpecialImage_Graphite.cpp.

43{ return fImage; }

◆ backingStoreDimensions()

SkISize skgpu::graphite::SpecialImage::backingStoreDimensions ( ) const
inlineoverridevirtual

Implements SkSpecialImage.

Definition at line 34 of file SpecialImage_Graphite.cpp.

34 {
35 return fImage->dimensions();
36 }
SkISize dimensions() const
Definition: SkImage.h:297

◆ getSize()

size_t skgpu::graphite::SpecialImage::getSize ( ) const
inlineoverridevirtual

Implements SkSpecialImage.

Definition at line 28 of file SpecialImage_Graphite.cpp.

28 {
29 return fImage->textureSize();
30 }
virtual size_t textureSize() const =0

◆ isGraphiteBacked()

bool skgpu::graphite::SpecialImage::isGraphiteBacked ( ) const
inlineoverridevirtual

Reimplemented from SkSpecialImage.

Definition at line 32 of file SpecialImage_Graphite.cpp.

32{ return true; }

◆ onMakeBackingStoreSubset()

sk_sp< SkSpecialImage > skgpu::graphite::SpecialImage::onMakeBackingStoreSubset ( const SkIRect subset) const
inlineoverridevirtual

Implements SkSpecialImage.

Definition at line 38 of file SpecialImage_Graphite.cpp.

38 {
39 SkASSERT(fImage->bounds().contains(subset));
40 return sk_make_sp<skgpu::graphite::SpecialImage>(subset, fImage, this->props());
41 }
SkIRect bounds() const
Definition: SkImage.h:303
bool contains(int32_t x, int32_t y) const
Definition: SkRect.h:463

The documentation for this class was generated from the following file: