aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/codec
diff options
context:
space:
mode:
authorGravatar msarett <msarett@google.com>2016-02-10 08:39:37 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-02-10 08:39:37 -0800
commit9972c424ea5eaa2d78e06ae068abc86fd408e0e3 (patch)
treece9c9d3194aae9f9a860af8f53e84029e59e1efb /src/codec
parente5fe9a42d487c8648101c6f8454575d6de1acafa (diff)
Clean up comments in SkSwizzler
Diffstat (limited to 'src/codec')
-rw-r--r--src/codec/SkSwizzler.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/codec/SkSwizzler.cpp b/src/codec/SkSwizzler.cpp
index f9f212072e..133736879f 100644
--- a/src/codec/SkSwizzler.cpp
+++ b/src/codec/SkSwizzler.cpp
@@ -929,15 +929,17 @@ SkSwizzler::SkSwizzler(RowProc fastProc, RowProc proc, const SkPMColor* ctable,
{}
int SkSwizzler::onSetSampleX(int sampleX) {
- SkASSERT(sampleX > 0); // Surely there is an upper limit? Should there be
- // way to report failure?
+ SkASSERT(sampleX > 0);
+
fSampleX = sampleX;
fSrcOffsetUnits = (get_start_coord(sampleX) + fSrcOffset) * fSrcBPP;
fDstOffsetBytes = (fDstOffset / sampleX) * fDstBPP;
fSwizzleWidth = get_scaled_dimension(fSrcWidth, sampleX);
fAllocatedWidth = get_scaled_dimension(fDstWidth, sampleX);
- // The optimized swizzler routines do not (yet) support sampling.
+ // The optimized swizzler functions do not support sampling. Sampled swizzles
+ // are already fast because they skip pixels. We haven't seen a situation
+ // where speeding up sampling has a significant impact on total decode time.
if (1 == fSampleX && fFastProc) {
fActualProc = fFastProc;
} else {