Make GrSurface::MakeDeferred return sk_sp<GrTextureProxy>
This should make upcoming changes less tedious
Change-Id: I313ae9df724f109a64cf5708a974e8bfeb963025
Reviewed-on: https://skia-review.googlesource.com/9183
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/gm/yuvtorgbeffect.cpp b/gm/yuvtorgbeffect.cpp
index 1835fe3..03d103a 100644
--- a/gm/yuvtorgbeffect.cpp
+++ b/gm/yuvtorgbeffect.cpp
@@ -81,7 +81,7 @@
return;
}
- sk_sp<GrSurfaceProxy> proxy[3];
+ sk_sp<GrTextureProxy> proxy[3];
{
GrSurfaceDesc desc;
@@ -121,9 +121,9 @@
for (int i = 0; i < 6; ++i) {
sk_sp<GrFragmentProcessor> fp(
GrYUVEffect::MakeYUVToRGB(context,
- sk_ref_sp(proxy[indices[i][0]]->asTextureProxy()),
- sk_ref_sp(proxy[indices[i][1]]->asTextureProxy()),
- sk_ref_sp(proxy[indices[i][2]]->asTextureProxy()),
+ proxy[indices[i][0]],
+ proxy[indices[i][1]],
+ proxy[indices[i][2]],
sizes,
static_cast<SkYUVColorSpace>(space),
false));
@@ -212,7 +212,7 @@
return;
}
- sk_sp<GrSurfaceProxy> proxy[3];
+ sk_sp<GrTextureProxy> proxy[3];
{
GrSurfaceDesc desc;
@@ -252,10 +252,7 @@
GrPaint grPaint;
grPaint.setXPFactory(GrPorterDuffXPFactory::Get(SkBlendMode::kSrc));
sk_sp<GrFragmentProcessor> fp(
- GrYUVEffect::MakeYUVToRGB(context,
- sk_ref_sp(proxy[0]->asTextureProxy()),
- sk_ref_sp(proxy[1]->asTextureProxy()),
- sk_ref_sp(proxy[2]->asTextureProxy()),
+ GrYUVEffect::MakeYUVToRGB(context, proxy[0], proxy[1], proxy[2],
sizes, static_cast<SkYUVColorSpace>(space), true));
if (fp) {
SkMatrix viewMatrix;