aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/codec/SkWebpAdapterCodec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/codec/SkWebpAdapterCodec.cpp')
-rw-r--r--src/codec/SkWebpAdapterCodec.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/codec/SkWebpAdapterCodec.cpp b/src/codec/SkWebpAdapterCodec.cpp
index fb1eacee77..5aefe5d805 100644
--- a/src/codec/SkWebpAdapterCodec.cpp
+++ b/src/codec/SkWebpAdapterCodec.cpp
@@ -10,17 +10,16 @@
#include "SkWebpAdapterCodec.h"
SkWebpAdapterCodec::SkWebpAdapterCodec(SkWebpCodec* codec)
- : INHERITED(codec->getInfo())
- , fCodec(codec)
+ : INHERITED(codec)
{}
SkISize SkWebpAdapterCodec::onGetSampledDimensions(int sampleSize) const {
float scale = get_scale_from_sample_size(sampleSize);
- return fCodec->getScaledDimensions(scale);
+ return this->codec()->getScaledDimensions(scale);
}
bool SkWebpAdapterCodec::onGetSupportedSubset(SkIRect* desiredSubset) const {
- return fCodec->getValidSubset(desiredSubset);
+ return this->codec()->getValidSubset(desiredSubset);
}
SkCodec::Result SkWebpAdapterCodec::onGetAndroidPixels(const SkImageInfo& info, void* pixels,
@@ -41,6 +40,6 @@ SkCodec::Result SkWebpAdapterCodec::onGetAndroidPixels(const SkImageInfo& info,
SkCodec::Options codecOptions;
codecOptions.fZeroInitialized = options.fZeroInitialized;
codecOptions.fSubset = options.fSubset;
- return fCodec->getPixels(info, pixels, rowBytes, &codecOptions, options.fColorPtr,
+ return this->codec()->getPixels(info, pixels, rowBytes, &codecOptions, options.fColorPtr,
options.fColorCount);
}