Remove GR_DUMP_TEXTURE_UPLOADS
authorbsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Thu, 7 Feb 2013 20:21:39 +0000 (20:21 +0000)
committerbsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Thu, 7 Feb 2013 20:21:39 +0000 (20:21 +0000)
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/7300062

git-svn-id: http://skia.googlecode.com/svn/trunk@7652 2bbb7eff-a529-9590-31e7-b0007b416f81

include/gpu/GrConfig.h
include/gpu/GrUserConfig.h
src/gpu/GrContext.cpp
src/gpu/GrResourceCache.cpp

index 0a187a0fb802a6499624a2b6fe1144ab40f84db1..14ce5c75abaef7aa5657c78345157eb17d09f1cd 100644 (file)
@@ -325,10 +325,6 @@ inline void GrCrash(const char* msg) { GrPrintf(msg); GrAlwaysAssert(false); }
     #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.
index d314910c61f99ec1b19454e081d0f77fd38fda35..18939c99a973e12667e5c6d8054fa3fa5ce471c1 100644 (file)
     #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.
index c9d6f65887ff0feea5a4f50c57e8c7fa882d8183..2549576c8764008d86fc8bd789bec10746e01011 100644 (file)
@@ -351,10 +351,6 @@ GrTexture* GrContext::createTexture(const GrTextureParams* params,
                                     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;
index 45b999f3d0110bab643a2b9548a668c6ed532ee4..fa4edadfe9c9eb0b4ada128d2a86f9a1bc1c5921 100644 (file)
@@ -214,11 +214,6 @@ void GrResourceCache::addResource(const GrResourceKey& key,
     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);
     }
@@ -315,14 +310,6 @@ void GrResourceCache::purgeAsNeeded() {
 
                     // 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;