Push GrTextureProxy down to more effects

Change-Id: Ie3f32a88f25af082c25bc6daf3fe24e303e80f9e
Reviewed-on: https://skia-review.googlesource.com/7616
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/gm/yuvtorgbeffect.cpp b/gm/yuvtorgbeffect.cpp
index fa82f90..1835fe3 100644
--- a/gm/yuvtorgbeffect.cpp
+++ b/gm/yuvtorgbeffect.cpp
@@ -86,11 +86,11 @@
         {
             GrSurfaceDesc desc;
             desc.fOrigin = kTopLeft_GrSurfaceOrigin;
-            desc.fConfig = kAlpha_8_GrPixelConfig;
 
             for (int i = 0; i < 3; ++i) {
                 desc.fWidth = fBmp[i].width();
                 desc.fHeight = fBmp[i].height();
+                desc.fConfig = SkImageInfo2GrPixelConfig(fBmp[i].info(), *context->caps());
 
                 proxy[i] = GrSurfaceProxy::MakeDeferred(*context->caps(),
                                                         context->textureProvider(),
@@ -221,11 +221,9 @@
             for (int i = 0; i < 3; ++i) {
                 int index = (0 == i) ? 0 : 1;
 
-                desc.fConfig = kAlpha_8_SkColorType == fBmp[index].colorType()
-                                    ? kAlpha_8_GrPixelConfig
-                                    : kBGRA_8888_GrPixelConfig;
                 desc.fWidth = fBmp[index].width();
                 desc.fHeight = fBmp[index].height();
+                desc.fConfig = SkImageInfo2GrPixelConfig(fBmp[index].info(), *context->caps());
 
                 proxy[i] = GrSurfaceProxy::MakeDeferred(*context->caps(),
                                                         context->textureProvider(),