diff options
author | Mike Klein <mtklein@chromium.org> | 2018-01-09 11:21:58 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-01-09 22:19:58 +0000 |
commit | 515bda681177e2bb1c988e3167a95e3d4132bd7f (patch) | |
tree | 2071a0a3d5bc00fc531489ba7ba94b420d742f0c /src/core | |
parent | df2713c447755a8b0ec7801d797d5ee9650b4bc2 (diff) |
support gray8 destinations on CPU
- fill in a couple switches to allow software to rasterize gray8
- add a gray8 config to DM so we can test it
- enable this config on some bots
Today we draw gray8 using SkRasterPipeline, loading it as {g,g,g,1}
and storing using the same fixed luma math as SkLumaColorFilter.
One day it'd be nice to use the color space's luma vector if present.
Can we support this on GPU?
Change-Id: I4ee661c8bd5f33f5db2433ffb6e1bc2483af8397
Reviewed-on: https://skia-review.googlesource.com/92681
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkBitmapDevice.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/SkBitmapDevice.cpp b/src/core/SkBitmapDevice.cpp index b3ab7fc03c..1cf644a13b 100644 --- a/src/core/SkBitmapDevice.cpp +++ b/src/core/SkBitmapDevice.cpp @@ -44,6 +44,9 @@ static bool valid_for_bitmap_device(const SkImageInfo& info, switch (info.colorType()) { case kAlpha_8_SkColorType: break; + case kGray_8_SkColorType: + canonicalAlphaType = kOpaque_SkAlphaType; + break; case kRGB_565_SkColorType: canonicalAlphaType = kOpaque_SkAlphaType; break; |