| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "GrTextureProvider.h" | 8 #include "GrTextureProvider.h" |
| 9 |
| 10 #include "GrCaps.h" |
| 9 #include "GrTexturePriv.h" | 11 #include "GrTexturePriv.h" |
| 10 #include "GrResourceCache.h" | 12 #include "GrResourceCache.h" |
| 11 #include "GrGpu.h" | 13 #include "GrGpu.h" |
| 12 #include "../private/GrSingleOwner.h" | 14 #include "../private/GrSingleOwner.h" |
| 13 #include "SkMathPriv.h" | 15 #include "SkMathPriv.h" |
| 14 #include "SkTArray.h" | 16 #include "SkTArray.h" |
| 15 | 17 |
| 16 #define ASSERT_SINGLE_OWNER \ | 18 #define ASSERT_SINGLE_OWNER \ |
| 17 SkDEBUGCODE(GrSingleOwner::AutoEnforce debug_SingleOwner(fSingleOwner);) | 19 SkDEBUGCODE(GrSingleOwner::AutoEnforce debug_SingleOwner(fSingleOwner);) |
| 18 | 20 |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 GrTexture* GrTextureProvider::findAndRefTextureByUniqueKey(const GrUniqueKey& ke
y) { | 194 GrTexture* GrTextureProvider::findAndRefTextureByUniqueKey(const GrUniqueKey& ke
y) { |
| 193 ASSERT_SINGLE_OWNER | 195 ASSERT_SINGLE_OWNER |
| 194 GrGpuResource* resource = this->findAndRefResourceByUniqueKey(key); | 196 GrGpuResource* resource = this->findAndRefResourceByUniqueKey(key); |
| 195 if (resource) { | 197 if (resource) { |
| 196 GrTexture* texture = static_cast<GrSurface*>(resource)->asTexture(); | 198 GrTexture* texture = static_cast<GrSurface*>(resource)->asTexture(); |
| 197 SkASSERT(texture); | 199 SkASSERT(texture); |
| 198 return texture; | 200 return texture; |
| 199 } | 201 } |
| 200 return NULL; | 202 return NULL; |
| 201 } | 203 } |
| OLD | NEW |