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

Unified Diff: src/codec/SkBmpRLECodec.cpp

Issue 1372973002: Move all knowledge of X sampling into SkScaledCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@codecSDmerge
Patch Set: Fix ico, sampling Created 5 years, 3 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
Index: src/codec/SkBmpRLECodec.cpp
diff --git a/src/codec/SkBmpRLECodec.cpp b/src/codec/SkBmpRLECodec.cpp
index e76a23ed14ad78ac93f9bd6b73a24ce69beb6f31..5896601012c28aefeb3549d00370bf4978781f07 100644
--- a/src/codec/SkBmpRLECodec.cpp
+++ b/src/codec/SkBmpRLECodec.cpp
@@ -43,6 +43,8 @@ SkCodec::Result SkBmpRLECodec::onGetPixels(const SkImageInfo& dstInfo,
// Subsets are not supported.
return kUnimplemented;
}
+ // FIXME: This may be my misunderstanding of this class, but it seems like
+ // scaling could be supported?
msarett 2015/10/01 19:34:33 Yes sampling in the x dimension is already impleme
scroggo 2015/10/01 21:16:57 What do you think is the right way to handle it? I
msarett 2015/10/01 22:53:06 I haven't given this enough thought yet. In my mi
if (dstInfo.dimensions() != this->getInfo().dimensions()) {
SkCodecPrintf("Error: scaling not supported.\n");
return kInvalidScale;
@@ -269,7 +271,8 @@ SkCodec::Result SkBmpRLECodec::prepareToDecode(const SkImageInfo& dstInfo,
return SkCodec::kInvalidConversion;
}
- SkScaledCodec::ComputeSampleSize(dstInfo, this->getInfo(), &fSampleX, NULL);
+ SkScaledCodec::ComputeSampleSize(dstInfo.dimensions(), this->getInfo().dimensions(),
+ &fSampleX, NULL);
return SkCodec::kSuccess;
}

Powered by Google App Engine
This is Rietveld 408576698