BUG=
R=halcanary@google.com
Author: humper@google.com
Review URL: https://codereview.chromium.org/
249853003
git-svn-id: http://skia.googlecode.com/svn/trunk@14340
2bbb7eff-a529-9590-31e7-
b0007b416f81
}
}
+static void Alpha8_To_RGB(const uint8_t* in, uint8_t* rgb, int width,
+ const SkPMColor* SK_RESTRICT ctable) {
+ const uint8_t* SK_RESTRICT src = (const uint8_t*)in;
+ for (int i = 0; i < width; ++i) {
+ rgb[0] = rgb[1] = rgb[2] = *src++;
+ rgb += 3;
+ }
+}
+
static ScanlineImporter ChooseImporter(const SkBitmap::Config& config,
bool hasAlpha,
int* bpp) {
case SkBitmap::kIndex8_Config:
*bpp = 3;
return Index8_To_RGB;
+ case SkBitmap::kA8_Config:
+ *bpp = 3;
+ return Alpha8_To_RGB;
default:
return NULL;
}