aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/codec/SkJpegCodec.h
diff options
context:
space:
mode:
authorGravatar emmaleer <emmaleer@google.com>2015-08-13 13:59:21 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-08-13 13:59:21 -0700
commitc7993d747fff40328b6666845761efbbbfe720b7 (patch)
tree3139206bc4b499ce0267c4f6d43c280ebb64802b /src/codec/SkJpegCodec.h
parent00ba1e07f3a7200c0e97aaea88b5963edb42f0f7 (diff)
Revert of SkScaledCodec class (patchset #34 id:660001 of https://codereview.chromium.org/1260673002/ )
Reason for revert: Seg-faulting: http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Release/builds/1608/steps/dm/logs/stdio Original issue's description: > SkScaledCodec class > > This class does scaling by using a scanlineDecoder. > getScanlines and skipScanlines are used for y sampling, > the swizzler is used for x sampling > > this class is currently only working for png and jpeg images > I will update other Codec types to work soon > > For SkJpegCodec to implement width wise swizzling it now > uses a swizzler. I ran performance tests on this change. > Here are the performance test results: > https://docs.google.com/a/google.com/spreadsheets/d/1D7-Q_GXD_dI68LZO005NNvb8Wq2Ee0wEBEPG72671yw/edit?usp=sharing > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/0944100ac89f797714eeae0cf2875e2335ff52ee > > Committed: https://skia.googlesource.com/skia/+/d518ea7927f9f4e0ed5b4134d1b4f48243855a47 TBR=scroggo@google.com,msarett@google.com,djsollen@google.com,mtklein@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1294613002
Diffstat (limited to 'src/codec/SkJpegCodec.h')
-rw-r--r--src/codec/SkJpegCodec.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/codec/SkJpegCodec.h b/src/codec/SkJpegCodec.h
index fac7d96075..62a5bbc4cf 100644
--- a/src/codec/SkJpegCodec.h
+++ b/src/codec/SkJpegCodec.h
@@ -110,13 +110,19 @@ private:
bool setOutputColorSpace(const SkImageInfo& dst);
/*
- * Checks if we can natively scale to the requested dimensions and natively scales the
- * dimensions if possible
+ * Checks if we can scale to the requested dimensions and scales the dimensions
+ * if possible
*/
- bool nativelyScaleToDimensions(uint32_t width, uint32_t height);
+ bool scaleToDimensions(uint32_t width, uint32_t height);
+
+ /*
+ * Create the swizzler based on the encoded format
+ */
+ void initializeSwizzler(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes,
+ const Options& options);
SkAutoTDelete<JpegDecoderMgr> fDecoderMgr;
-
+
friend class SkJpegScanlineDecoder;
typedef SkCodec INHERITED;