Add Gray8 pixel config
authorBrian Osman <brianosman@google.com>
Tue, 10 Jan 2017 19:20:02 +0000 (14:20 -0500)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Tue, 10 Jan 2017 20:37:09 +0000 (20:37 +0000)
commit986563bcff26300ea4317b4dd84917d5240bb723
tree45d8ebce472b8f115193c800448bb3ae9078ee7c
parentfdb124adfcb9cacf9eea50f6f554b2a955bbacc6
Add Gray8 pixel config

This is still just linear (non-sRGB), but adding sRGB will
be the next step. I've verified that this is really making
R8 textures when uploading Gray8 bitmaps. Tests pass, and
the all_bitmap_configs GM still renders correctly (unlike
when we just mapped Gray8 to Alpha8).

This adds another pixel config, which could grow our cache
footprint, but the benefits of not using 4bpp for 1bpp data
should outweigh that?

Re-land of https://skia-review.googlesource.com/c/6817/,
with fixes for Vulkan.

BUG=skia:6110

Change-Id: Ia763c276808be28027ed0005ee4b88637306583f
Reviewed-on: https://skia-review.googlesource.com/6839
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
12 files changed:
include/gpu/GrColor.h
include/gpu/GrTypes.h
include/private/GrSwizzle.h
src/gpu/GrCaps.cpp
src/gpu/GrContext.cpp
src/gpu/GrShaderCaps.cpp
src/gpu/SkGr.cpp
src/gpu/gl/GrGLCaps.cpp
src/gpu/gl/GrGLDefines.h
src/gpu/gl/GrGLGpu.cpp
src/gpu/vk/GrVkCaps.cpp
src/gpu/vk/GrVkUtil.cpp