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

Side by Side Diff: src/gpu/GrTexture.cpp

Issue 716143004: Replace GrResourceCache with GrResourceCache2. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix asserts Created 6 years, 1 month 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/GrTest.cpp ('k') | src/gpu/SkGr.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 2011 Google Inc. 3 * Copyright 2011 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 #include "GrContext.h" 9 #include "GrContext.h"
10 #include "GrDrawTargetCaps.h" 10 #include "GrDrawTargetCaps.h"
11 #include "GrGpu.h" 11 #include "GrGpu.h"
12 #include "GrResourceCache.h"
13 #include "GrTexture.h" 12 #include "GrTexture.h"
14 #include "GrTexturePriv.h" 13 #include "GrTexturePriv.h"
15 14
16 void GrTexture::dirtyMipMaps(bool mipMapsDirty) { 15 void GrTexture::dirtyMipMaps(bool mipMapsDirty) {
17 if (mipMapsDirty) { 16 if (mipMapsDirty) {
18 if (kValid_MipMapsStatus == fMipMapsStatus) { 17 if (kValid_MipMapsStatus == fMipMapsStatus) {
19 fMipMapsStatus = kAllocated_MipMapsStatus; 18 fMipMapsStatus = kAllocated_MipMapsStatus;
20 } 19 }
21 } else { 20 } else {
22 const bool sizeChanged = kNotAllocated_MipMapsStatus == fMipMapsStatus; 21 const bool sizeChanged = kNotAllocated_MipMapsStatus == fMipMapsStatus;
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 return GrResourceKey(cacheID, ResourceType(), 0); 156 return GrResourceKey(cacheID, ResourceType(), 0);
158 } 157 }
159 158
160 bool GrTexturePriv::NeedsResizing(const GrResourceKey& key) { 159 bool GrTexturePriv::NeedsResizing(const GrResourceKey& key) {
161 return SkToBool(key.getResourceFlags() & kStretchToPOT_TextureFlag); 160 return SkToBool(key.getResourceFlags() & kStretchToPOT_TextureFlag);
162 } 161 }
163 162
164 bool GrTexturePriv::NeedsBilerp(const GrResourceKey& key) { 163 bool GrTexturePriv::NeedsBilerp(const GrResourceKey& key) {
165 return SkToBool(key.getResourceFlags() & kBilerp_TextureFlag); 164 return SkToBool(key.getResourceFlags() & kBilerp_TextureFlag);
166 } 165 }
OLDNEW
« no previous file with comments | « src/gpu/GrTest.cpp ('k') | src/gpu/SkGr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698