Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
SkImage_RasterPinnable Class Referencefinal

#include <SkImage_RasterPinnable.h>

Inheritance diagram for SkImage_RasterPinnable:
SkImage_Raster SkImage_Base SkImage SkRefCnt SkRefCntBase

Public Member Functions

 SkImage_RasterPinnable (const SkBitmap &bm)
 
std::tuple< GrSurfaceProxyView, GrColorTypeasView (GrRecordingContext *, skgpu::Mipmapped, GrImageTexGenPolicy) const
 
SkImage_Base::Type type () const override
 
- Public Member Functions inherited from SkImage_Raster
 SkImage_Raster (const SkImageInfo &, sk_sp< SkData >, size_t rb, uint32_t id=kNeedNewImageUniqueID)
 
 SkImage_Raster (const SkBitmap &bm, bool bitmapMayBeMutable=false)
 
 ~SkImage_Raster () override
 
bool isValid (GrRecordingContext *context) const override
 
bool onReadPixels (GrDirectContext *, const SkImageInfo &, void *, size_t, int srcX, int srcY, CachingHint) const override
 
bool onPeekPixels (SkPixmap *) const override
 
const SkBitmaponPeekBitmap () const override
 
bool getROPixels (GrDirectContext *, SkBitmap *, CachingHint) const override
 
sk_sp< SkImageonMakeSubset (GrDirectContext *, const SkIRect &) const override
 
sk_sp< SkImageonMakeSubset (skgpu::graphite::Recorder *, const SkIRect &, RequiredProperties) const override
 
SkPixelRefgetPixelRef () const
 
bool onAsLegacyBitmap (GrDirectContext *, SkBitmap *) const override
 
sk_sp< SkImageonMakeColorTypeAndColorSpace (SkColorType, sk_sp< SkColorSpace >, GrDirectContext *) const override
 
sk_sp< SkImageonReinterpretColorSpace (sk_sp< SkColorSpace >) const override
 
void notifyAddedToRasterCache () const override
 
bool onHasMipmaps () const override
 
bool onIsProtected () const override
 
SkMipmaponPeekMips () const override
 
sk_sp< SkImageonMakeWithMipmaps (sk_sp< SkMipmap > mips) const override
 
SkBitmap bitmap () const
 
- Public Member Functions inherited from SkImage_Base
 ~SkImage_Base () override
 
sk_sp< SkImagemakeColorSpace (GrDirectContext *, sk_sp< SkColorSpace >) const override
 
sk_sp< SkImagemakeColorSpace (skgpu::graphite::Recorder *, sk_sp< SkColorSpace >, RequiredProperties) const override
 
sk_sp< SkImagemakeColorTypeAndColorSpace (GrDirectContext *dContext, SkColorType targetColorType, sk_sp< SkColorSpace > targetCS) const override
 
sk_sp< SkImagemakeColorTypeAndColorSpace (skgpu::graphite::Recorder *, SkColorType, sk_sp< SkColorSpace >, RequiredProperties) const override
 
sk_sp< SkImagemakeSubset (GrDirectContext *direct, const SkIRect &subset) const override
 
sk_sp< SkImagemakeSubset (skgpu::graphite::Recorder *, const SkIRect &, RequiredProperties) const override
 
size_t textureSize () const override
 
sk_sp< SkMipmaprefMips () const
 
virtual void onAsyncRescaleAndReadPixels (const SkImageInfo &, SkIRect srcRect, RescaleGamma, RescaleMode, ReadPixelsCallback, ReadPixelsContext) const
 
virtual void onAsyncRescaleAndReadPixelsYUV420 (SkYUVColorSpace, bool readAlpha, sk_sp< SkColorSpace > dstColorSpace, SkIRect srcRect, SkISize dstSize, RescaleGamma, RescaleMode, ReadPixelsCallback, ReadPixelsContext) const
 
virtual GrImageContextcontext () const
 
virtual GrDirectContextdirectContext () const
 
virtual void generatingSurfaceIsDeleted ()
 
virtual sk_sp< SkDataonRefEncoded () const
 
bool isLazyGenerated () const override
 
bool isRasterBacked () const
 
bool isGaneshBacked () const
 
