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

Unified Diff: dm/DMSrcSink.cpp

Issue 1179213002: Fixing stripe test (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMSrcSink.cpp
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index c89ffd1b7121839f880edf9a0fdab803dffe9881..4598a4894b7956ed681d6b199b569ee58572bf12 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -331,15 +331,16 @@ Error CodecSrc::draw(SkCanvas* canvas) const {
}
// Skip a stripe
- const int linesToSkip = SkTMax(0, SkTMin(stripeHeight,
- height - (i + 1) * stripeHeight));
- result = decoder->skipScanlines(linesToSkip);
- switch (result) {
- case SkImageGenerator::kSuccess:
- case SkImageGenerator::kIncompleteInput:
- break;
- default:
- return SkStringPrintf("Cannot skip scanlines for %s.", fPath.c_str());
+ const int linesToSkip = SkTMin(stripeHeight, height - (i + 1) * stripeHeight);
+ if (linesToSkip > 0) {
+ result = decoder->skipScanlines(linesToSkip);
+ switch (result) {
+ case SkImageGenerator::kSuccess:
+ case SkImageGenerator::kIncompleteInput:
+ break;
+ default:
+ return SkStringPrintf("Cannot skip scanlines for %s.", fPath.c_str());
+ }
}
}
canvas->drawBitmap(bitmap, 0, 0);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698