Flutter Engine
The Flutter Engine
Public Member Functions | Protected Member Functions | List of all members
GrContextOptions::PersistentCache Class Referenceabstract

#include <GrContextOptions.h>

Inheritance diagram for GrContextOptions::PersistentCache:
flutter::PersistentCache sk_gpu_test::MemoryCache

Public Member Functions

virtual ~PersistentCache ()=default
 
virtual sk_sp< SkDataload (const SkData &key)=0
 
virtual void store (const SkData &, const SkData &)
 
virtual void store (const SkData &key, const SkData &data, const SkString &)
 

Protected Member Functions

 PersistentCache ()=default
 
 PersistentCache (const PersistentCache &)=delete
 
PersistentCacheoperator= (const PersistentCache &)=delete
 

Detailed Description

Abstract class which stores Skia data in a cache that persists between sessions. Currently, Skia stores compiled shader binaries (only when glProgramBinary / glGetProgramBinary are supported) when provided a persistent cache, but this may extend to other data in the future.

Definition at line 46 of file GrContextOptions.h.

Constructor & Destructor Documentation

◆ ~PersistentCache()

virtual GrContextOptions::PersistentCache::~PersistentCache ( )
virtualdefault

Reimplemented in flutter::PersistentCache.

◆ PersistentCache() [1/2]

GrContextOptions::PersistentCache::PersistentCache ( )
protecteddefault

◆ PersistentCache() [2/2]

GrContextOptions::PersistentCache::PersistentCache ( const PersistentCache )
protecteddelete

Member Function Documentation

◆ load()

virtual sk_sp< SkData > GrContextOptions::PersistentCache::load ( const SkData key)
pure virtual

Returns the data for the key if it exists in the cache, otherwise returns null.

Implemented in flutter::PersistentCache, and sk_gpu_test::MemoryCache.

◆ operator=()

PersistentCache & GrContextOptions::PersistentCache::operator= ( const PersistentCache )
protecteddelete

◆ store() [1/2]

virtual void GrContextOptions::PersistentCache::store ( const SkData ,
const SkData  
)
inlinevirtual

Definition at line 57 of file GrContextOptions.h.

57{ SkASSERT(false); }
#define SkASSERT(cond)
Definition: SkAssert.h:116

◆ store() [2/2]

virtual void GrContextOptions::PersistentCache::store ( const SkData key,
const SkData data,
const SkString  
)
inlinevirtual

Stores data in the cache, indexed by key. description provides a human-readable version of the key.

Reimplemented in sk_gpu_test::MemoryCache.

Definition at line 63 of file GrContextOptions.h.

63 {
64 this->store(key, data);
65 }
virtual void store(const SkData &, const SkData &)
std::shared_ptr< const fml::Mapping > data
Definition: texture_gles.cc:63

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