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

Unified Diff: src/codec/SkWebpAdapterCodec.cpp

Issue 1518743002: Add reallyHasAlpha() to SkAndroidCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Change comment on onReallyHasAlpha Created 5 years 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
« no previous file with comments | « src/codec/SkWebpAdapterCodec.h ('k') | src/codec/SkWebpCodec.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkWebpAdapterCodec.cpp
diff --git a/src/codec/SkWebpAdapterCodec.cpp b/src/codec/SkWebpAdapterCodec.cpp
index fb1eacee77ae0161b2e5b0ec43b2d6db1993dac6..5aefe5d805ec6c93d967c90941b93927e5bd8461 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);
}
« no previous file with comments | « src/codec/SkWebpAdapterCodec.h ('k') | src/codec/SkWebpCodec.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698