Lines Matching refs:desiredSize
203 int SkAndroidCodec::computeSampleSize(SkISize* desiredSize) const { in computeSampleSize()
204 SkASSERT(desiredSize); in computeSampleSize()
207 if (!desiredSize || *desiredSize == origDims) { in computeSampleSize()
211 if (smaller_than(origDims, *desiredSize)) { in computeSampleSize()
212 *desiredSize = origDims; in computeSampleSize()
217 if (desiredSize->width() < 1 || desiredSize->height() < 1) { in computeSampleSize()
218 *desiredSize = SkISize::Make(std::max(1, desiredSize->width()), in computeSampleSize()
219 std::max(1, desiredSize->height())); in computeSampleSize()
226 int sampleX = origDims.width() / desiredSize->width(); in computeSampleSize()
227 int sampleY = origDims.height() / desiredSize->height(); in computeSampleSize()
230 if (computedSize == *desiredSize) { in computeSampleSize()
236 *desiredSize = computedSize; in computeSampleSize()
240 if (strictly_bigger_than(computedSize, *desiredSize)) { in computeSampleSize()
244 if (smaller == *desiredSize) { in computeSampleSize()
247 if (smaller == computedSize || smaller_than(smaller, *desiredSize)) { in computeSampleSize()
249 *desiredSize = computedSize; in computeSampleSize()
260 if (!smaller_than(computedSize, *desiredSize)) { in computeSampleSize()
263 *desiredSize = computedSize; in computeSampleSize()
270 if (bigger == *desiredSize || !smaller_than(bigger, *desiredSize)) { in computeSampleSize()
271 *desiredSize = bigger; in computeSampleSize()
277 *desiredSize = origDims; in computeSampleSize()