Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Member Functions | List of all members
GrAHardwareBufferImageGenerator Class Reference

#include <GrAHardwareBufferImageGenerator.h>

Inheritance diagram for GrAHardwareBufferImageGenerator:
GrTextureGenerator SkImageGenerator

Public Member Functions

 ~GrAHardwareBufferImageGenerator () override
 
- Public Member Functions inherited from GrTextureGenerator
bool isTextureGenerator () const final
 
GrSurfaceProxyView generateTexture (GrRecordingContext *, const SkImageInfo &info, skgpu::Mipmapped mipmapped, GrImageTexGenPolicy)
 
virtual GrSurfaceProxyView onGenerateTexture (GrRecordingContext *, const SkImageInfo &, skgpu::Mipmapped, GrImageTexGenPolicy)=0
 
virtual GrSurfaceOrigin origin () const
 
- Public Member Functions inherited from SkImageGenerator
virtual ~SkImageGenerator ()
 
uint32_t uniqueID () const
 
sk_sp< SkDatarefEncodedData ()
 
const SkImageInfogetInfo () const
 
bool isValid (GrRecordingContext *context) const
 
bool isProtected () const
 
bool getPixels (const SkImageInfo &info, void *pixels, size_t rowBytes)
 
bool getPixels (const SkPixmap &pm)
 
bool queryYUVAInfo (const SkYUVAPixmapInfo::SupportedDataTypes &supportedDataTypes, SkYUVAPixmapInfo *yuvaPixmapInfo) const
 
bool getYUVAPlanes (const SkYUVAPixmaps &yuvaPixmaps)
 
virtual bool isTextureGenerator () const
 

Static Public Member Functions

static std::unique_ptr< SkImageGeneratorMake (AHardwareBuffer *, SkAlphaType, sk_sp< SkColorSpace >, GrSurfaceOrigin)
 
static void DeleteGLTexture (void *ctx)
 

Additional Inherited Members

- Protected Member Functions inherited from GrTextureGenerator
 GrTextureGenerator (const SkImageInfo &info, uint32_t uniqueId=kNeedNewImageUniqueID)
 
- Protected Member Functions inherited from SkImageGenerator
 SkImageGenerator (const SkImageInfo &info, uint32_t uniqueId=kNeedNewImageUniqueID)
 
virtual sk_sp< SkDataonRefEncodedData ()
 
virtual bool onGetPixels (const SkImageInfo &, void *, size_t, const Options &)
 
virtual bool onIsValid (GrRecordingContext *) const
 
virtual bool onIsProtected () const
 
virtual bool onQueryYUVAInfo (const SkYUVAPixmapInfo::SupportedDataTypes &, SkYUVAPixmapInfo *) const
 
virtual bool onGetYUVAPlanes (const SkYUVAPixmaps &)
 
- Protected Attributes inherited from SkImageGenerator
const SkImageInfo fInfo
 
- Static Protected Attributes inherited from SkImageGenerator
static constexpr int kNeedNewImageUniqueID = 0
 

Detailed Description

GrAHardwareBufferImageGenerator allows to create an SkImage attached to an existing android native hardware buffer. A hardware buffer has to be created with AHARDWAREBUFFER_USAGE_GPU_SAMPLED_IMAGE usage, because it is bound to an external texture using an EGLImage. The image generator will keep a reference to the hardware buffer for its lifetime. A hardware buffer can be shared between processes and same buffer can be used in multiple GPU contexts. To implement certain features like tiling, Skia may copy the texture to avoid OpenGL API limitations.

Definition at line 31 of file GrAHardwareBufferImageGenerator.h.

Constructor & Destructor Documentation

◆ ~GrAHardwareBufferImageGenerator()

GrAHardwareBufferImageGenerator::~GrAHardwareBufferImageGenerator ( )
override

Member Function Documentation

◆ DeleteGLTexture()

static void GrAHardwareBufferImageGenerator::DeleteGLTexture ( void *  ctx)
static

◆ Make()

static std::unique_ptr< SkImageGenerator > GrAHardwareBufferImageGenerator::Make ( AHardwareBuffer ,
SkAlphaType  ,
sk_sp< SkColorSpace ,
GrSurfaceOrigin   
)
static

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