diff options
author | bsalomon <bsalomon@google.com> | 2014-11-12 11:13:39 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-12 11:13:39 -0800 |
commit | 69ed47f42d4877c178fdc0031cb01af2966ae235 (patch) | |
tree | 4e3101aa7db2206eaacfcf29f422d1e953f2cb0c /bench | |
parent | 703d3c7093f1fb8a40a46d465d9dd5ae60a456d5 (diff) |
Make GrGpuResource::gpuMemorySize non-virtual w/ onGpuMemorySize virtual impl
BUG=skia:2889
Review URL: https://codereview.chromium.org/702413003
Diffstat (limited to 'bench')
-rw-r--r-- | bench/GrResourceCacheBench.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/bench/GrResourceCacheBench.cpp b/bench/GrResourceCacheBench.cpp index 91c77fb589..6d631ddb2c 100644 --- a/bench/GrResourceCacheBench.cpp +++ b/bench/GrResourceCacheBench.cpp @@ -36,10 +36,6 @@ public: virtual ~StencilResource() { this->release(); } - virtual size_t gpuMemorySize() const SK_OVERRIDE { - return 100 + ((fID % 1 == 0) ? -5 : 6); - } - static GrResourceKey ComputeKey(int width, int height, int sampleCnt) { return GrStencilBuffer::ComputeKey(width, height, sampleCnt); } @@ -47,6 +43,10 @@ public: int fID; private: + virtual size_t onGpuMemorySize() const SK_OVERRIDE { + return 100 + ((fID % 1 == 0) ? -5 : 6); + } + typedef GrGpuResource INHERITED; }; @@ -61,10 +61,6 @@ public: virtual ~TextureResource() { this->release(); } - virtual size_t gpuMemorySize() const SK_OVERRIDE { - return 100 + ((fID % 1 == 0) ? -40 : 33); - } - static GrResourceKey ComputeKey(const GrSurfaceDesc& desc) { GrCacheID::Key key; memset(&key, 0, sizeof(key)); @@ -79,6 +75,10 @@ public: int fID; private: + virtual size_t onGpuMemorySize() const SK_OVERRIDE { + return 100 + ((fID % 1 == 0) ? -40 : 33); + } + typedef GrGpuResource INHERITED; }; |