12static void* gGlobalAddress;
18 this->
init(&gGlobalAddress, 0,
sizeof(fValue));
27 const Key&
getKey()
const override {
return fKey; }
28 size_t bytesUsed()
const override {
return sizeof(fKey) +
sizeof(fValue); }
29 const char*
getCategory()
const override {
return "imagecachebench-test"; }
48 for (
int i = 0;
i < CACHE_COUNT; ++
i) {
49 fCache.
add(
new TestRec(TestKey(
i),
i));
65 for (
int i = 0;
i < loops; ++
i) {
SkDEBUGCODE(SK_SPI) SkThreadID SkGetThreadID()
const char * onGetName() override
void onDraw(int loops, SkCanvas *) override
size_t getTotalBytesUsed() const
bool find(const Key &, FindVisitor, void *context)
void(* Visitor)(const Rec &, void *context)
void add(Rec *, void *payload=nullptr)
Visitor(Ts...) -> Visitor< Ts... >
void init(void *nameSpace, uint64_t sharedID, size_t dataSize)
virtual const char * getCategory() const =0
virtual SkDiscardableMemory * diagnostic_only_getDiscardable() const
virtual size_t bytesUsed() const =0
virtual const Key & getKey() const =0
TestKey(int sharedID, int32_t data)
TestRec(int sharedID, int32_t data, int *flagPtr)