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" | |
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 Loading... |
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 } |
OLD | NEW |