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

Side by Side Diff: src/gpu/GrResourceCache.h

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 unified diff | Download patch
« no previous file with comments | « src/gpu/GrGpuResourcePriv.h ('k') | src/gpu/GrResourceCache.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2014 Google Inc. 3 * Copyright 2014 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #ifndef GrResourceCache_DEFINED 9 #ifndef GrResourceCache_DEFINED
10 #define GrResourceCache_DEFINED 10 #define GrResourceCache_DEFINED
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 fExternal = 0; 204 fExternal = 0;
205 fBorrowed = 0; 205 fBorrowed = 0;
206 fAdopted = 0; 206 fAdopted = 0;
207 fUnbudgetedSize = 0; 207 fUnbudgetedSize = 0;
208 } 208 }
209 209
210 void update(GrGpuResource* resource) { 210 void update(GrGpuResource* resource) {
211 if (resource->cacheAccess().isScratch()) { 211 if (resource->cacheAccess().isScratch()) {
212 ++fScratch; 212 ++fScratch;
213 } 213 }
214 if (resource->cacheAccess().isExternal()) { 214 if (resource->resourcePriv().isExternal()) {
215 ++fExternal; 215 ++fExternal;
216 } 216 }
217 if (resource->cacheAccess().isBorrowed()) { 217 if (resource->cacheAccess().isBorrowed()) {
218 ++fBorrowed; 218 ++fBorrowed;
219 } 219 }
220 if (resource->cacheAccess().isAdopted()) { 220 if (resource->cacheAccess().isAdopted()) {
221 ++fAdopted; 221 ++fAdopted;
222 } 222 }
223 if (SkBudgeted::kNo == resource->resourcePriv().isBudgeted()) { 223 if (SkBudgeted::kNo == resource->resourcePriv().isBudgeted()) {
224 fUnbudgetedSize += resource->gpuMemorySize(); 224 fUnbudgetedSize += resource->gpuMemorySize();
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 431
432 friend class GrGpuResource; // To access all the proxy inline methods. 432 friend class GrGpuResource; // To access all the proxy inline methods.
433 friend class GrResourceCache; // To create this type. 433 friend class GrResourceCache; // To create this type.
434 }; 434 };
435 435
436 inline GrResourceCache::ResourceAccess GrResourceCache::resourceAccess() { 436 inline GrResourceCache::ResourceAccess GrResourceCache::resourceAccess() {
437 return ResourceAccess(this); 437 return ResourceAccess(this);
438 } 438 }
439 439
440 #endif 440 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrGpuResourcePriv.h ('k') | src/gpu/GrResourceCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698