Index: src/codec/SkGifInterlaceIter.h |
diff --git a/src/codec/SkGifInterlaceIter.h b/src/codec/SkGifInterlaceIter.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..970cd4950f3207e29f1df7f0eec67b6ba7b26274 |
--- /dev/null |
+++ b/src/codec/SkGifInterlaceIter.h |
@@ -0,0 +1,35 @@ |
+/* |
+ * Copyright 2015 The Android Open Source Project |
+ * |
+ * Use of this source code is governed by a BSD-style license that can be |
+ * found in the LICENSE file. |
+ */ |
+ |
+#include "SkTypes.h" |
+ |
+/* |
+ * Helper class to determine the destination y-values for interlaced gifs |
+ */ |
+class SkGifInterlaceIter : SkNoncopyable { |
+public: |
+ |
+ explicit SkGifInterlaceIter(int32_t height); |
+ |
+ /* |
+ * Get the next destination y-value |
+ */ |
+ int32_t nextY(); |
+ |
+private: |
+ |
+ /* |
+ * Updates the iterator to prepare the next y-value |
+ */ |
+ void prepareY(); |
+ |
+ const int32_t fHeight; |
+ int32_t fCurrY; |
+ int32_t fDeltaY; |
+ const uint8_t* fStartYPtr; |
+ const uint8_t* fDeltaYPtr; |
+}; |