OLD | NEW |
1 | |
2 /* | 1 /* |
3 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
4 * | 3 * |
5 * 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 |
6 * found in the LICENSE file. | 5 * found in the LICENSE file. |
7 */ | 6 */ |
8 | 7 |
9 #include "GrTextureProvider.h" | 8 #include "GrTextureProvider.h" |
10 #include "GrTexturePriv.h" | 9 #include "GrTexturePriv.h" |
11 #include "GrResourceCache.h" | 10 #include "GrResourceCache.h" |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 GrTexture* GrTextureProvider::findAndRefTextureByUniqueKey(const GrUniqueKey& ke
y) { | 158 GrTexture* GrTextureProvider::findAndRefTextureByUniqueKey(const GrUniqueKey& ke
y) { |
160 ASSERT_SINGLE_OWNER | 159 ASSERT_SINGLE_OWNER |
161 GrGpuResource* resource = this->findAndRefResourceByUniqueKey(key); | 160 GrGpuResource* resource = this->findAndRefResourceByUniqueKey(key); |
162 if (resource) { | 161 if (resource) { |
163 GrTexture* texture = static_cast<GrSurface*>(resource)->asTexture(); | 162 GrTexture* texture = static_cast<GrSurface*>(resource)->asTexture(); |
164 SkASSERT(texture); | 163 SkASSERT(texture); |
165 return texture; | 164 return texture; |
166 } | 165 } |
167 return NULL; | 166 return NULL; |
168 } | 167 } |
OLD | NEW |