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()
240 int sampleSize = std::min(sampleX, sampleY); in computeSampleSize() local
241 auto computedSize = this->getSampledDimensions(sampleSize); in computeSampleSize()
243 return sampleSize; in computeSampleSize()
246 if (computedSize == fInfo.dimensions() || sampleSize == 1) { in computeSampleSize()
255 auto smaller = this->getSampledDimensions(sampleSize + 1); in computeSampleSize()
257 return sampleSize + 1; in computeSampleSize()
262 return sampleSize; in computeSampleSize()
265 sampleSize++; in computeSampleSize()
276 return sampleSize; in computeSampleSize()
280 while (sampleSize > 2) { in computeSampleSize()
281 auto bigger = this->getSampledDimensions(sampleSize - 1); in computeSampleSize()
284 return sampleSize - 1; in computeSampleSize()
286 sampleSize--; in computeSampleSize()
293 SkISize SkAndroidCodec::getSampledDimensions(int sampleSize) const { in getSampledDimensions()
294 if (!is_valid_sample_size(sampleSize)) { in getSampledDimensions()
299 if (1 == sampleSize) { in getSampledDimensions()
303 auto dims = this->onGetSampledDimensions(sampleSize); in getSampledDimensions()
320 SkISize SkAndroidCodec::getSampledSubsetDimensions(int sampleSize, const SkIRect& subset) const { in getSampledSubsetDimensions() argument
321 if (!is_valid_sample_size(sampleSize)) { in getSampledSubsetDimensions()
335 return this->getSampledDimensions(sampleSize); in getSampledSubsetDimensions()
340 return {get_scaled_dimension(subset.width(), sampleSize), in getSampledSubsetDimensions()
341 get_scaled_dimension(subset.height(), sampleSize)}; in getSampledSubsetDimensions()