aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/images
diff options
context:
space:
mode:
Diffstat (limited to 'src/images')
-rw-r--r--src/images/SkScaledBitmapSampler.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/images/SkScaledBitmapSampler.cpp b/src/images/SkScaledBitmapSampler.cpp
index fe425d58b1..8bb1bde7c4 100644
--- a/src/images/SkScaledBitmapSampler.cpp
+++ b/src/images/SkScaledBitmapSampler.cpp
@@ -396,10 +396,9 @@ static bool Sample_Index_D8888_SkipZ(void* SK_RESTRICT dstRow,
static SkScaledBitmapSampler::RowProc
get_index_to_8888_proc(const SkScaledBitmapSampler::Options& opts) {
- if (!opts.fPremultiplyAlpha) {
- // Unpremultiplied is not supported for an index source.
- return NULL;
- }
+ // The caller is expected to have created the source colortable
+ // properly with respect to opts.fPremultiplyAlpha, so premul makes
+ // no difference here.
// Dither makes no difference
if (opts.fSkipZeros) {
return Sample_Index_D8888_SkipZ;
@@ -803,7 +802,7 @@ SkScaledBitmapSampler::RowProc gTestProcs[] = {
Sample_Index_DI, Sample_Index_DI, NULL, NULL, // to Index8
Sample_Index_D565, Sample_Index_D565_D, Sample_Index_D565, Sample_Index_D565_D, // to 565
Sample_Index_D4444, Sample_Index_D4444_D, NULL, NULL, // to 4444
- Sample_Index_D8888, Sample_Index_D8888, NULL, NULL, // to 8888
+ Sample_Index_D8888, Sample_Index_D8888, Sample_Index_D8888, Sample_Index_D8888, // to 8888
// RGB
NULL, NULL, NULL, NULL, // to A8
NULL, NULL, NULL, NULL, // to Index8