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

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: Adding gif functionality to SkCodec 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/SkGifInterlaceIter.h
diff --git a/src/codec/SkGifInterlaceIter.h b/src/codec/SkGifInterlaceIter.h
new file mode 100644
index 0000000000000000000000000000000000000000..88f38e9a5a2a7affd118a2e2894c505a14b9db6d
--- /dev/null
+++ b/src/codec/SkGifInterlaceIter.h
@@ -0,0 +1,39 @@
+/*
+ * 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 {
scroggo 2015/03/25 19:44:49 Unless you want this to be copyable, make it inher
msarett 2015/03/26 19:15:57 Done.
+public:
+
+ /*
+ * Constructor
scroggo 2015/03/25 19:44:49 This comment does not provide any useful informati
msarett 2015/03/26 19:15:57 Done.
+ */
+ SkGifInterlaceIter(int height);
scroggo 2015/03/25 19:44:49 We typically declare constructors that take one pa
msarett 2015/03/26 19:15:57 Done.
+
+ /*
+ * Get the next destination y-value
+ */
+ uint32_t nextY();
scroggo 2015/03/25 19:44:49 It's weird that this returns a uint32_t while we c
msarett 2015/03/26 19:15:57 This code now deals with int32_t uniformly.
+
+private:
+
+ /*
+ * Updates the iterator to prepare the next y-value
+ */
+ void prepareY();
+
+ // Fields
scroggo 2015/03/25 19:44:49 Again, this comment is unnecessary.
msarett 2015/03/26 19:15:57 Done.
+ const uint32_t fHeight;
+ int32_t fCurrY;
+ int32_t fDeltaY;
+ const uint8_t* fStartYPtr;
+ const uint8_t* fDeltaYPtr;
+};

Powered by Google App Engine
This is Rietveld 408576698