Revert "Change refPinnedTextureProxy to return a view instead."
This reverts commit becd2fe91d1aa374670c28bbbd84d7ef39bb859e.
Reason for revert: crashing in pre-abandon
Original change's description:
> Change refPinnedTextureProxy to return a view instead.
>
> Bug: skia:9556
> Change-Id: Iad3fbadb893d029fc39f0b682c9f8fc223c010a5
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268843
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
TBR=egdaniel@google.com,brianosman@google.com
Change-Id: I496e4d9f7fc43e990b3e1ae2b2d2a461deeadb8f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9556
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268940
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp
index 7579e28..e051326 100644
--- a/src/gpu/SkGr.cpp
+++ b/src/gpu/SkGr.cpp
@@ -140,10 +140,12 @@
return view;
}
-GrSurfaceProxyView GrRefCachedBitmapView(GrRecordingContext* ctx, const SkBitmap& bitmap,
- GrSamplerState params, SkScalar scaleAdjust[2]) {
+sk_sp<GrTextureProxy> GrRefCachedBitmapTextureProxy(GrRecordingContext* ctx,
+ const SkBitmap& bitmap,
+ GrSamplerState params,
+ SkScalar scaleAdjust[2]) {
GrBitmapTextureMaker maker(ctx, bitmap, GrBitmapTextureMaker::Cached::kYes);
- return maker.viewForParams(params, scaleAdjust);
+ return maker.viewForParams(params, scaleAdjust).asTextureProxyRef();
}
GrSurfaceProxyView GrMakeCachedBitmapProxyView(GrRecordingContext* context, const SkBitmap& bitmap,