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

Unified Diff: include/codec/SkCodec.h

Issue 1691083002: Implement onSkipScanlines() for bmp and wbmp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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 | src/codec/SkBmpCodec.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/codec/SkCodec.h
diff --git a/include/codec/SkCodec.h b/include/codec/SkCodec.h
index edc8ec38fa2f5a8cce3d0bdf1217a586d430929d..c3a5873d7f9fb77e03027f684d573061bc9c3dd2 100644
--- a/include/codec/SkCodec.h
+++ b/include/codec/SkCodec.h
@@ -657,18 +657,7 @@ private:
return kUnimplemented;
}
- // Naive default version just calls onGetScanlines on temp memory.
- virtual bool onSkipScanlines(int countLines) {
- // FIXME (msarett): Make this a pure virtual and always override this.
- SkAutoMalloc storage(fDstInfo.minRowBytes());
-
- // Note that we pass 0 to rowBytes so we continue to use the same memory.
- // Also note that while getScanlines checks that rowBytes is big enough,
- // onGetScanlines bypasses that check.
- // Calling the virtual method also means we do not double count
- // countLines.
- return countLines == this->onGetScanlines(storage.get(), countLines, 0);
- }
+ virtual bool onSkipScanlines(int /*countLines*/) { return false; }
virtual int onGetScanlines(void* /*dst*/, int /*countLines*/, size_t /*rowBytes*/) { return 0; }
« no previous file with comments | « no previous file | src/codec/SkBmpCodec.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698