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

Unified Diff: src/codec/SkSwizzler.h

Issue 1075243003: Implementing filling for SkBmpCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Sharing code in static helper Created 5 years, 8 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 | « src/codec/SkCodec_libgif.cpp ('k') | src/codec/SkSwizzler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkSwizzler.h
diff --git a/src/codec/SkSwizzler.h b/src/codec/SkSwizzler.h
index 6044c869d2362224960e3cad72e7a88f83f792a9..8a471e9b73e3a3943d0fea37b4ee91a1eecef709 100644
--- a/src/codec/SkSwizzler.h
+++ b/src/codec/SkSwizzler.h
@@ -132,8 +132,11 @@ public:
/**
* Fill the remainder of the destination with a single color
*
- * @param y
- * The starting row for the fill.
+ * @param dstStartRow
+ * The destination row to fill from.
+ *
+ * @param numRows
+ * The number of rows to fill.
*
* @param colorOrIndex
* @param colorTable
@@ -155,8 +158,8 @@ public:
* Other SkColorTypes are not supported.
*
*/
- static void Fill(void* dst, const SkImageInfo& dstInfo, size_t dstRowBytes, uint32_t y,
- uint32_t colorOrIndex, SkPMColor* colorTable);
+ static void Fill(void* dstStartRow, const SkImageInfo& dstInfo, size_t dstRowBytes,
+ uint32_t numRows, uint32_t colorOrIndex, const SkPMColor* colorTable);
/**
* Swizzle the next line. Call height times, once for each row of source.
@@ -187,6 +190,17 @@ public:
*/
void setDstRow(void* dst) { fDstRow = dst; }
+ /**
+ * Get the next destination row to decode to
+ */
+ void* getDstRow() {
+ // kDesignateRow_NextMode does not update the fDstRow ptr. This function is
+ // unnecessary in that case since fDstRow will always be equal to the pointer
+ // passed to CreateSwizzler().
+ SkASSERT(kDesignateRow_NextMode != fNextMode);
+ return fDstRow;
+ }
+
private:
#ifdef SK_DEBUG
« no previous file with comments | « src/codec/SkCodec_libgif.cpp ('k') | src/codec/SkSwizzler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698