| Index: src/core/SkConfig8888.cpp
|
| diff --git a/src/core/SkConfig8888.cpp b/src/core/SkConfig8888.cpp
|
| index 53f35c37374666fbc92e146846b374c708aef234..e2dd1020deaef9b322eb40b93780442210622a5f 100644
|
| --- a/src/core/SkConfig8888.cpp
|
| +++ b/src/core/SkConfig8888.cpp
|
| @@ -173,9 +173,20 @@ bool SkPixelInfo::CopyPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t
|
| if (srcInfo.dimensions() != dstInfo.dimensions()) {
|
| return false;
|
| }
|
| -
|
| +
|
| const int width = srcInfo.width();
|
| const int height = srcInfo.height();
|
| +
|
| + // Do the easiest one first : both configs are equal
|
| + if ((srcInfo == dstInfo) && !ctable) {
|
| + size_t bytes = width * srcInfo.bytesPerPixel();
|
| + for (int y = 0; y < height; ++y) {
|
| + memcpy(dstPixels, srcPixels, bytes);
|
| + srcPixels = (const char*)srcPixels + srcRB;
|
| + dstPixels = (char*)dstPixels + dstRB;
|
| + }
|
| + return true;
|
| + }
|
|
|
| // Handle fancy alpha swizzling if both are ARGB32
|
| if (4 == srcInfo.bytesPerPixel() && 4 == dstInfo.bytesPerPixel()) {
|
|
|