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

Unified Diff: src/codec/SkBmpRLECodec.h

Issue 1273853004: Fix bmp RLE "bug" and add invalid image test to CodexTest (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Response to comments plus final nits from 1258863008 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
Index: src/codec/SkBmpRLECodec.h
diff --git a/src/codec/SkBmpRLECodec.h b/src/codec/SkBmpRLECodec.h
index f1f1ae97d8b2ba596c781592d8315935537dc7ec..5432b6402a62ba3e2045b71b71d6d1457e498312 100644
--- a/src/codec/SkBmpRLECodec.h
+++ b/src/codec/SkBmpRLECodec.h
@@ -56,6 +56,15 @@ private:
bool initializeStreamBuffer();
/*
+ * It is possible for an encoded image stream to contain more encoded data than
+ * it reports that it has. Before signalling kIncompleteInput, we should check
scroggo 2015/08/12 14:14:30 Maybe this should say something like: Before sign
msarett 2015/08/12 15:01:24 Agreed. Done.
+ * if we can reset the stream buffer with additional data.
+ *
+ * @return the number of bytes remaining in the new stream buffer
scroggo 2015/08/12 14:14:30 nit: In my mind, the stream buffer itself is not n
msarett 2015/08/12 15:01:24 Yeah agreed. I need the remove the work "new" fro
+ */
+ size_t resetStreamBuffer();
scroggo 2015/08/12 14:14:30 I'm not a big fan of the name. It doesn't really e
msarett 2015/08/12 15:01:24 I like checkForMoreData.
+
+ /*
* Set an RLE pixel using the color table
*/
void setPixel(void* dst, size_t dstRowBytes,

Powered by Google App Engine
This is Rietveld 408576698