Lines Matching refs:desiredSize
216 int SkAndroidCodec::computeSampleSize(SkISize* desiredSize) const { in computeSampleSize()
217 SkASSERT(desiredSize); in computeSampleSize()
219 if (!desiredSize || *desiredSize == fInfo.dimensions()) { in computeSampleSize()
223 if (smaller_than(fInfo.dimensions(), *desiredSize)) { in computeSampleSize()
224 *desiredSize = fInfo.dimensions(); in computeSampleSize()
229 if (desiredSize->width() < 1 || desiredSize->height() < 1) { in computeSampleSize()
230 *desiredSize = SkISize::Make(std::max(1, desiredSize->width()), in computeSampleSize()
231 std::max(1, desiredSize->height())); in computeSampleSize()
238 int sampleX = fInfo.width() / desiredSize->width(); in computeSampleSize()
239 int sampleY = fInfo.height() / desiredSize->height(); in computeSampleSize()
242 if (computedSize == *desiredSize) { in computeSampleSize()
248 *desiredSize = computedSize; in computeSampleSize()
252 if (strictly_bigger_than(computedSize, *desiredSize)) { in computeSampleSize()
256 if (smaller == *desiredSize) { in computeSampleSize()
259 if (smaller == computedSize || smaller_than(smaller, *desiredSize)) { in computeSampleSize()
261 *desiredSize = computedSize; in computeSampleSize()
272 if (!smaller_than(computedSize, *desiredSize)) { in computeSampleSize()
275 *desiredSize = computedSize; in computeSampleSize()
282 if (bigger == *desiredSize || !smaller_than(bigger, *desiredSize)) { in computeSampleSize()
283 *desiredSize = bigger; in computeSampleSize()
289 *desiredSize = fInfo.dimensions(); in computeSampleSize()