aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/codec/SkBmpRLECodec.cpp
diff options
context:
space:
mode:
authorGravatar bungeman <bungeman@google.com>2015-08-27 16:43:42 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-08-27 16:43:42 -0700
commit0153dea2f9c2fb23fb5e39933d21e11e162aac59 (patch)
treed2b59331ba66f0e658357494f4fd4f2e3f6b9108 /src/codec/SkBmpRLECodec.cpp
parentb6bf36785cc5206f03573cf0bdd980db04eda24c (diff)
Some codec code formatting cleanup.
While looking at users of SkTAddOffset, some unwanted casts were found. These casts are removed and the lines reformatted. However, the formatting of the rest of the file was unhappy, so this is really just a formatting clean-up. Review URL: https://codereview.chromium.org/1301393010
Diffstat (limited to 'src/codec/SkBmpRLECodec.cpp')
-rw-r--r--src/codec/SkBmpRLECodec.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/codec/SkBmpRLECodec.cpp b/src/codec/SkBmpRLECodec.cpp
index 9af19d1b12..1bd14094f9 100644
--- a/src/codec/SkBmpRLECodec.cpp
+++ b/src/codec/SkBmpRLECodec.cpp
@@ -209,8 +209,7 @@ void SkBmpRLECodec::setPixel(void* dst, size_t dstRowBytes,
// Set the pixel based on destination color type
switch (dstInfo.colorType()) {
case kN32_SkColorType: {
- SkPMColor* dstRow = SkTAddOffset<SkPMColor>((SkPMColor*) dst,
- row * (int) dstRowBytes);
+ SkPMColor* dstRow = SkTAddOffset<SkPMColor>(dst, row * (int) dstRowBytes);
dstRow[x] = fColorTable->operator[](index);
break;
}
@@ -246,8 +245,7 @@ void SkBmpRLECodec::setRGBPixel(void* dst, size_t dstRowBytes,
// Set the pixel based on destination color type
switch (dstInfo.colorType()) {
case kN32_SkColorType: {
- SkPMColor* dstRow = SkTAddOffset<SkPMColor>((SkPMColor*) dst,
- row * (int) dstRowBytes);
+ SkPMColor* dstRow = SkTAddOffset<SkPMColor>(dst, row * (int) dstRowBytes);
dstRow[x] = SkPackARGB32NoCheck(0xFF, red, green, blue);
break;
}
@@ -434,8 +432,7 @@ SkCodec::Result SkBmpRLECodec::decode(const SkImageInfo& dstInfo,
uint8_t green = fStreamBuffer.get()[fCurrRLEByte++];
uint8_t red = fStreamBuffer.get()[fCurrRLEByte++];
while (x < endX) {
- setRGBPixel(dst, dstRowBytes, dstInfo, x++, y, red,
- green, blue);
+ setRGBPixel(dst, dstRowBytes, dstInfo, x++, y, red, green, blue);
}
} else {
// In RLE8 or RLE4, the second byte read gives the index in the
@@ -451,8 +448,7 @@ SkCodec::Result SkBmpRLECodec::decode(const SkImageInfo& dstInfo,
// Set the indicated number of pixels
for (int which = 0; x < endX; x++) {
- setPixel(dst, dstRowBytes, dstInfo, x, y,
- indices[which]);
+ setPixel(dst, dstRowBytes, dstInfo, x, y, indices[which]);
which = !which;
}
}