// TODO: fInfo is now just a cache of SkCodec's SkImageInfo. No need to // cache and return a reference here, once Android call-sites are updated. const SkImageInfo& getInfo() const { return fInfo; }
/** *AdditionaloptionstopasstogetAndroidPixels().
*/ // FIXME: It's a bit redundant to name these AndroidOptions when this class is already // called SkAndroidCodec. On the other hand, it's may be a bit confusing to call // these Options when SkCodec has a slightly different set of Options. Maybe these // should be DecodeOptions or SamplingOptions? struct AndroidOptions : public SkCodec::Options {
AndroidOptions()
: SkCodec::Options()
, fSampleSize(1)
{}
/** *Theclientmayprovideanintegerdownscalefactorforthedecode. *Thecodecmayimplementthisdownscalingbysamplingoranother *methodifitismoreefficient. * *Thedefaultis1,representingnodownscaling.
*/ int fSampleSize;
};
/** *Decodeintothegivenpixels,ablockofmemoryofsizeat *least(info.fHeight-1)*rowBytes+(info.fWidth* *bytesPerPixel) * *Repeatedcallstothisfunctionshouldgivethesameresults, *allowingthePixelReftobeimmutable. * *@paraminfoAdescriptionoftheformat(config,size) *expectedbythecaller.Thiscansimplybeidentical *totheinforeturnedbygetInfo(). * *Thiscontractalsoallowsthecallertospecify *differentoutput-configs,whichtheimplementationcan *decidetosupportornot. * *AsizethatdoesnotmatchgetInfo()impliesarequest *toscaleorsubset.Ifthecodeccannotperformthis *scalingorsubsetting,itwillreturnanerrorcode. * *TheAndroidOptionsobjectisalsousedtospecifyanyrequestedscalingorsubsetting *usingoptions->fSampleSizeandoptions->fSubset.IfNULL,thedefaults(asspecifiedabove *forAndroidOptions)areused. * *@returnResultkSuccess,oranothervalueexplainingthetypeoffailure.
*/ // FIXME: It's a bit redundant to name this getAndroidPixels() when this class is already // called SkAndroidCodec. On the other hand, it's may be a bit confusing to call // this getPixels() when it is a slightly different API than SkCodec's getPixels(). // Maybe this should be decode() or decodeSubset()?
SkCodec::Result getAndroidPixels(const SkImageInfo& info, void* pixels, size_t rowBytes, const AndroidOptions* options);
// TODO(issues.skia.org/363544350): This API only works for JPEG images. Remove this API once // it is no longer used. bool getAndroidGainmap(SkGainmapInfo* outInfo,
std::unique_ptr<SkStream>* outGainmapImageStream);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.