Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(262)

Unified Diff: src/gpu/GrResourceCache.cpp

Issue 1694943002: When a surface is backed by an external render target force a copy on image snap (Closed) Base URL: https://skia.googlesource.com/skia.git@imgcopy
Patch Set: test git config branch.nollvm.skip-deps-uploads True Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrResourceCache.h ('k') | src/image/SkSurface_Gpu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrResourceCache.cpp
diff --git a/src/gpu/GrResourceCache.cpp b/src/gpu/GrResourceCache.cpp
index 005b6c4ccd24177c5630d7bd198a43340262cd81..087e762592144f47f110d39ee1340659e0a2b489 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());
}
« no previous file with comments | « src/gpu/GrResourceCache.h ('k') | src/image/SkSurface_Gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698