aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/SkGrPixelRef.cpp
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-02 21:38:22 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-02 21:38:22 +0000
commit089a780c3355129eefc942246534bc1f126b8ccb (patch)
tree717d71a73ad4ce8d8810cf8344d67c6ddb143507 /src/gpu/SkGrPixelRef.cpp
parent40f6e3a25c0d35b9416346b72f1b6ba07778d173 (diff)
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@14553 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/SkGrPixelRef.cpp')
-rw-r--r--src/gpu/SkGrPixelRef.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gpu/SkGrPixelRef.cpp b/src/gpu/SkGrPixelRef.cpp
index 18fefcc789..fd21f1073b 100644
--- a/src/gpu/SkGrPixelRef.cpp
+++ b/src/gpu/SkGrPixelRef.cpp
@@ -167,7 +167,7 @@ SkPixelRef* SkGrPixelRef::deepCopy(SkBitmap::Config dstConfig, const SkIRect* su
}
bool SkGrPixelRef::onReadPixels(SkBitmap* dst, const SkIRect* subset) {
- if (NULL == fSurface || !fSurface->isValid()) {
+ if (NULL == fSurface || fSurface->wasDestroyed()) {
return false;
}