diff options
author | Greg Daniel <egdaniel@google.com> | 2018-04-16 16:16:47 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-04-17 11:35:33 +0000 |
commit | 93b4ddd347fd75b9ee230c0f43165bec6ee73eaf (patch) | |
tree | bfbdf79f035ed3c474c649a2aaf6d89c9333d64f | |
parent | bd2e1f1ca6f511e567020bebd7479cade8e246a1 (diff) |
Update our config fallback switch in GrContext.
First we didn't have any of our new private configs in the fallback
switch statement. Also this is a workaround for the case where we want
to make a copy of a Gray8 image but we claim its not renderable so we
fail the copy.
Bug: skia:
Change-Id: I68d29c91f07bb87eb1eec650594cc035ed823e3f
Reviewed-on: https://skia-review.googlesource.com/121355
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
-rw-r--r-- | src/gpu/GrContext.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp index 705a7a1f93..1f1927ed2e 100644 --- a/src/gpu/GrContext.cpp +++ b/src/gpu/GrContext.cpp @@ -1330,6 +1330,8 @@ void GrContextPriv::copyOpListsFromDDL(const SkDeferredDisplayList* ddl, static inline GrPixelConfig GrPixelConfigFallback(GrPixelConfig config) { switch (config) { case kAlpha_8_GrPixelConfig: + case kAlpha_8_as_Alpha_GrPixelConfig: + case kAlpha_8_as_Red_GrPixelConfig: case kRGB_565_GrPixelConfig: case kRGBA_4444_GrPixelConfig: case kBGRA_8888_GrPixelConfig: @@ -1338,7 +1340,12 @@ static inline GrPixelConfig GrPixelConfigFallback(GrPixelConfig config) { case kSBGRA_8888_GrPixelConfig: return kSRGBA_8888_GrPixelConfig; case kAlpha_half_GrPixelConfig: + case kAlpha_half_as_Red_GrPixelConfig: return kRGBA_half_GrPixelConfig; + case kGray_8_GrPixelConfig: + case kGray_8_as_Lum_GrPixelConfig: + case kGray_8_as_Red_GrPixelConfig: + return kRGB_888_GrPixelConfig; default: return kUnknown_GrPixelConfig; } |