Lines Matching refs:TestImageGenerator
158 class TestImageGenerator : public SkImageGenerator { class
171 TestImageGenerator(TestType type, skiatest::Reporter* reporter, in TestImageGenerator() function in TestImageGenerator
176 virtual ~TestImageGenerator() { } in ~TestImageGenerator()
180 return SkImageInfo::Make(TestImageGenerator::Width(), TestImageGenerator::Height(), in GetMyInfo()
199 TestImageGenerator::PMColor(), info.width()); in onGetPixels()
205 ctable[0] = TestImageGenerator::PMColor(); in onGetPixels()
214 SkPixel32ToPixel16(TestImageGenerator::PMColor()), info.width()); in onGetPixels()
233 REPORTER_ASSERT(reporter, TestImageGenerator::Width() == bm.width()); in check_test_image_generator_bitmap()
234 REPORTER_ASSERT(reporter, TestImageGenerator::Height() == bm.height()); in check_test_image_generator_bitmap()
243 if (TestImageGenerator::Color() != bm.getColor(x, y)) { in check_test_image_generator_bitmap()
251 static void check_pixelref(TestImageGenerator::TestType type, in check_pixelref()
255 SkAutoTDelete<SkImageGenerator> gen(new TestImageGenerator(type, reporter, colorType)); in check_pixelref()
261 if (TestImageGenerator::kSucceedGetPixels_TestType == type) { in check_pixelref()
263 } else if (TestImageGenerator::kFailGetPixels_TestType == type) { in check_pixelref()
281 check_pixelref(TestImageGenerator::kFailGetPixels_TestType, reporter, nullptr, in DEF_TEST()
283 check_pixelref(TestImageGenerator::kSucceedGetPixels_TestType, reporter, nullptr, in DEF_TEST()
289 check_pixelref(TestImageGenerator::kFailGetPixels_TestType, reporter, pool, in DEF_TEST()
292 check_pixelref(TestImageGenerator::kSucceedGetPixels_TestType, reporter, pool, in DEF_TEST()
300 check_pixelref(TestImageGenerator::kFailGetPixels_TestType, reporter, globalPool, in DEF_TEST()
302 check_pixelref(TestImageGenerator::kSucceedGetPixels_TestType, reporter, globalPool, in DEF_TEST()
310 const TestImageGenerator::TestType testTypes[] = { in DEF_TEST()
311 TestImageGenerator::kFailGetPixels_TestType, in DEF_TEST()
312 TestImageGenerator::kSucceedGetPixels_TestType, in DEF_TEST()
320 TestImageGenerator::TestType test = testTypes[i]; in DEF_TEST()
322 SkImageGenerator* gen = new TestImageGenerator(test, r, testColorType); in DEF_TEST()
329 REPORTER_ASSERT(r, TestImageGenerator::Width() == image->width()); in DEF_TEST()
330 REPORTER_ASSERT(r, TestImageGenerator::Height() == image->height()); in DEF_TEST()
334 bitmap.allocN32Pixels(TestImageGenerator::Width(), TestImageGenerator::Height()); in DEF_TEST()
339 if (TestImageGenerator::kSucceedGetPixels_TestType == test) { in DEF_TEST()
341 r, TestImageGenerator::Color() == bitmap.getColor(0, 0)); in DEF_TEST()