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

Unified Diff: src/codec/SkCodecPriv.h

Issue 1055743003: Swizzler changes Index8 and 565 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 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/SkCodecPriv.h
diff --git a/src/codec/SkCodecPriv.h b/src/codec/SkCodecPriv.h
index da7574677c375a154b3a1ca6a78f472f1e3a0e13..41971bccb96896e10febdb927517a0df77c5050e 100644
--- a/src/codec/SkCodecPriv.h
+++ b/src/codec/SkCodecPriv.h
@@ -65,6 +65,25 @@ static inline size_t compute_row_bytes(int width, uint32_t bitsPerPixel) {
/*
*
+ * Get a pointer to the color table to be used by the decoder
+ *
+ */
+static inline SkPMColor* get_color_table_ptr(SkColorType dstColorType,
+ SkPMColor* inputColorPtr,
+ int* inputColorCount,
+ SkPMColor* alternateColorPtr) {
+ if (kIndex_8_SkColorType == dstColorType) {
+ SkASSERT(NULL != inputColorPtr);
+ SkASSERT(NULL != inputColorCount);
+ SkASSERT(256 == *inputColorCount);
+ return inputColorPtr;
+ } else {
+ return alternateColorPtr;
+ }
+}
+
+/*
+ *
* Get a byte from a buffer
* This method is unsafe, the caller is responsible for performing a check
*

Powered by Google App Engine
This is Rietveld 408576698