Index: src/gpu/GrTextureToYUVPlanes.cpp |
diff --git a/src/gpu/GrTextureToYUVPlanes.cpp b/src/gpu/GrTextureToYUVPlanes.cpp |
index 16aa55b1d5b60998dccb8700f6216c5e0581a198..1e4c1fe6c12aac966beb6b25d06a9c6569d0aff1 100644 |
--- a/src/gpu/GrTextureToYUVPlanes.cpp |
+++ b/src/gpu/GrTextureToYUVPlanes.cpp |
@@ -13,6 +13,7 @@ |
#include "GrRenderTargetContext.h" |
#include "GrPaint.h" |
#include "GrTextureProvider.h" |
+#include "GrTextureProxy.h" |
namespace { |
using MakeFPProc = sk_sp<GrFragmentProcessor> (*)(sk_sp<GrFragmentProcessor>, |
@@ -148,7 +149,7 @@ bool GrTextureToYUVPlanes(GrTexture* texture, const SkISize sizes[3], void* cons |
if (yuvRenderTargetContext) { |
SkASSERT(sizes[0] == sizes[1] && sizes[1] == sizes[2]); |
- sk_sp<GrTexture> yuvTex(yuvRenderTargetContext->asTexture()); |
+ sk_sp<GrTextureProxy> yuvTex(yuvRenderTargetContext->asDeferredTexture()); |
SkASSERT(yuvTex); |
SkISize yuvSize = sizes[0]; |
// We have no kRGB_888 pixel format, so readback rgba and then copy three channels. |
@@ -181,7 +182,7 @@ bool GrTextureToYUVPlanes(GrTexture* texture, const SkISize sizes[3], void* cons |
return true; |
} else { |
SkASSERT(yRenderTargetContext); |
- sk_sp<GrTexture> yTex(yRenderTargetContext->asTexture()); |
+ sk_sp<GrTextureProxy> yTex(yRenderTargetContext->asDeferredTexture()); |
SkASSERT(yTex); |
if (!yTex->readPixels(0, 0, sizes[0].fWidth, sizes[0].fHeight, |
kAlpha_8_GrPixelConfig, planes[0], rowBytes[0])) { |
@@ -189,7 +190,7 @@ bool GrTextureToYUVPlanes(GrTexture* texture, const SkISize sizes[3], void* cons |
} |
if (uvRenderTargetContext) { |
SkASSERT(sizes[1].fWidth == sizes[2].fWidth); |
- sk_sp<GrTexture> uvTex(uvRenderTargetContext->asTexture()); |
+ sk_sp<GrTextureProxy> uvTex(uvRenderTargetContext->asDeferredTexture()); |
SkASSERT(uvTex); |
SkISize uvSize = sizes[1]; |
// We have no kRG_88 pixel format, so readback rgba and then copy two channels. |
@@ -218,13 +219,13 @@ bool GrTextureToYUVPlanes(GrTexture* texture, const SkISize sizes[3], void* cons |
return true; |
} else { |
SkASSERT(uRenderTargetContext && vRenderTargetContext); |
- sk_sp<GrTexture> tex(uRenderTargetContext->asTexture()); |
+ sk_sp<GrTextureProxy> tex(uRenderTargetContext->asDeferredTexture()); |
SkASSERT(tex); |
if (!tex->readPixels(0, 0, sizes[1].fWidth, sizes[1].fHeight, |
kAlpha_8_GrPixelConfig, planes[1], rowBytes[1])) { |
return false; |
} |
- tex = vRenderTargetContext->asTexture(); |
+ tex = sk_ref_sp(vRenderTargetContext->asDeferredTexture()); |
SkASSERT(tex); |
if (!tex->readPixels(0, 0, sizes[2].fWidth, sizes[2].fHeight, |
kAlpha_8_GrPixelConfig, planes[2], rowBytes[2])) { |