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

Unified Diff: src/codec/SkBmpCodec.cpp

Issue 1332053002: Fill incomplete images in SkCodec parent class (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Use aligned memory in swizzler test Created 5 years, 2 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 | « src/codec/SkBmpCodec.h ('k') | src/codec/SkBmpMaskCodec.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkBmpCodec.cpp
diff --git a/src/codec/SkBmpCodec.cpp b/src/codec/SkBmpCodec.cpp
index da3e0a28070800c3e3044c192e19653eea3dc1cd..1aa43f583cbcc2a536c6f1b8e8fb6dd15acb7be5 100644
--- a/src/codec/SkBmpCodec.cpp
+++ b/src/codec/SkBmpCodec.cpp
@@ -550,18 +550,6 @@ int32_t SkBmpCodec::getDstRow(int32_t y, int32_t height) const {
}
/*
- * Get the destination row to start filling from
- * Used to fill the remainder of the image on incomplete input for bmps
- * This is tricky since bmps may be kTopDown or kBottomUp. For kTopDown,
- * we start filling from where we left off, but for kBottomUp we start
- * filling at the top of the image.
- */
-void* SkBmpCodec::getDstStartRow(void* dst, size_t dstRowBytes, int32_t y) const {
- return (SkCodec::kTopDown_SkScanlineOrder == fRowOrder) ?
- SkTAddOffset<void*>(dst, y * dstRowBytes) : dst;
-}
-
-/*
* Compute the number of colors in the color table
*/
uint32_t SkBmpCodec::computeNumColors(uint32_t numColors) {
@@ -588,14 +576,10 @@ SkCodec::Result SkBmpCodec::onStartScanlineDecode(const SkImageInfo& dstInfo,
return prepareToDecode(dstInfo, options, inputColorPtr, inputColorCount);
}
-SkCodec::Result SkBmpCodec::onGetScanlines(void* dst, int count, size_t rowBytes) {
+int SkBmpCodec::onGetScanlines(void* dst, int count, size_t rowBytes) {
// Create a new image info representing the portion of the image to decode
SkImageInfo rowInfo = this->dstInfo().makeWH(this->dstInfo().width(), count);
// Decode the requested rows
return this->decodeRows(rowInfo, dst, rowBytes, this->options());
}
-
-int SkBmpCodec::onNextScanline() const {
- return this->getDstRow(this->INHERITED::onNextScanline(), this->dstInfo().height());
-}
« no previous file with comments | « src/codec/SkBmpCodec.h ('k') | src/codec/SkBmpMaskCodec.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698