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

Unified Diff: src/gpu/GrTextureToYUVPlanes.cpp

Issue 2215323003: Start using RenderTargetProxy (omnibus) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update Created 4 years, 1 month 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
« no previous file with comments | « src/gpu/GrTextureParamsAdjuster.cpp ('k') | src/gpu/GrYUVProvider.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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])) {
« no previous file with comments | « src/gpu/GrTextureParamsAdjuster.cpp ('k') | src/gpu/GrYUVProvider.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698