diff options
Diffstat (limited to 'src/core/SkConfig8888.cpp')
-rw-r--r-- | src/core/SkConfig8888.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/SkConfig8888.cpp b/src/core/SkConfig8888.cpp index e2dd1020de..5bac16a272 100644 --- a/src/core/SkConfig8888.cpp +++ b/src/core/SkConfig8888.cpp @@ -129,7 +129,7 @@ bool SkSrcPixelInfo::convertPixelsTo(SkDstPixelInfo* dst, int width, int height) static void copy_g8_to_32(void* dst, size_t dstRB, const void* src, size_t srcRB, int w, int h) { uint32_t* dst32 = (uint32_t*)dst; const uint8_t* src8 = (const uint8_t*)src; - + for (int y = 0; y < h; ++y) { for (int x = 0; x < w; ++x) { dst32[x] = SkPackARGB32(0xFF, src8[x], src8[x], src8[x]); @@ -173,10 +173,10 @@ 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(); @@ -303,4 +303,3 @@ bool SkPixelInfo::CopyPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t return true; } } - |