bool isGraphiteBacked () const
 
bool isYUVA () const
 
bool isTextureBacked () const override
 
- Public Member Functions inherited from SkImage
const SkImageInfoimageInfo () const
 
int width () const
 
int height () const
 
SkISize dimensions () const
 
SkIRect bounds () const
 
uint32_t uniqueID () const
 
SkAlphaType alphaType () const
 
SkColorType colorType () const
 
SkColorSpacecolorSpace () const
 
sk_sp< SkColorSpacerefColorSpace () const
 
bool isAlphaOnly () const
 
bool isOpaque () const
 
sk_sp< SkShadermakeShader (SkTileMode tmx, SkTileMode tmy, const SkSamplingOptions &, const SkMatrix *localMatrix=nullptr) const
 
sk_sp< SkShadermakeShader (SkTileMode tmx, SkTileMode tmy, const SkSamplingOptions &sampling, const SkMatrix &lm) const
 
sk_sp< SkShadermakeShader (const SkSamplingOptions &sampling, const SkMatrix &lm) const
 
sk_sp< SkShadermakeShader (const SkSamplingOptions &sampling, const SkMatrix *lm=nullptr) const
 
sk_sp< SkShadermakeRawShader (SkTileMode tmx, SkTileMode tmy, const SkSamplingOptions &, const SkMatrix *localMatrix=nullptr) const
 
sk_sp< SkShadermakeRawShader (SkTileMode tmx, SkTileMode tmy, const SkSamplingOptions &sampling, const SkMatrix &lm) const
 
sk_sp< SkShadermakeRawShader (const SkSamplingOptions &sampling, const SkMatrix &lm) const
 
sk_sp< SkShadermakeRawShader (const SkSamplingOptions &sampling, const SkMatrix *lm=nullptr) const
 
bool peekPixels (SkPixmap *pixmap) const
 
bool readPixels (GrDirectContext *context, const SkImageInfo &dstInfo, void *dstPixels, size_t dstRowBytes, int srcX, int srcY, CachingHint cachingHint=kAllow_CachingHint) const
 
bool readPixels (GrDirectContext *context, const SkPixmap &dst, int srcX, int srcY, CachingHint cachingHint=kAllow_CachingHint) const
 
bool readPixels (const SkImageInfo &dstInfo, void *dstPixels, size_t dstRowBytes, int srcX, int srcY, CachingHint cachingHint=kAllow_CachingHint) const
 
bool readPixels (const SkPixmap &dst, int srcX, int srcY, CachingHint cachingHint=kAllow_CachingHint) const
 
void asyncRescaleAndReadPixels (const SkImageInfo &info, const SkIRect &srcRect, RescaleGamma rescaleGamma, RescaleMode rescaleMode, ReadPixelsCallback callback, ReadPixelsContext context) const
 
void asyncRescaleAndReadPixelsYUV420 (SkYUVColorSpace yuvColorSpace, sk_sp< SkColorSpace > dstColorSpace, const SkIRect &srcRect, const SkISize &dstSize, RescaleGamma rescaleGamma, RescaleMode rescaleMode, ReadPixelsCallback callback, ReadPixelsContext context) const
 
void asyncRescaleAndReadPixelsYUVA420 (SkYUVColorSpace yuvColorSpace, sk_sp< SkColorSpace > dstColorSpace, const SkIRect &srcRect, const SkISize &dstSize, RescaleGamma rescaleGamma, RescaleMode rescaleMode, ReadPixelsCallback callback, ReadPixelsContext context) const
 
bool scalePixels (const SkPixmap &dst, const SkSamplingOptions &, CachingHint cachingHint=kAllow_CachingHint) const
 
sk_sp< SkDatarefEncodedData () const
 
bool hasMipmaps () const
 
bool isProtected () const
 
sk_sp< SkImagewithDefaultMipmaps () const
 
sk_sp< SkImagemakeNonTextureImage (GrDirectContext *=nullptr) const
 
sk_sp< SkImagemakeRasterImage (GrDirectContext *, CachingHint cachingHint=kDisallow_CachingHint) const
 
sk_sp< SkImagemakeRasterImage (CachingHint cachingHint=kDisallow_CachingHint) const
 
