From 9972c424ea5eaa2d78e06ae068abc86fd408e0e3 Mon Sep 17 00:00:00 2001 From: msarett Date: Wed, 10 Feb 2016 08:39:37 -0800 Subject: [PATCH] Clean up comments in SkSwizzler BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1690583002 Review URL: https://codereview.chromium.org/1690583002 --- src/codec/SkSwizzler.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/codec/SkSwizzler.cpp b/src/codec/SkSwizzler.cpp index f9f2120..1337368 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 { -- 2.7.4