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 "SkBitmap.h" | 8 #include "SkBitmap.h" |
9 #include "SkBitmapCache.h" | 9 #include "SkBitmapCache.h" |
10 #include "SkImage_Base.h" | 10 #include "SkImage_Base.h" |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 SK_HISTOGRAM_ENUMERATION("LockTexturePath", kNative_LockTexturePath, | 281 SK_HISTOGRAM_ENUMERATION("LockTexturePath", kNative_LockTexturePath, |
282 kLockTexturePathCount); | 282 kLockTexturePathCount); |
283 return set_key_and_return(tex, key); | 283 return set_key_and_return(tex, key); |
284 } | 284 } |
285 } | 285 } |
286 | 286 |
287 const GrSurfaceDesc desc = GrImageInfoToSurfaceDesc(fInfo, *ctx->caps()); | 287 const GrSurfaceDesc desc = GrImageInfoToSurfaceDesc(fInfo, *ctx->caps()); |
288 | 288 |
289 #ifdef SK_SUPPORT_COMPRESSED_TEXTURES_IN_CACHERATOR | 289 #ifdef SK_SUPPORT_COMPRESSED_TEXTURES_IN_CACHERATOR |
290 // 3. Ask the generator to return a compressed form that the GPU might suppo
rt | 290 // 3. Ask the generator to return a compressed form that the GPU might suppo
rt |
291 SkAutoTUnref<SkData> data(this->refEncoded(ctx)); | 291 sk_sp<SkData> data(this->refEncoded(ctx)); |
292 if (data) { | 292 if (data) { |
293 GrTexture* tex = load_compressed_into_texture(ctx, data, desc); | 293 GrTexture* tex = load_compressed_into_texture(ctx, data, desc); |
294 if (tex) { | 294 if (tex) { |
295 SK_HISTOGRAM_ENUMERATION("LockTexturePath", kCompressed_LockTextureP
ath, | 295 SK_HISTOGRAM_ENUMERATION("LockTexturePath", kCompressed_LockTextureP
ath, |
296 kLockTexturePathCount); | 296 kLockTexturePathCount); |
297 return set_key_and_return(tex, key); | 297 return set_key_and_return(tex, key); |
298 } | 298 } |
299 } | 299 } |
300 #endif | 300 #endif |
301 | 301 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 | 347 |
348 #else | 348 #else |
349 | 349 |
350 GrTexture* SkImageCacherator::lockAsTexture(GrContext* ctx, const GrTextureParam
s&, | 350 GrTexture* SkImageCacherator::lockAsTexture(GrContext* ctx, const GrTextureParam
s&, |
351 SkSourceGammaTreatment gammaTreatmen
t, | 351 SkSourceGammaTreatment gammaTreatmen
t, |
352 const SkImage* client, SkImage::Cach
ingHint) { | 352 const SkImage* client, SkImage::Cach
ingHint) { |
353 return nullptr; | 353 return nullptr; |
354 } | 354 } |
355 | 355 |
356 #endif | 356 #endif |
OLD | NEW |