Chromium Code Reviews| Index: content/common/gpu/client/gl_helper_readback_support.cc |
| diff --git a/content/common/gpu/client/gl_helper_readback_support.cc b/content/common/gpu/client/gl_helper_readback_support.cc |
| index 4412c9546dece7a44a74d070574a6f082ef7b8d0..f5b9fc64186a9ac85a9ce497298cc56c149cea57 100644 |
| --- a/content/common/gpu/client/gl_helper_readback_support.cc |
| +++ b/content/common/gpu/client/gl_helper_readback_support.cc |
| @@ -25,6 +25,8 @@ void GLHelperReadbackSupport::InitializeReadbackSupport() { |
| for (int i = 0; i <= kLastEnum_SkColorType; ++i) { |
| format_support_table_[i] = GLHelperReadbackSupport::NOT_SUPPORTED; |
| } |
| + |
| + CheckForReadbackSupport(kAlpha_8_SkColorType); |
| CheckForReadbackSupport(kRGB_565_SkColorType); |
| CheckForReadbackSupport(kARGB_4444_SkColorType); |
| CheckForReadbackSupport(kRGBA_8888_SkColorType); |
| @@ -39,6 +41,9 @@ void GLHelperReadbackSupport::CheckForReadbackSupport( |
| case kRGB_565_SkColorType: |
| supports_format = SupportsFormat(GL_RGB, GL_UNSIGNED_SHORT_5_6_5); |
| break; |
| + // kAlpha_8_SkColorType is supported here via a special encoding |
| + // using a 32-bit texture to represent an 8-bit image. |
| + case kAlpha_8_SkColorType: |
| case kRGBA_8888_SkColorType: |
| // This is the baseline, assume always true. |
| supports_format = true; |
| @@ -140,6 +145,7 @@ GLHelperReadbackSupport::GetReadbackConfig(SkColorType color_type, |
| return GLHelperReadbackSupport::SUPPORTED; |
| } |
| break; |
| + case kAlpha_8_SkColorType: |
|
piman
2014/09/17 19:52:31
I think we need more logic to handle this.
In the
sivag
2014/09/18 13:19:03
Done.
|
| case kRGBA_8888_SkColorType: |
| *format = GL_RGBA; |
| if (can_swizzle) { |