Home | History | Annotate | Download | only in tests

Lines Matching refs:subset

222         SkBitmap subset;
224 // Extract a subset which has the same width as the original. This
229 if (kUnknown_SkColorType != bitmap.colorType() && bitmap.extractSubset(&subset, r)) {
230 REPORTER_ASSERT(reporter, subset.width() == W);
231 REPORTER_ASSERT(reporter, subset.height() == 2);
232 REPORTER_ASSERT(reporter, subset.alphaType() == bitmap.alphaType());
233 REPORTER_ASSERT(reporter, subset.isVolatile() == true);
235 // Test copying an extracted subset.
238 bool success = subset.copyTo(&copy, gPairs[j].fColorType);
246 // When performing a copy of an extracted subset, the gen id should
248 REPORTER_ASSERT(reporter, copy.getGenerationID() != subset.getGenerationID());
254 SkAutoLockPixels alp0(subset);
257 bool hasCT = subset.getColorTable() != NULL;
265 if (bitmap.extractSubset(&subset, r)) {
266 REPORTER_ASSERT(reporter, subset.alphaType() == bitmap.alphaType());
267 REPORTER_ASSERT(reporter, subset.isVolatile() == false);
384 SkBitmap src, subset;
403 // Either copy src or extract into 'subset', which is used
415 srcReady = src.extractSubset(&subset, r);
417 srcReady = src.copyTo(&subset);
420 // Not all configurations will generate a valid 'subset'.
446 writeCoordPixels(subset, coords);
462 subset.copyPixelsTo(buf, bufSize, bufBm.rowBytes() * 3)
466 reportCopyVerification(subset, bufBm, coords,
476 bufBm.installPixels(info, buf, subset.rowBytes());
477 successExpected = subset.getSafeSize() <= bufSize;
479 subset.copyPixelsTo(buf, bufSize) ==
482 reportCopyVerification(subset, bufBm, coords,
488 bufBm.installPixels(info, buf, subset.rowBytes()+1);
491 subset.copyPixelsTo(buf, bufSize,
492 subset.rowBytes()+1) == successExpected);
494 reportCopyVerification(subset, bufBm, coords,
504 subset.copyPixelsTo(buf, bufSize, bufBm.rowBytes()-1)
507 reportCopyVerification(subset, bufBm, coords,
518 subset.copyPixelsFrom(buf, bufSize, 1) == false);
529 subset.copyPixelsFrom(buf, bufSize, bufBm.rowBytes()) ==
531 reportCopyVerification(bufBm, subset, coords,
539 subset.copyPixelsFrom(buf, 1, subset.rowBytes()) ==
579 // method. Here we explicitly test subset copies.