aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/codec
diff options
context:
space:
mode:
authorGravatar Leon Scroggins III <scroggo@google.com>2017-04-17 12:46:33 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-17 17:38:35 +0000
commit249b8e3a2b6450be2e2315f8f9496eec03cfd1c1 (patch)
tree4c857c72d3716f13658e52dde2afe93b5d07cb70 /include/codec
parentcd11c809f206af0da3ce1779dee3c91193baa7b0 (diff)
Switch SkCodec to int for counts and indices
This matches other Skia APIs. size_t was adopted from blink/ GIFImageReader. Change-Id: Ic83e59f0942f597c4fb834e623acd9886ad483fe Reviewed-on: https://skia-review.googlesource.com/13274 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Matt Sarett <msarett@google.com> Reviewed-by: Chris Blume <cblume@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
Diffstat (limited to 'include/codec')
-rw-r--r--include/codec/SkCodec.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/codec/SkCodec.h b/include/codec/SkCodec.h
index aadcb059fe..7f88fc6117 100644
--- a/include/codec/SkCodec.h
+++ b/include/codec/SkCodec.h
@@ -277,7 +277,7 @@ public:
*
* Only meaningful for multi-frame images.
*/
- size_t fFrameIndex;
+ int fFrameIndex;
/**
* If true, the dst already contains the prior frame.
@@ -598,13 +598,13 @@ public:
*
* May require reading through the stream.
*/
- size_t getFrameCount() {
+ int getFrameCount() {
return this->onGetFrameCount();
}
// The required frame for an independent frame is marked as
// kNone.
- static constexpr size_t kNone = static_cast<size_t>(-1);
+ static constexpr int kNone = -1;
/**
* Information about individual frames in a multi-framed image.
@@ -614,12 +614,12 @@ public:
* The frame that this frame needs to be blended with, or
* kNone.
*/
- size_t fRequiredFrame;
+ int fRequiredFrame;
/**
* Number of milliseconds to show this frame.
*/
- size_t fDuration;
+ int fDuration;
/**
* Whether the end marker for this frame is contained in the stream.
@@ -643,7 +643,7 @@ public:
* so it should be called after getFrameCount() to parse any frames that
* have not already been parsed.
*/
- bool getFrameInfo(size_t index, FrameInfo* info) const {
+ bool getFrameInfo(int index, FrameInfo* info) const {
return this->onGetFrameInfo(index, info);
}
@@ -818,11 +818,11 @@ protected:
SkTransferFunctionBehavior premulBehavior);
SkColorSpaceXform* colorXform() const { return fColorXform.get(); }
- virtual size_t onGetFrameCount() {
+ virtual int onGetFrameCount() {
return 1;
}
- virtual bool onGetFrameInfo(size_t, FrameInfo*) const {
+ virtual bool onGetFrameInfo(int, FrameInfo*) const {
return false;
}