Index: src/codec/SkSwizzler.cpp |
diff --git a/src/codec/SkSwizzler.cpp b/src/codec/SkSwizzler.cpp |
index 754b08883544928f7066456b409420d52a596e84..350100be2deae41db07a8c1c4a0f7f83f8e18d7f 100644 |
--- a/src/codec/SkSwizzler.cpp |
+++ b/src/codec/SkSwizzler.cpp |
@@ -423,12 +423,17 @@ SkSwizzler::ResultAlpha SkSwizzler::next(const uint8_t* SK_RESTRICT src, |
} |
void SkSwizzler::Fill(void* dst, const SkImageInfo& dstInfo, size_t dstRowBytes, uint32_t y, |
- uint32_t colorOrIndex, SkPMColor* colorTable) { |
+ uint32_t colorOrIndex, const SkPMColor* colorTable, bool bottomUp) { |
SkASSERT(dst != NULL); |
SkASSERT(y < (uint32_t) dstInfo.height()); |
// Get dst start row |
- void* dstRow = SkTAddOffset<void*>(dst, y * dstRowBytes); |
+ void* dstRow; |
+ if (bottomUp) { |
+ dstRow = dst; |
+ } else { |
+ dstRow = SkTAddOffset<void*>(dst, y * dstRowBytes); |
+ } |
// Calculate remaining bytes. This is tricky since the final row may not be padded. |
const size_t totalBytes = dstInfo.getSafeSize(dstRowBytes); |