diff options
author | Leon Scroggins III <scroggo@google.com> | 2017-04-17 12:46:33 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-04-17 17:38:35 +0000 |
commit | 249b8e3a2b6450be2e2315f8f9496eec03cfd1c1 (patch) | |
tree | 4c857c72d3716f13658e52dde2afe93b5d07cb70 /dm | |
parent | cd11c809f206af0da3ce1779dee3c91193baa7b0 (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 'dm')
-rw-r--r-- | dm/DMSrcSink.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp index b223c97f56..ebcda38584 100644 --- a/dm/DMSrcSink.cpp +++ b/dm/DMSrcSink.cpp @@ -465,11 +465,11 @@ Error CodecSrc::draw(SkCanvas* canvas) const { // Used to cache a frame that future frames will depend on. SkAutoMalloc priorFramePixels; - size_t cachedFrame = SkCodec::kNone; - for (size_t i = 0; i < frameInfos.size(); i++) { + int cachedFrame = SkCodec::kNone; + for (int i = 0; static_cast<size_t>(i) < frameInfos.size(); i++) { options.fFrameIndex = i; // Check for a prior frame - const size_t reqFrame = frameInfos[i].fRequiredFrame; + const int reqFrame = frameInfos[i].fRequiredFrame; if (reqFrame != SkCodec::kNone && reqFrame == cachedFrame && priorFramePixels.get()) { // Copy into pixels @@ -514,7 +514,8 @@ Error CodecSrc::draw(SkCanvas* canvas) const { // If a future frame depends on this one, store it in priorFrame. // (Note that if i+1 does *not* depend on i, then no future frame can.) - if (i+1 < frameInfos.size() && frameInfos[i+1].fRequiredFrame == i) { + if (static_cast<size_t>(i+1) < frameInfos.size() + && frameInfos[i+1].fRequiredFrame == i) { memcpy(priorFramePixels.reset(safeSize), pixels.get(), safeSize); cachedFrame = i; } |