Lines Matching refs:sampleSize
17 static bool is_valid_sample_size(int sampleSize) { in is_valid_sample_size() argument
19 return sampleSize > 0; in is_valid_sample_size()
236 int sampleSize = std::min(sampleX, sampleY); in computeSampleSize() local
237 auto computedSize = this->getSampledDimensions(sampleSize); in computeSampleSize()
239 return sampleSize; in computeSampleSize()
242 if (computedSize == fInfo.dimensions() || sampleSize == 1) { in computeSampleSize()
251 auto smaller = this->getSampledDimensions(sampleSize + 1); in computeSampleSize()
253 return sampleSize + 1; in computeSampleSize()
258 return sampleSize; in computeSampleSize()
261 sampleSize++; in computeSampleSize()
272 return sampleSize; in computeSampleSize()
276 while (sampleSize > 2) { in computeSampleSize()
277 auto bigger = this->getSampledDimensions(sampleSize - 1); in computeSampleSize()
280 return sampleSize - 1; in computeSampleSize()
282 sampleSize--; in computeSampleSize()
289 SkISize SkAndroidCodec::getSampledDimensions(int sampleSize) const { in getSampledDimensions()
290 if (!is_valid_sample_size(sampleSize)) { in getSampledDimensions()
295 if (1 == sampleSize) { in getSampledDimensions()
299 auto dims = this->onGetSampledDimensions(sampleSize); in getSampledDimensions()
316 SkISize SkAndroidCodec::getSampledSubsetDimensions(int sampleSize, const SkIRect& subset) const { in getSampledSubsetDimensions() argument
317 if (!is_valid_sample_size(sampleSize)) { in getSampledSubsetDimensions()
331 return this->getSampledDimensions(sampleSize); in getSampledSubsetDimensions()
336 return {get_scaled_dimension(subset.width(), sampleSize), in getSampledSubsetDimensions()
337 get_scaled_dimension(subset.height(), sampleSize)}; in getSampledSubsetDimensions()