| Index: src/gpu/SkGr.cpp
|
| diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp
|
| index 0b60ede8361ac80febc27ebd0c96b45b49d4f044..9cafbf69c0d030a281f4629c503cb52bcc61e0b1 100644
|
| --- a/src/gpu/SkGr.cpp
|
| +++ b/src/gpu/SkGr.cpp
|
| @@ -6,6 +6,7 @@
|
| */
|
|
|
| #include "SkGr.h"
|
| +#include "SkConfig8888.h"
|
|
|
| /* Fill out buffer with the compressed format Ganesh expects from a colortable
|
| based bitmap. [palette (colortable) + indices].
|
| @@ -30,7 +31,11 @@ static void build_compressed_data(void* buffer, const SkBitmap& bitmap) {
|
| SkColorTable* ctable = bitmap.getColorTable();
|
| char* dst = (char*)buffer;
|
|
|
| - memcpy(dst, ctable->lockColors(), ctable->count() * sizeof(SkPMColor));
|
| + uint32_t* colorTableDst = reinterpret_cast<uint32_t*>(dst);
|
| + const uint32_t* colorTableSrc = reinterpret_cast<const uint32_t*>(ctable->lockColors());
|
| + SkConvertConfig8888Pixels(colorTableDst, 0, SkCanvas::kRGBA_Premul_Config8888,
|
| + colorTableSrc, 0, SkCanvas::kNative_Premul_Config8888,
|
| + ctable->count(), 1);
|
| ctable->unlockColors();
|
|
|
| // always skip a full 256 number of entries, even if we memcpy'd fewer
|
|
|