bool asLegacyBitmap (SkBitmap *bitmap, LegacyBitmapMode legacyBitmapMode=kRO_LegacyBitmapMode) const
 
sk_sp< SkImagereinterpretColorSpace (sk_sp< SkColorSpace > newColorSpace) const
 
- Public Member Functions inherited from SkRefCntBase
 SkRefCntBase ()
 
virtual ~SkRefCntBase ()
 
bool unique () const
 
void ref () const
 
void unref () const
 

Public Attributes

std::unique_ptr< PinnedDatafPinnedData
 

Additional Inherited Members

- Public Types inherited from SkImage_Base
enum class  Type {
  kRaster , kRasterPinnable , kLazy , kLazyPicture ,
  kGanesh , kGaneshYUVA , kGraphite , kGraphiteYUVA
}
 
- Public Types inherited from SkImage
enum  CachingHint { kAllow_CachingHint , kDisallow_CachingHint }
 
enum class  RescaleGamma : bool { kSrc , kLinear }
 
enum class  RescaleMode { kNearest , kLinear , kRepeatedLinear , kRepeatedCubic }
 
enum  LegacyBitmapMode { kRO_LegacyBitmapMode }
 
using ReadPixelsContext = void *
 
using ReadPixelsCallback = void(ReadPixelsContext, std::unique_ptr< const AsyncReadResult >)
 
- Protected Member Functions inherited from SkImage_Base
 SkImage_Base (const SkImageInfo &info, uint32_t uniqueID)
 

Detailed Description

Definition at line 37 of file SkImage_RasterPinnable.h.

Constructor & Destructor Documentation

◆ SkImage_RasterPinnable()

SkImage_RasterPinnable::SkImage_RasterPinnable ( const SkBitmap bm)
inline

Definition at line 39 of file SkImage_RasterPinnable.h.

40 : SkImage_Raster(bm, /*bitmapMayBeMutable = */ true) {}
friend class SkImage_Raster
Definition SkImage.h:937

Member Function Documentation

◆ asView()

std::tuple< GrSurfaceProxyView, GrColorType > SkImage_RasterPinnable::asView ( GrRecordingContext rContext,
skgpu::Mipmapped  mipmapped,
GrImageTexGenPolicy  policy 
) const

Definition at line 28 of file SkImage_RasterPinnable.cpp.

31 {
32 if (fPinnedData) {
33 // We ignore the mipmap request here. If the pinned view isn't mipmapped then we will
34 // fallback to bilinear. The pin API is used by Android Framework which does not expose
35 // mipmapping. Moreover, we're moving towards requiring that images be made with mip levels
36 // if mipmapping is desired (skbug.com/10411)
37 mipmapped = skgpu::Mipmapped::kNo;
38 if (policy != GrImageTexGenPolicy::kDraw) {
40 rContext,
41 fPinnedData->fPinnedView,
42 mipmapped,
43 policy,
44 /*label=*/"TextureForPinnableRasterImageWithPolicyNotEqualKDraw"),
45 fPinnedData->fPinnedColorType};
46 }
47 return {fPinnedData->fPinnedView, fPinnedData->fPinnedColorType};
48 }
49 return skgpu::ganesh::RasterAsView(rContext, this, mipmapped, policy);
50}
std::unique_ptr< PinnedData > fPinnedData
std::tuple< GrSurfaceProxyView, GrColorType > RasterAsView(GrRecordingContext *rContext, const SkImage_Raster *raster, skgpu::Mipmapped mipmapped, GrImageTexGenPolicy policy)
GrSurfaceProxyView CopyView(GrRecordingContext *context, GrSurfaceProxyView src, skgpu::Mipmapped mipmapped, GrImageTexGenPolicy policy, std::string_view label)

◆ type()

SkImage_Base::Type SkImage_RasterPinnable::type ( ) const
inlineoverridevirtual

Reimplemented from SkImage_Raster.

Definition at line 46 of file SkImage_RasterPinnable.h.

Member Data Documentation

◆ fPinnedData

std::unique_ptr<PinnedData> SkImage_RasterPinnable::fPinnedData

Definition at line 48 of file SkImage_RasterPinnable.h.


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