Skia
2DGraphicsLibrary
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GrResourceKey Class Reference

Base class for all GrGpuResource cache keys. More...

#include <GrResourceKey.h>

Inheritance diagram for GrResourceKey:
GrScratchKey GrUniqueKey

Classes

class  Builder
 Used to initialize a key. More...
 

Public Member Functions

uint32_t hash () const
 
size_t size () const
 

Protected Member Functions

void reset ()
 Reset to an invalid key. More...
 
bool operator== (const GrResourceKey &that) const
 
GrResourceKeyoperator= (const GrResourceKey &that)
 
bool isValid () const
 
uint32_t domain () const
 
size_t dataSize () const
 size of the key data, excluding meta-data (hash, domain, etc). More...
 
const uint32_t * data () const
 ptr to the key data, excluding meta-data (hash, domain, etc). More...
 

Static Protected Attributes

static const uint32_t kInvalidDomain = 0
 

Private Types

enum  MetaDataIdx { kHash_MetaDataIdx, kDomainAndSize_MetaDataIdx, kLastMetaDataIdx = kDomainAndSize_MetaDataIdx }
 

Private Member Functions

size_t internalSize () const
 
void validate () const
 

Private Attributes

SkAutoSTMalloc< kMetaDataCnt+7,
uint32_t > 
fKey
 

Static Private Attributes

static const uint32_t kMetaDataCnt = kLastMetaDataIdx + 1
 

Friends

class TestResource
 

Detailed Description

Base class for all GrGpuResource cache keys.

There are two types of cache keys. Refer to the comments for each key type below.

Member Function Documentation

const uint32_t* GrResourceKey::data ( ) const
inlineprotected

ptr to the key data, excluding meta-data (hash, domain, etc).

size_t GrResourceKey::dataSize ( ) const
inlineprotected

size of the key data, excluding meta-data (hash, domain, etc).

void GrResourceKey::reset ( )
inlineprotected

Reset to an invalid key.


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