diff options
Diffstat (limited to 'gm')
-rw-r--r-- | gm/image_pict.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/gm/image_pict.cpp b/gm/image_pict.cpp index 883fd34725..792173ce66 100644 --- a/gm/image_pict.cpp +++ b/gm/image_pict.cpp @@ -344,12 +344,11 @@ protected: static void draw_as_tex(SkCanvas* canvas, SkImageCacherator* cache, SkScalar x, SkScalar y) { #if SK_SUPPORT_GPU sk_sp<SkColorSpace> texColorSpace; - // MDB TODO: this should be lockAsTextureRef - sk_sp<GrTexture> texture( - cache->lockAsTexture(canvas->getGrContext(), GrSamplerParams::ClampBilerp(), - canvas->imageInfo().colorSpace(), &texColorSpace, - nullptr, nullptr)); - if (!texture) { + sk_sp<GrTextureProxy> proxy( + cache->lockAsTextureProxy(canvas->getGrContext(), GrSamplerParams::ClampBilerp(), + canvas->imageInfo().colorSpace(), &texColorSpace, + nullptr, nullptr)); + if (!proxy) { // show placeholder if we have no texture SkPaint paint; paint.setStyle(SkPaint::kStroke_Style); @@ -361,8 +360,6 @@ protected: return; } - sk_sp<GrTextureProxy> proxy = GrSurfaceProxy::MakeWrapped(std::move(texture)); - // No API to draw a GrTexture directly, so we cheat and create a private image subclass sk_sp<SkImage> image(new SkImage_Gpu(canvas->getGrContext(), cache->uniqueID(), kPremul_SkAlphaType, |