Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: src/core/SkImageCacherator.cpp

Issue 2212493002: Convert SkAutoTUnref<SkData> to sk_sp<SkData>. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/codec/SkCodecImageGenerator.h ('k') | src/core/SkPictureRecord.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/codec/SkCodecImageGenerator.h ('k') | src/core/SkPictureRecord.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698