diff options
-rw-r--r-- | dm/DM.cpp | 1 | ||||
-rw-r--r-- | src/core/SkBitmapDevice.cpp | 2 | ||||
-rw-r--r-- | src/image/SkSurface_Raster.cpp | 6 |
3 files changed, 9 insertions, 0 deletions
@@ -896,6 +896,7 @@ static Sink* create_sink(const GrContextOptions& grCtxOptions, const SkCommandLi SINK("g8", RasterSink, kGray_8_SkColorType); SINK("565", RasterSink, kRGB_565_SkColorType); + SINK("4444", RasterSink, kARGB_4444_SkColorType); SINK("8888", RasterSink, kN32_SkColorType); SINK("srgb", RasterSink, kN32_SkColorType, srgbColorSpace); SINK("f16", RasterSink, kRGBA_F16_SkColorType, srgbLinearColorSpace); diff --git a/src/core/SkBitmapDevice.cpp b/src/core/SkBitmapDevice.cpp index 90b721a2f0..f49872cf7d 100644 --- a/src/core/SkBitmapDevice.cpp +++ b/src/core/SkBitmapDevice.cpp @@ -50,6 +50,8 @@ static bool valid_for_bitmap_device(const SkImageInfo& info, case kRGB_565_SkColorType: canonicalAlphaType = kOpaque_SkAlphaType; break; + case kARGB_4444_SkColorType: + break; case kN32_SkColorType: break; case kRGBA_F16_SkColorType: diff --git a/src/image/SkSurface_Raster.cpp b/src/image/SkSurface_Raster.cpp index 3611b30828..e55e5a751a 100644 --- a/src/image/SkSurface_Raster.cpp +++ b/src/image/SkSurface_Raster.cpp @@ -62,6 +62,12 @@ bool SkSurfaceValidateRasterInfo(const SkImageInfo& info, size_t rowBytes) { } shift = 1; break; + case kARGB_4444_SkColorType: + if (info.colorSpace()) { + return false; + } + shift = 1; + break; case kN32_SkColorType: if (info.colorSpace() && !info.colorSpace()->gammaCloseToSRGB()) { return false; |