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

Unified Diff: src/codec/SkBmpRLECodec.h

Issue 1689953002: Fix scanline decoding of rare RLE bmps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Move comment to header Created 4 years, 10 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 | « resources/rle.bmp ('k') | src/codec/SkBmpRLECodec.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkBmpRLECodec.h
diff --git a/src/codec/SkBmpRLECodec.h b/src/codec/SkBmpRLECodec.h
index df2a97d84502010a0c86efc5940466f9aba16082..e319a71052dd04d0b3371e9452a0306cd7d17466 100644
--- a/src/codec/SkBmpRLECodec.h
+++ b/src/codec/SkBmpRLECodec.h
@@ -96,9 +96,16 @@ private:
const uint32_t fOffset;
SkAutoTDeleteArray<uint8_t> fStreamBuffer;
size_t fRLEBytes;
+ const size_t fOrigRLEBytes;
uint32_t fCurrRLEByte;
int fSampleX;
SkAutoTDelete<SkSampler> fSampler;
+ // Scanline decodes allow the client to ask for a single scanline at a time.
+ // This can be tricky when the RLE encoding instructs the decoder to jump down
+ // multiple lines. This field keeps track of lines that need to be skipped
+ // on subsequent calls to decodeRows().
+ int fLinesToSkip;
+
typedef SkBmpCodec INHERITED;
};
« no previous file with comments | « resources/rle.bmp ('k') | src/codec/SkBmpRLECodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698