Lines Matching refs:sampleSize
15 static bool is_valid_sample_size(int sampleSize) { in is_valid_sample_size() argument
17 return sampleSize > 0; in is_valid_sample_size()
228 int sampleSize = std::min(sampleX, sampleY); in computeSampleSize() local
229 auto computedSize = this->getSampledDimensions(sampleSize); in computeSampleSize()
231 return sampleSize; in computeSampleSize()
234 if (computedSize == origDims || sampleSize == 1) { in computeSampleSize()
243 auto smaller = this->getSampledDimensions(sampleSize + 1); in computeSampleSize()
245 return sampleSize + 1; in computeSampleSize()
250 return sampleSize; in computeSampleSize()
253 sampleSize++; in computeSampleSize()
264 return sampleSize; in computeSampleSize()
268 while (sampleSize > 2) { in computeSampleSize()
269 auto bigger = this->getSampledDimensions(sampleSize - 1); in computeSampleSize()
272 return sampleSize - 1; in computeSampleSize()
274 sampleSize--; in computeSampleSize()
281 SkISize SkAndroidCodec::getSampledDimensions(int sampleSize) const { in getSampledDimensions()
282 if (!is_valid_sample_size(sampleSize)) { in getSampledDimensions()
287 if (1 == sampleSize) { in getSampledDimensions()
291 return this->onGetSampledDimensions(sampleSize); in getSampledDimensions()
302 SkISize SkAndroidCodec::getSampledSubsetDimensions(int sampleSize, const SkIRect& subset) const { in getSampledSubsetDimensions() argument
303 if (!is_valid_sample_size(sampleSize)) { in getSampledSubsetDimensions()
317 return this->getSampledDimensions(sampleSize); in getSampledSubsetDimensions()
322 return {get_scaled_dimension(subset.width(), sampleSize), in getSampledSubsetDimensions()
323 get_scaled_dimension(subset.height(), sampleSize)}; in getSampledSubsetDimensions()