aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2014-11-12 11:13:39 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-11-12 11:13:39 -0800
commit69ed47f42d4877c178fdc0031cb01af2966ae235 (patch)
tree4e3101aa7db2206eaacfcf29f422d1e953f2cb0c /bench
parent703d3c7093f1fb8a40a46d465d9dd5ae60a456d5 (diff)
Make GrGpuResource::gpuMemorySize non-virtual w/ onGpuMemorySize virtual impl
Diffstat (limited to 'bench')
-rw-r--r--bench/GrResourceCacheBench.cpp16
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;
};