Lines Matching defs:size
32 static SkISize times(const SkISize& size, float factor) {
33 return { (int) (size.width() * factor), (int) (size.height() * factor) };
36 static SkISize plus(const SkISize& size, int term) {
37 return { size.width() + term, size.height() + term };
40 static bool invalid(const SkISize& size) {
41 return size.width() < 1 || size.height() < 1;
83 for (SkISize size : downscales) {
84 const auto requested = size;
85 const int computedSampleSize = codec->computeSampleSize(&size);
86 REPORTER_ASSERT(r, size.width() >= 1 && size.height() >= 1);
89 REPORTER_ASSERT(r, size == requested || invalid(requested));
91 REPORTER_ASSERT(r, size == dims);
94 if (size.width() >= dims.width() || size.height() >= dims.height()) {
95 ERRORF(r, "File %s's computed sample size (%i) is bigger than"
98 size.width(), size.height());
100 REPORTER_ASSERT(r, size.width() >= requested.width() &&
101 size.height() >= requested.height());
102 REPORTER_ASSERT(r, size.width() < dims.width() &&
103 size.height() < dims.height());
110 for (SkISize size : upscales) {
111 const int computedSampleSize = codec->computeSampleSize(&size);
113 REPORTER_ASSERT(r, dims == size);
118 // but the ImageDecoder API takes an arbitrary size. It then uses
124 SkISize size = sampledDims;
125 const int computedSampleSize = codec->computeSampleSize(&size);
126 if (sampledDims != size) {
128 " sample size of %i\n\tsampledDimensions: %i x %i\t"
132 size.width(), size.height());