Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
SkYUVPlanesCache Class Reference

#include <SkYUVPlanesCache.h>

Static Public Member Functions

static SkCachedDataFindAndRef (uint32_t genID, SkYUVAPixmaps *pixmaps, SkResourceCache *localCache=nullptr)
 
static void Add (uint32_t genID, SkCachedData *data, const SkYUVAPixmaps &pixmaps, SkResourceCache *localCache=nullptr)
 

Detailed Description

Definition at line 19 of file SkYUVPlanesCache.h.

Member Function Documentation

◆ Add()

void SkYUVPlanesCache::Add ( uint32_t  genID,
SkCachedData data,
const SkYUVAPixmaps pixmaps,
SkResourceCache localCache = nullptr 
)
static

Add a pixelRef ID and its YUV planes data to the cache. The SkYUVAPixmaps should contain SkPixmaps that store their pixel data in the SkCachedData.

Definition at line 93 of file SkYUVPlanesCache.cpp.

94 {
95 YUVPlanesKey key(genID);
96 return CHECK_LOCAL(localCache, add, Add, new YUVPlanesRec(key, data, pixmaps));
97}
#define CHECK_LOCAL(localCache, localName, globalName,...)
static void Add(uint32_t genID, SkCachedData *data, const SkYUVAPixmaps &pixmaps, SkResourceCache *localCache=nullptr)

◆ FindAndRef()

SkCachedData * SkYUVPlanesCache::FindAndRef ( uint32_t  genID,
SkYUVAPixmaps pixmaps,
SkResourceCache localCache = nullptr 
)
static

On success, return a ref to the SkCachedData that holds the pixel data. The SkYUVAPixmaps contains a description of the YUVA data and has a SkPixmap for each plane that points into the SkCachedData.

On failure, return nullptr.

Definition at line 80 of file SkYUVPlanesCache.cpp.

82 {
83 YUVValue result;
84 YUVPlanesKey key(genID);
85 if (!CHECK_LOCAL(localCache, find, Find, key, YUVPlanesRec::Visitor, &result)) {
86 return nullptr;
87 }
88
89 *pixmaps = result.fPixmaps;
90 return result.fData;
91}
int find(T *array, int N, T item)
GAsyncResult * result

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