#define GR_TEXT_SCALAR_TYPE_IS_FIXED 0
#endif
-#ifndef GR_DUMP_TEXTURE_UPLOAD
- #define GR_DUMP_TEXTURE_UPLOAD 0
-#endif
-
/**
* GR_DISABLE_DRAW_BUFFERING prevents GrContext from queueing draws in a
* GrInOrderDrawBuffer.
#define GR_DEBUG 1
#endif
-/*
- * To diagnose texture cache performance, define this to 1 if you want to see
- * a log statement everytime we upload an image to create a texture.
- */
-//#define GR_DUMP_TEXTURE_UPLOAD 1
-
/*
* This causes the GrContext to execute all draws immediately in the 3D API
* rather than internally queuing draws.
size_t rowBytes) {
SK_TRACE_EVENT0("GrContext::createTexture");
-#if GR_DUMP_TEXTURE_UPLOAD
- GrPrintf("GrContext::createTexture[%d %d]\n", desc.fWidth, desc.fHeight);
-#endif
-
GrResourceKey resourceKey = GrTexture::ComputeKey(fGpu, params, desc, cacheID);
GrTexture* texture;
this->attachToHead(entry);
fCache.insert(key, entry);
-#if GR_DUMP_TEXTURE_UPLOAD
- GrPrintf("--- add resource to cache %p, count=%d bytes= %d %d\n",
- entry, fEntryCount, resource->sizeInBytes(), fEntryBytes);
-#endif
-
if (ownershipFlags & kHide_OwnershipFlag) {
this->makeExclusive(entry);
}
// remove from our llist
this->internalDetach(entry);
-
- #if GR_DUMP_TEXTURE_UPLOAD
- GrPrintf("--- ~resource from cache %p [%d %d]\n",
- entry->resource(),
- entry->resource()->width(),
- entry->resource()->height());
- #endif
-
delete entry;
}
entry = prev;