Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1299)

Unified Diff: src/codec/SkBmpRLECodec.cpp

Issue 1301393010: Some codec code formatting cleanup. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/codec/SkCodec_libgif.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkBmpRLECodec.cpp
diff --git a/src/codec/SkBmpRLECodec.cpp b/src/codec/SkBmpRLECodec.cpp
index 9af19d1b125383c3d7add9c3463cbe996f87574d..1bd14094f991e71cee17c7774c297f462eff9c08 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;
}
}
« no previous file with comments | « no previous file | src/codec/SkCodec_libgif.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698