OLD | NEW |
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" |
12 #include "GrTexture.h" | 13 #include "GrTexture.h" |
13 #include "GrTexturePriv.h" | 14 #include "GrTexturePriv.h" |
14 | 15 |
15 void GrTexture::dirtyMipMaps(bool mipMapsDirty) { | 16 void GrTexture::dirtyMipMaps(bool mipMapsDirty) { |
16 if (mipMapsDirty) { | 17 if (mipMapsDirty) { |
17 if (kValid_MipMapsStatus == fMipMapsStatus) { | 18 if (kValid_MipMapsStatus == fMipMapsStatus) { |
18 fMipMapsStatus = kAllocated_MipMapsStatus; | 19 fMipMapsStatus = kAllocated_MipMapsStatus; |
19 } | 20 } |
20 } else { | 21 } else { |
21 const bool sizeChanged = kNotAllocated_MipMapsStatus == fMipMapsStatus; | 22 const bool sizeChanged = kNotAllocated_MipMapsStatus == fMipMapsStatus; |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 return GrResourceKey(cacheID, ResourceType(), 0); | 157 return GrResourceKey(cacheID, ResourceType(), 0); |
157 } | 158 } |
158 | 159 |
159 bool GrTexturePriv::NeedsResizing(const GrResourceKey& key) { | 160 bool GrTexturePriv::NeedsResizing(const GrResourceKey& key) { |
160 return SkToBool(key.getResourceFlags() & kStretchToPOT_TextureFlag); | 161 return SkToBool(key.getResourceFlags() & kStretchToPOT_TextureFlag); |
161 } | 162 } |
162 | 163 |
163 bool GrTexturePriv::NeedsBilerp(const GrResourceKey& key) { | 164 bool GrTexturePriv::NeedsBilerp(const GrResourceKey& key) { |
164 return SkToBool(key.getResourceFlags() & kBilerp_TextureFlag); | 165 return SkToBool(key.getResourceFlags() & kBilerp_TextureFlag); |
165 } | 166 } |
OLD | NEW |