diff options
author | 2018-03-29 13:40:02 -0400 | |
---|---|---|
committer | 2018-03-29 18:08:15 +0000 | |
commit | cf6da8c0f29877249a55949efd8b952b5b9bc01d (patch) | |
tree | 9f4bcd3033dd85d378da916e7f45ab583524c595 /include/gpu/GrResourceKey.h | |
parent | 9c6f6a52764281f6c61c2daf21f4737df5df53c7 (diff) |
Dump additional details about the gpu resources.
GpuResources now dump optional string values that describe the type and
category of the resource. The type provides a description of the kind
of resource it is (e.g. texture, buffer object, stencil, etc.) and the
category describes what the resource is currently tasked to do (e.g.
path masks, images, scratch, etc.)
This CL also refactors the dump logic in an attempt to consolidate
duplicated code into GrGpuResources.cpp.
Bug: b/74435803
Change-Id: I83cae825f41e6450a21398ab3ecea349c7c61c15
Reviewed-on: https://skia-review.googlesource.com/115989
Commit-Queue: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'include/gpu/GrResourceKey.h')
-rw-r--r-- | include/gpu/GrResourceKey.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/include/gpu/GrResourceKey.h b/include/gpu/GrResourceKey.h index c0a08f8add..ef319ad1fa 100644 --- a/include/gpu/GrResourceKey.h +++ b/include/gpu/GrResourceKey.h @@ -241,7 +241,7 @@ public: GrUniqueKey& operator=(const GrUniqueKey& that) { this->INHERITED::operator=(that); this->setCustomData(sk_ref_sp(that.getCustomData())); - SkDEBUGCODE(fTag = that.fTag;) + fTag = that.fTag; return *this; } @@ -257,14 +257,13 @@ public: return fData.get(); } - SkDEBUGCODE(const char* tag() const { return fTag.c_str(); }) + const char* tag() const { return fTag; } class Builder : public INHERITED::Builder { public: Builder(GrUniqueKey* key, Domain type, int data32Count, const char* tag = nullptr) : INHERITED::Builder(key, type, data32Count) { - SkDEBUGCODE(key->fTag = tag;) - (void) tag; // suppress unused named param warning. + key->fTag = tag; } /** Used to build a key that wraps another key and adds additional data. */ @@ -277,8 +276,7 @@ public: const uint32_t* srcData = innerKey.data(); (*innerKeyData++) = innerKey.domain(); memcpy(innerKeyData, srcData, innerKey.dataSize()); - SkDEBUGCODE(key->fTag = tag;) - (void) tag; // suppress unused named param warning. + key->fTag = tag; } private: @@ -290,7 +288,7 @@ public: private: sk_sp<SkData> fData; - SkDEBUGCODE(SkString fTag;) + const char* fTag; }; /** |