aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrResourceCache.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2016-02-26 10:37:26 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-02-26 10:37:26 -0800
commitb2c0133caf0f03462385c19634281c351355c979 (patch)
treef5a3bbbe93fbfa0d7f72dc93d9fe0865220139c8 /src/gpu/GrResourceCache.cpp
parent992ad363d7ca879cdb86f802b379f06800a44125 (diff)
When a surface is backed by an external render target force a copy on image snap
Diffstat (limited to 'src/gpu/GrResourceCache.cpp')
-rw-r--r--src/gpu/GrResourceCache.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gpu/GrResourceCache.cpp b/src/gpu/GrResourceCache.cpp
index 005b6c4ccd..087e762592 100644
--- a/src/gpu/GrResourceCache.cpp
+++ b/src/gpu/GrResourceCache.cpp
@@ -147,7 +147,7 @@ void GrResourceCache::insertResource(GrGpuResource* resource) {
#endif
}
if (resource->resourcePriv().getScratchKey().isValid()) {
- SkASSERT(!resource->cacheAccess().isExternal());
+ SkASSERT(!resource->resourcePriv().isExternal());
fScratchMap.insert(resource->resourcePriv().getScratchKey(), resource);
}
@@ -377,7 +377,7 @@ void GrResourceCache::notifyCntReachedZero(GrGpuResource* resource, uint32_t fla
if (SkBudgeted::kNo == resource->resourcePriv().isBudgeted()) {
// Check whether this resource could still be used as a scratch resource.
- if (!resource->cacheAccess().isExternal() &&
+ if (!resource->resourcePriv().isExternal() &&
resource->resourcePriv().getScratchKey().isValid()) {
// We won't purge an existing resource to make room for this one.
if (fBudgetedCount < fMaxCount &&
@@ -662,19 +662,19 @@ void GrResourceCache::validate() const {
SkASSERT(!resource->getUniqueKey().isValid());
++fScratch;
SkASSERT(fScratchMap->countForKey(resource->resourcePriv().getScratchKey()));
- SkASSERT(!resource->cacheAccess().isExternal());
+ SkASSERT(!resource->resourcePriv().isExternal());
} else if (resource->resourcePriv().getScratchKey().isValid()) {
SkASSERT(SkBudgeted::kNo == resource->resourcePriv().isBudgeted() ||
resource->getUniqueKey().isValid());
++fCouldBeScratch;
SkASSERT(fScratchMap->countForKey(resource->resourcePriv().getScratchKey()));
- SkASSERT(!resource->cacheAccess().isExternal());
+ SkASSERT(!resource->resourcePriv().isExternal());
}
const GrUniqueKey& uniqueKey = resource->getUniqueKey();
if (uniqueKey.isValid()) {
++fContent;
SkASSERT(fUniqueHash->find(uniqueKey) == resource);
- SkASSERT(!resource->cacheAccess().isExternal());
+ SkASSERT(!resource->resourcePriv().isExternal());
SkASSERT(SkBudgeted::kYes == resource->resourcePriv().isBudgeted());
}