diff options
author | Robert Phillips <robertphillips@google.com> | 2017-01-30 08:06:27 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-01-30 13:40:15 +0000 |
commit | 40fd7c94c24bb30d888c3d85a79cbb96c7fbf800 (patch) | |
tree | 075e886c01de864ba982910f1854f47ba1ae95d8 /gm/yuvtorgbeffect.cpp | |
parent | 55b72530fedeb58154635531751a8730982fbf2a (diff) |
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>
Diffstat (limited to 'gm/yuvtorgbeffect.cpp')
-rw-r--r-- | gm/yuvtorgbeffect.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gm/yuvtorgbeffect.cpp b/gm/yuvtorgbeffect.cpp index fa82f9090b..1835fe3446 100644 --- a/gm/yuvtorgbeffect.cpp +++ b/gm/yuvtorgbeffect.cpp @@ -86,11 +86,11 @@ protected: { 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 @@ protected: 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(), |