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

Unified Diff: src/codec/SkGifInterlaceIter.h

Issue 1022673011: Creating a new wrapper for gif decoder (Closed) Base URL: https://skia.googlesource.com/skia.git@ico-real
Patch Set: Added comments and do while loop 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
« no previous file with comments | « src/codec/SkCodec_libgif.cpp ('k') | src/codec/SkGifInterlaceIter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
+};
« no previous file with comments | « src/codec/SkCodec_libgif.cpp ('k') | src/codec/SkGifInterlaceIter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698