| 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 | 9 |
| 10 #include "GrTexture.h" | 10 #include "GrTexture.h" |
| 11 | 11 |
| 12 #include "GrContext.h" | 12 #include "GrContext.h" |
| 13 #include "GrDrawTargetCaps.h" |
| 13 #include "GrGpu.h" | 14 #include "GrGpu.h" |
| 14 #include "GrRenderTarget.h" | 15 #include "GrRenderTarget.h" |
| 15 #include "GrResourceCache.h" | 16 #include "GrResourceCache.h" |
| 16 | 17 |
| 17 SK_DEFINE_INST_COUNT(GrTexture) | 18 SK_DEFINE_INST_COUNT(GrTexture) |
| 18 | 19 |
| 19 /** | 20 /** |
| 20 * This method allows us to interrupt the normal deletion process and place | 21 * This method allows us to interrupt the normal deletion process and place |
| 21 * textures back in the texture cache when their ref count goes to zero. | 22 * textures back in the texture cache when their ref count goes to zero. |
| 22 */ | 23 */ |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 return GrResourceKey(cacheID, texture_resource_type(), 0); | 194 return GrResourceKey(cacheID, texture_resource_type(), 0); |
| 194 } | 195 } |
| 195 | 196 |
| 196 bool GrTexture::NeedsResizing(const GrResourceKey& key) { | 197 bool GrTexture::NeedsResizing(const GrResourceKey& key) { |
| 197 return SkToBool(key.getResourceFlags() & kStretchToPOT_TextureFlag); | 198 return SkToBool(key.getResourceFlags() & kStretchToPOT_TextureFlag); |
| 198 } | 199 } |
| 199 | 200 |
| 200 bool GrTexture::NeedsFiltering(const GrResourceKey& key) { | 201 bool GrTexture::NeedsFiltering(const GrResourceKey& key) { |
| 201 return SkToBool(key.getResourceFlags() & kFilter_TextureFlag); | 202 return SkToBool(key.getResourceFlags() & kFilter_TextureFlag); |
| 202 } | 203 } |
| OLD | NEW |