Lines Matching refs:codec
8 #include "include/codec/SkCodec.h"
11 #include "src/codec/SkCodecPriv.h"
12 #include "src/codec/SkSampledCodec.h"
13 #include "src/codec/SkSampler.h"
16 SkSampledCodec::SkSampledCodec(SkCodec* codec)
17 : INHERITED(codec)
21 SkISize preSampledSize = this->codec()->dimensions();
30 if (this->codec()->getEncodedFormat() == SkEncodedImageFormat::kJPEG) {
38 return this->codec()->getScaledDimensions(get_scale_from_sample_size(sampleSize));
52 // this->codec() will scale to this size.
53 preSampledSize = this->codec()->getScaledDimensions(scale);
77 if (!subset || subset->size() == this->codec()->dimensions()) {
78 if (this->codec()->dimensionsSupported(info.dimensions())) {
79 return this->codec()->getPixels(info, pixels, rowBytes, &options);
82 // If the native codec does not support the requested scale, scale by sampling.
89 if (!this->codec()->dimensionsSupported(scaledSize)) {
90 // If the native codec does not support the requested scale, scale by sampling.
111 const SkCodec::Result startResult = this->codec()->startIncrementalDecode(
115 const SkCodec::Result incResult = this->codec()->incrementalDecode(&rowsDecoded);
122 this->codec()->fillIncompleteImage(scaledInfo, pixels, rowBytes,
138 SkCodec::Result result = this->codec()->startScanlineDecode(scaledInfo,
145 // requested, or the this->codec() is handling the scale.
148 SkASSERT(this->codec()->getScanlineOrder() == SkCodec::kTopDown_SkScanlineOrder);
149 if (!this->codec()->skipScanlines(scaledSubsetY)) {
150 this->codec()->fillIncompleteImage(info, pixels, rowBytes, options.fZeroInitialized,
155 int decodedLines = this->codec()->getScanlines(pixels, scaledSubsetHeight, rowBytes);
181 // Update the subset to account for scaling done by this->codec().
222 const SkCodec::Result startResult = this->codec()->startIncrementalDecode(nativeInfo,
225 SkSampler* sampler = this->codec()->getSampler(true);
240 const SkCodec::Result incResult = this->codec()->incrementalDecode(&rowsDecoded);
247 this->codec()->fillIncompleteImage(info, pixels, rowBytes, options.fZeroInitialized,
263 SkCodec::Result result = this->codec()->startScanlineDecode(nativeInfo,
271 SkSampler* sampler = this->codec()->getSampler(true);
283 switch(this->codec()->getScanlineOrder()) {
285 if (!this->codec()->skipScanlines(startY)) {
286 this->codec()->fillIncompleteImage(info, pixels, rowBytes, options.fZeroInitialized,
292 if (1 != this->codec()->getScanlines(pixelPtr, 1, rowBytes)) {
293 this->codec()->fillIncompleteImage(info, pixels, rowBytes,
298 if (!this->codec()->skipScanlines(sampleY - 1)) {
299 this->codec()->fillIncompleteImage(info, pixels, rowBytes,
313 int srcY = this->codec()->nextScanline();
317 if (1 != this->codec()->getScanlines(pixelPtr, 1, rowBytes)) {
321 if (!this->codec()->skipScanlines(1)) {
331 // We handle filling uninitialized memory here instead of using this->codec().
332 // this->codec() does not know that we are sampling.
335 int srcY = this->codec()->outputScanline(y);