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

Unified Diff: src/gpu/SkGr.cpp

Issue 2175873002: remove/deprecate SkBitmap::getTexture, as it now always returns false (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: kill AutoBitmapTexture Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: src/gpu/SkGr.cpp
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp
index 452218f517b97d5440c6eb967d2f9a22aeda9782..ce484699d7d71181573307ad339fefa74b8ce9b4 100644
--- a/src/gpu/SkGr.cpp
+++ b/src/gpu/SkGr.cpp
@@ -421,13 +421,16 @@ GrTexture* GrUploadMipMapToTexture(GrContext* ctx, const SkImageInfo& info,
GrTexture* GrRefCachedBitmapTexture(GrContext* ctx, const SkBitmap& bitmap,
const GrTextureParams& params,
SkSourceGammaTreatment gammaTreatment) {
- if (bitmap.getTexture()) {
- return GrBitmapTextureAdjuster(&bitmap).refTextureSafeForParams(params, gammaTreatment,
- nullptr);
- }
return GrBitmapTextureMaker(ctx, bitmap).refTextureForParams(params, gammaTreatment);
}
+sk_sp<GrTexture> GrMakeCachedBitmapTexture(GrContext* ctx, const SkBitmap& bitmap,
+ const GrTextureParams& params,
+ SkSourceGammaTreatment gammaTreatment) {
+ GrTexture* tex = GrBitmapTextureMaker(ctx, bitmap).refTextureForParams(params, gammaTreatment);
+ return sk_sp<GrTexture>(tex);
+}
+
///////////////////////////////////////////////////////////////////////////////
// alphatype is ignore for now, but if GrPixelConfig is expanded to encompass

Powered by Google App Engine
This is Rietveld 408576698