diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-05-02 21:38:22 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-05-02 21:38:22 +0000 |
commit | a519ef7a6ea47b7b200a81f5205b77fea69a88e8 (patch) | |
tree | e56ce512f31ae1063952e8dcd1a4f5e21b13838b /gpu/GrRenderTarget.cpp | |
parent | a97ef5e8a2b07b735120d041de8e4612dfe59185 (diff) | |
download | src-a519ef7a6ea47b7b200a81f5205b77fea69a88e8.tar.gz |
Split GrResource into GrCacheable/GrGpuObject
Before this change, an object needed to inherit from GrResource (and
thus be a GPU object) in order to live in the GrResourceCache. That
was a problem for caching items that weren't GPU objects themselves,
but owned GPU objects.
This change splits GrResource into two classes:
1. GrCacheable: The base class for objects that can live in the
GrResourceCache.
2. GrGpuObject, which inherits from GrCacheable: The base class for
objects that get tracked by GrGpu.
This change is purely a refactor; there is no change in functionality.
Change-Id: I3e8daeb1f123041f414aa306c1366e959ae9e39e
BUG=skia:
R=bsalomon@google.com
Author: cdalton@nvidia.com
Review URL: https://codereview.chromium.org/251013002
git-svn-id: http://skia.googlecode.com/svn/trunk/src@14553 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gpu/GrRenderTarget.cpp')
-rw-r--r-- | gpu/GrRenderTarget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gpu/GrRenderTarget.cpp b/gpu/GrRenderTarget.cpp index 9348dc16..13fc2290 100644 --- a/gpu/GrRenderTarget.cpp +++ b/gpu/GrRenderTarget.cpp @@ -63,7 +63,7 @@ void GrRenderTarget::discard() { context->discardRenderTarget(this); } -size_t GrRenderTarget::sizeInBytes() const { +size_t GrRenderTarget::gpuMemorySize() const { size_t colorBits; if (kUnknown_GrPixelConfig == fDesc.fConfig) { colorBits = 32; // don't know, make a guess |