/third_party/skia/tests/ |
H A D | StrokeTest.cpp | 23 static void test_strokecubic(skiatest::Reporter* reporter) { in test_strokecubic() argument 52 static void test_strokerect(skiatest::Reporter* reporter) { in test_strokerect() argument 75 REPORTER_ASSERT(reporter, equal(outer, fillPath.getBounds())); in test_strokerect() 79 REPORTER_ASSERT(reporter, SkPathPriv::IsNestedFillRects(fillPath, nested) == isMiter); in test_strokerect() 83 REPORTER_ASSERT(reporter, equal(nested[0], outer)); in test_strokerect() 84 REPORTER_ASSERT(reporter, equal(nested[1], inner)); in test_strokerect() 89 static void test_strokerec_equality(skiatest::Reporter* reporter) { in test_strokerec_equality() argument 93 REPORTER_ASSERT(reporter, s1.hasEqualEffect(s2)); in test_strokerec_equality() 97 REPORTER_ASSERT(reporter, !s1.hasEqualEffect(s2)); in test_strokerec_equality() 100 REPORTER_ASSERT(reporter, s in test_strokerec_equality() 165 test_big_stroke(skiatest::Reporter* reporter) test_big_stroke() argument [all...] |
H A D | SurfaceDrawContextTest.cpp | 26 static void check_instantiation_status(skiatest::Reporter* reporter, in check_instantiation_status() argument 29 REPORTER_ASSERT(reporter, sdc->asRenderTargetProxy()->isInstantiated() == wrappedExpectation); in check_instantiation_status() 32 REPORTER_ASSERT(reporter, tProxy); in check_instantiation_status() 34 REPORTER_ASSERT(reporter, tProxy->isInstantiated() == wrappedExpectation); in check_instantiation_status() 37 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SurfaceDrawContextTest, reporter, ctxInfo) { in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 45 check_instantiation_status(reporter, sdc.get(), false); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 48 REPORTER_ASSERT(reporter, tProxy); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 50 REPORTER_ASSERT(reporter, tProxy->instantiate(dContext->priv().resourceProvider())); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 52 check_instantiation_status(reporter, sdc.get(), true); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 59 check_instantiation_status(reporter, sd in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() [all...] |
H A D | DiscardableMemoryPoolTest.cpp | 15 DEF_TEST(DiscardableMemoryPool, reporter) { in DEF_TEST() 18 REPORTER_ASSERT(reporter, 0 == pool->getRAMUsed()); in DEF_TEST() 21 REPORTER_ASSERT(reporter, dm1->data() != nullptr); in DEF_TEST() 22 REPORTER_ASSERT(reporter, 100 == pool->getRAMUsed()); in DEF_TEST() 24 REPORTER_ASSERT(reporter, 0 == pool->getRAMUsed()); in DEF_TEST() 25 REPORTER_ASSERT(reporter, !dm1->lock()); in DEF_TEST() 29 REPORTER_ASSERT(reporter, 200 == pool->getRAMUsed()); in DEF_TEST() 32 REPORTER_ASSERT(reporter, 200 == pool->getRAMUsed()); in DEF_TEST() 33 REPORTER_ASSERT(reporter, dm2->lock()); in DEF_TEST() 36 REPORTER_ASSERT(reporter, !dm in DEF_TEST() [all...] |
H A D | DeferredDisplayListTest.cpp | 335 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(DDLOperatorEqTest, reporter, ctxInfo) { in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 357 REPORTER_ASSERT(reporter, char1 == char2); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 359 REPORTER_ASSERT(reporter, char1 != char2); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 373 REPORTER_ASSERT(reporter, inval1 != inval2); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 374 REPORTER_ASSERT(reporter, valid != inval1); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 375 REPORTER_ASSERT(reporter, inval1 != valid); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 381 void DDLSurfaceCharacterizationTestImpl(GrDirectContext* dContext, skiatest::Reporter* reporter) { in DDLSurfaceCharacterizationTestImpl() argument 405 REPORTER_ASSERT(reporter, s->draw(ddl)); in DDLSurfaceCharacterizationTestImpl() 423 REPORTER_ASSERT(reporter, !s->draw(ddl), in DDLSurfaceCharacterizationTestImpl() 437 REPORTER_ASSERT(reporter, ! in DDLSurfaceCharacterizationTestImpl() 766 test_make_render_target(skiatest::Reporter* reporter, GrDirectContext* dContext, const SurfaceParameters& params) test_make_render_target() argument 810 DDLMakeRenderTargetTestImpl(GrDirectContext* dContext, skiatest::Reporter* reporter) DDLMakeRenderTargetTestImpl() argument [all...] |
H A D | GradientTest.cpp | 24 static void test_big_grad(skiatest::Reporter* reporter) { in test_big_grad() argument 52 void gradCheck(skiatest::Reporter* reporter, const sk_sp<SkShader>& shader, in gradCheck() 61 REPORTER_ASSERT(reporter, shader->asAGradient(info) == gt); in gradCheck() 63 REPORTER_ASSERT(reporter, info->fColorCount == fColorCount); in gradCheck() 64 REPORTER_ASSERT(reporter, in gradCheck() 66 REPORTER_ASSERT(reporter, in gradCheck() 68 REPORTER_ASSERT(reporter, fTileMode == (SkTileMode)info->fTileMode); in gradCheck() 73 static void none_gradproc(skiatest::Reporter* reporter, const GradRec&, const GradRec&) { in none_gradproc() argument 75 REPORTER_ASSERT(reporter, SkShader::kNone_GradientType == s->asAGradient(nullptr)); in none_gradproc() 78 static void color_gradproc(skiatest::Reporter* reporter, cons argument 89 linear_gradproc(skiatest::Reporter* reporter, const GradRec& buildRec, const GradRec& checkRec) linear_gradproc() argument 99 radial_gradproc(skiatest::Reporter* reporter, const GradRec& buildRec, const GradRec& checkRec) radial_gradproc() argument 111 sweep_gradproc(skiatest::Reporter* reporter, const GradRec& buildRec, const GradRec& checkRec) sweep_gradproc() argument 122 conical_gradproc(skiatest::Reporter* reporter, const GradRec& buildRec, const GradRec& checkRec) conical_gradproc() argument 163 TestGradientShaders(skiatest::Reporter* reporter) TestGradientShaders() argument 194 TestGradientOptimization(skiatest::Reporter* reporter) TestGradientOptimization() argument 276 test_nearly_vertical(skiatest::Reporter* reporter) test_nearly_vertical() argument 288 test_vertical(skiatest::Reporter* reporter) test_vertical() argument 304 test_linear_fuzz(skiatest::Reporter* reporter) test_linear_fuzz() argument 320 test_two_point_conical_zero_radius(skiatest::Reporter* reporter) test_two_point_conical_zero_radius() argument [all...] |
H A D | StreamTest.cpp | 35 static void test_loop_stream(skiatest::Reporter* reporter, SkStream* stream, in test_loop_stream() argument 42 REPORTER_ASSERT(reporter, bytes == len); in test_loop_stream() 43 REPORTER_ASSERT(reporter, !memcmp(tmp, src, len)); in test_loop_stream() 48 REPORTER_ASSERT(reporter, 0 == bytes); in test_loop_stream() 50 REPORTER_ASSERT(reporter, stream->isAtEnd()); in test_loop_stream() 53 static void test_filestreams(skiatest::Reporter* reporter, const char* tmpDir) { in test_filestreams() argument 61 ERRORF(reporter, "Failed to create tmp file %s\n", path.c_str()); in test_filestreams() 72 REPORTER_ASSERT(reporter, stream.isValid()); in test_filestreams() 73 test_loop_stream(reporter, &stream, s, 26, 100); in test_filestreams() 76 test_loop_stream(reporter, stream in test_filestreams() 90 TestWStream(skiatest::Reporter* reporter) TestWStream() argument 147 TestPackedUInt(skiatest::Reporter* reporter) TestPackedUInt() argument 207 compare_peek_to_read(skiatest::Reporter* reporter, SkStream* stream, size_t bytesToPeek) compare_peek_to_read() argument 430 stream_copy_test(skiatest::Reporter* reporter, const void* srcData, size_t N, SkStream* stream) stream_copy_test() argument [all...] |
H A D | YUVCacheTest.cpp | 25 static void check_data(skiatest::Reporter* reporter, SkCachedData* data, in check_data() argument 27 REPORTER_ASSERT(reporter, data->testing_only_getRefCnt() == refcnt); in check_data() 28 REPORTER_ASSERT(reporter, data->testing_only_isInCache() == (kInCache == cacheState)); in check_data() 30 REPORTER_ASSERT(reporter, isLocked == (lockedState == kLocked)); in check_data() 33 DEF_TEST(YUVPlanesCache, reporter) { in DEF_TEST() 47 REPORTER_ASSERT(reporter, !data); in DEF_TEST() 58 check_data(reporter, data, 2, kInCache, kLocked); in DEF_TEST() 61 check_data(reporter, data, 1, kInCache, kUnlocked); in DEF_TEST() 66 REPORTER_ASSERT(reporter, data); in DEF_TEST() 67 REPORTER_ASSERT(reporter, dat in DEF_TEST() [all...] |
H A D | GrAHardwareBufferTest.cpp | 75 static bool check_read(skiatest::Reporter* reporter, const SkBitmap& expectedBitmap, in check_read() argument 83 ERRORF(reporter, "Expected readback pixel (%d, %d) value 0x%08x, got 0x%08x.", in check_read() 101 static void basic_draw_test_helper(skiatest::Reporter* reporter, in basic_draw_test_helper() argument 136 ERRORF(reporter, "Failed to allocated hardware buffer, error: %d", error); in basic_draw_test_helper() 147 ERRORF(reporter, "Failed to lock hardware buffer"); in basic_draw_test_helper() 173 REPORTER_ASSERT(reporter, image); in basic_draw_test_helper() 183 REPORTER_ASSERT(reporter, surface); in basic_draw_test_helper() 194 REPORTER_ASSERT(reporter, surface->readPixels(readbackBitmap, 0, 0)); in basic_draw_test_helper() 195 REPORTER_ASSERT(reporter, check_read(reporter, srcBitma in basic_draw_test_helper() 211 surface_draw_test_helper(skiatest::Reporter* reporter, const sk_gpu_test::ContextInfo& info, GrSurfaceOrigin surfaceOrigin) surface_draw_test_helper() argument [all...] |
H A D | DebugLayerManagerTest.cpp | 16 static void test_basic(skiatest::Reporter* reporter) { in test_basic() argument 48 REPORTER_ASSERT(reporter, frames.size() == 2); in test_basic() 49 REPORTER_ASSERT(reporter, frames[0] == 0); in test_basic() 50 REPORTER_ASSERT(reporter, frames[1] == 10); in test_basic() 56 REPORTER_ASSERT(reporter, image->width() == layerWidth); in test_basic() 57 REPORTER_ASSERT(reporter, image->height() == layerHeight); in test_basic() 61 REPORTER_ASSERT(reporter, paintColor == SK_ColorBLUE); in test_basic() 68 REPORTER_ASSERT(reporter, image->width() == layerWidth); in test_basic() 69 REPORTER_ASSERT(reporter, image->height() == layerHeight); in test_basic() 72 REPORTER_ASSERT(reporter, innerColo in test_basic() [all...] |
H A D | PathOpsExtendedTest.h | 24 extern int comparePaths(skiatest::Reporter* reporter, const char* filename, 27 inline int comparePaths(skiatest::Reporter* reporter, const char* filename, in comparePaths() argument 30 return comparePaths(reporter, filename, one, two, bitmap); in comparePaths() 36 extern bool testPathOp(skiatest::Reporter* reporter, const SkPath& a, const SkPath& b, 38 extern bool testPathOpCheck(skiatest::Reporter* reporter, const SkPath& a, const SkPath& b, 40 extern bool testPathOpFail(skiatest::Reporter* reporter, const SkPath& a, const SkPath& b, 42 extern bool testPathOpFuzz(skiatest::Reporter* reporter, const SkPath& a, const SkPath& b, 46 extern bool testSimplify(skiatest::Reporter* reporter, const SkPath& path, const char* filename); 47 extern bool testSimplifyCheck(skiatest::Reporter* reporter, const SkPath& path, 49 extern bool testSimplifyFail(skiatest::Reporter* reporter, cons [all...] |
H A D | PathOpsDPointTest.cpp | 23 DEF_TEST(PathOpsDPoint, reporter) { in DEF_TEST() 28 REPORTER_ASSERT(reporter, p == pt); in DEF_TEST() 29 REPORTER_ASSERT(reporter, !(pt != pt)); in DEF_TEST() 32 REPORTER_ASSERT(reporter, p == pt); in DEF_TEST() 34 REPORTER_ASSERT(reporter, p == pt); in DEF_TEST() 35 REPORTER_ASSERT(reporter, p.approximatelyEqual(pt)); in DEF_TEST() 38 REPORTER_ASSERT(reporter, p == pt); in DEF_TEST() 39 REPORTER_ASSERT(reporter, p.approximatelyEqual(sPt)); in DEF_TEST() 40 REPORTER_ASSERT(reporter, p.roughlyEqual(pt)); in DEF_TEST() 42 REPORTER_ASSERT(reporter, in DEF_TEST() [all...] |
H A D | OffsetSimplePolyTest.cpp | 10 DEF_TEST(OffsetSimplePoly, reporter) { in DEF_TEST() 40 REPORTER_ASSERT(reporter, SkIsConvexPolygon(rrectPoly.begin(), rrectPoly.count())); in DEF_TEST() 46 REPORTER_ASSERT(reporter, result); in DEF_TEST() 47 REPORTER_ASSERT(reporter, SkIsConvexPolygon(offsetPoly.begin(), offsetPoly.count())); in DEF_TEST() 51 REPORTER_ASSERT(reporter, result); in DEF_TEST() 52 REPORTER_ASSERT(reporter, SkIsConvexPolygon(offsetPoly.begin(), offsetPoly.count())); in DEF_TEST() 53 REPORTER_ASSERT(reporter, offsetPoly.count() == 4); in DEF_TEST() 55 REPORTER_ASSERT(reporter, offsetPoly[0].equals(-95, 45)); in DEF_TEST() 56 REPORTER_ASSERT(reporter, offsetPoly[1].equals(95, 45)); in DEF_TEST() 57 REPORTER_ASSERT(reporter, offsetPol in DEF_TEST() [all...] |
H A D | CanvasStateTest.cpp | 54 OpenLibResult(skiatest::Reporter* reporter) { in OpenLibResult() argument 57 REPORTER_ASSERT(reporter, fLibrary != nullptr, "Failed to open library!"); in OpenLibResult() 88 static void compare(skiatest::Reporter* reporter, SkImage* img0, SkImage* img1) { in compare() argument 102 REPORTER_ASSERT(reporter, img0->peekPixels(&pm[0])); in compare() 103 REPORTER_ASSERT(reporter, img1->peekPixels(&pm[1])); in compare() 105 REPORTER_ASSERT(reporter, pm[0].computeByteSize() == pm[1].computeByteSize()); in compare() 106 REPORTER_ASSERT(reporter, pm[0].rowBytes() == (size_t)pm[0].width() * pm[0].info().bytesPerPixel()); in compare() 107 REPORTER_ASSERT(reporter, pm[1].rowBytes() == (size_t)pm[1].width() * pm[1].info().bytesPerPixel()); in compare() 109 REPORTER_ASSERT(reporter, false); in compare() 113 DEF_TEST(CanvasState_test_complex_layers, reporter) { in DEF_TEST() [all...] |
H A D | InsetConvexPolyTest.cpp | 10 DEF_TEST(InsetConvexPoly, reporter) { in DEF_TEST() 34 REPORTER_ASSERT(reporter, SkIsConvexPolygon(rrectPoly.begin(), rrectPoly.count())); in DEF_TEST() 39 REPORTER_ASSERT(reporter, result); in DEF_TEST() 40 REPORTER_ASSERT(reporter, SkIsConvexPolygon(insetPoly.begin(), insetPoly.count())); in DEF_TEST() 44 REPORTER_ASSERT(reporter, result); in DEF_TEST() 45 REPORTER_ASSERT(reporter, SkIsConvexPolygon(insetPoly.begin(), insetPoly.count())); in DEF_TEST() 46 REPORTER_ASSERT(reporter, insetPoly.count() == 4); in DEF_TEST() 48 REPORTER_ASSERT(reporter, insetPoly[0].equals(-95, 45)); in DEF_TEST() 49 REPORTER_ASSERT(reporter, insetPoly[1].equals(95, 45)); in DEF_TEST() 50 REPORTER_ASSERT(reporter, insetPol in DEF_TEST() [all...] |
H A D | SkGlyphBufferTest.cpp | 14 DEF_TEST(SkPackedGlyphIDCtor, reporter) { in DEF_TEST() 37 REPORTER_ASSERT(reporter, packedID == correctID); in DEF_TEST() 53 REPORTER_ASSERT(reporter, packedID == correctID); in DEF_TEST() 70 REPORTER_ASSERT(reporter, packedID == correctID); in DEF_TEST() 92 REPORTER_ASSERT(reporter, packedID == correctID); in DEF_TEST() 98 DEF_TEST(SkSourceGlyphBufferBasic, reporter) { in DEF_TEST() 107 REPORTER_ASSERT(reporter, glyphID == std::get<0>(source[i])); in DEF_TEST() 108 REPORTER_ASSERT(reporter, pos == std::get<1>(source[i])); in DEF_TEST() 114 REPORTER_ASSERT(reporter, rejects.rejectedMaxDimension() == 100); in DEF_TEST() 118 REPORTER_ASSERT(reporter, glyphI in DEF_TEST() [all...] |
H A D | PathOpsAngleIdeas.cpp | 41 static double testArc(skiatest::Reporter* reporter, const SkDQuad& quad, const SkDQuad& arcRef, in testArc() argument 69 REPORTER_ASSERT(reporter, smallest >= 0); in testArc() 70 REPORTER_ASSERT(reporter, t >= 0 && t <= 1); in testArc() 74 static void orderQuads(skiatest::Reporter* reporter, const SkDQuad& quad, double radius, in orderQuads() argument 91 double t = testArc(reporter, quad, cQuad, octant); in orderQuads() 106 static double quadAngle(skiatest::Reporter* reporter, const SkDQuad& quad, double t) { in quadAngle() argument 109 REPORTER_ASSERT(reporter, angle >= 0 && angle <= 8); in quadAngle() 129 static bool checkParallel(skiatest::Reporter* reporter, const SkDQuad& quad1, const SkDQuad& quad2) { in checkParallel() argument 143 REPORTER_ASSERT(reporter, s0dt0 != 0); in checkParallel() 163 static int quadHullsOverlap(skiatest::Reporter* reporter, cons 228 orderTRange(skiatest::Reporter* reporter, const SkDQuad& quad1, const SkDQuad& quad2, double r, TRange* result) orderTRange() argument 285 bruteMinT(skiatest::Reporter* reporter, const SkDQuad& quad1, const SkDQuad& quad2, TRange* lowerRange, TRange* upperRange) bruteMinT() argument 391 bruteForce(skiatest::Reporter* reporter, const SkDQuad& quad1, const SkDQuad& quad2, bool ccw) bruteForce() argument 403 bruteForceCheck(skiatest::Reporter* reporter, const SkDQuad& quad1, const SkDQuad& quad2, bool ccw) bruteForceCheck() argument 418 testQuadAngles(skiatest::Reporter* reporter, const SkDQuad& quad1, const SkDQuad& quad2, int testNo, SkArenaAlloc* allocator) testQuadAngles() argument 752 mDistance(skiatest::Reporter* reporter, bool agrees, const SkDQuad& q1, const SkDQuad& q2) mDistance() argument [all...] |
H A D | VerticesTest.cpp | 61 static void self_test(sk_sp<SkVertices> v0, skiatest::Reporter* reporter) { in self_test() argument 71 REPORTER_ASSERT(reporter, v1 != nullptr); in self_test() 72 REPORTER_ASSERT(reporter, v0->uniqueID() != 0); in self_test() 73 REPORTER_ASSERT(reporter, v1->uniqueID() != 0); in self_test() 74 REPORTER_ASSERT(reporter, v0->uniqueID() != v1->uniqueID()); in self_test() 75 REPORTER_ASSERT(reporter, equal(v0.get(), v1.get())); in self_test() 78 DEF_TEST(Vertices, reporter) { in DEF_TEST() 104 self_test(builder.detach(), reporter); in DEF_TEST() 113 REPORTER_ASSERT(reporter, builder.isValid()); in DEF_TEST() 119 REPORTER_ASSERT(reporter, !builde in DEF_TEST() [all...] |
H A D | ImageNewShaderTest.cpp | 17 static void test_bitmap_equality(skiatest::Reporter* reporter, SkBitmap& bm1, SkBitmap& bm2) { in test_bitmap_equality() argument 18 REPORTER_ASSERT(reporter, bm1.computeByteSize() == bm2.computeByteSize()); in test_bitmap_equality() 19 REPORTER_ASSERT(reporter, 0 == memcmp(bm1.getPixels(), bm2.getPixels(), bm1.computeByteSize())); in test_bitmap_equality() 39 static void run_shader_test(skiatest::Reporter* reporter, SkSurface* sourceSurface, in run_shader_test() argument 63 test_bitmap_equality(reporter, bmOrig, bm); in run_shader_test() 88 REPORTER_ASSERT(reporter, 0xFFFF0000 == bmt.getColor(0, y)); in run_shader_test() 91 REPORTER_ASSERT(reporter, 0xFFDEDEDE == bmt.getColor(x, y)); in run_shader_test() 97 DEF_TEST(ImageNewShader, reporter) { in DEF_TEST() 103 run_shader_test(reporter, sourceSurface.get(), destinationSurface.get(), info); in DEF_TEST() 106 static void gpu_to_gpu(skiatest::Reporter* reporter, GrRecordingContex argument 115 raster_to_gpu(skiatest::Reporter* reporter, GrRecordingContext* rContext) raster_to_gpu() argument [all...] |
H A D | ImageCacheTest.cpp | 45 static void test_cache(skiatest::Reporter* reporter, SkResourceCache& cache, bool testPurge) { in test_cache() argument 50 REPORTER_ASSERT(reporter, !cache.find(key, TestingRec::Visitor, &value)); in test_cache() 51 REPORTER_ASSERT(reporter, -1 == value); in test_cache() 55 REPORTER_ASSERT(reporter, cache.find(key, TestingRec::Visitor, &value)); in test_cache() 56 REPORTER_ASSERT(reporter, i == value); in test_cache() 76 static void test_cache_purge_shared_id(skiatest::Reporter* reporter, SkResourceCache& cache) { in test_cache_purge_shared_id() argument 87 REPORTER_ASSERT(reporter, cache.find(key, TestingRec::Visitor, &value)); in test_cache_purge_shared_id() 88 REPORTER_ASSERT(reporter, value == i); in test_cache_purge_shared_id() 100 REPORTER_ASSERT(reporter, !cache.find(key, TestingRec::Visitor, &value)); in test_cache_purge_shared_id() 102 REPORTER_ASSERT(reporter, cach in test_cache_purge_shared_id() [all...] |
H A D | TraceMemoryDumpTest.cpp | 59 void ValidateMemoryDumps(skiatest::Reporter* reporter, GrDirectContext* dContext, in ValidateMemoryDumps() argument 64 REPORTER_ASSERT(reporter, numDumpedObjects == dump_with_wrapped.numDumpedObjects()); in ValidateMemoryDumps() 65 REPORTER_ASSERT(reporter, size == dump_with_wrapped.dumpedObjectsSize()); in ValidateMemoryDumps() 70 REPORTER_ASSERT(reporter, numDumpedObjects == dump_no_wrapped.numDumpedObjects()); in ValidateMemoryDumps() 71 REPORTER_ASSERT(reporter, size == dump_no_wrapped.dumpedObjectsSize()); in ValidateMemoryDumps() 73 REPORTER_ASSERT(reporter, 1 == dump_no_wrapped.numDumpedObjects()); in ValidateMemoryDumps() 74 REPORTER_ASSERT(reporter, 0 == dump_no_wrapped.dumpedObjectsSize()); in ValidateMemoryDumps() 79 DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(SkTraceMemoryDump_ownedGLBuffer, reporter, ctxInfo) { in DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS() 86 ValidateMemoryDumps(reporter, dContext, 2, kMemorySize, true /* isOwned */); in DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS() 89 DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(SkTraceMemoryDump_ownedGLTexture, reporter, ctxInf [all...] |
H A D | DiscardableMemoryTest.cpp | 21 static void test_dm(skiatest::Reporter* reporter, in test_dm() argument 24 REPORTER_ASSERT(reporter, dm); in test_dm() 29 REPORTER_ASSERT(reporter, ptr); in test_dm() 37 REPORTER_ASSERT(reporter, relockSuccess); in test_dm() 43 REPORTER_ASSERT(reporter, ptr); in test_dm() 47 REPORTER_ASSERT(reporter, 0 == memcmp(ptr, kTestString, kTestStringLength)); in test_dm() 51 DEF_TEST(DiscardableMemory_global, reporter) { in DEF_TEST() 55 test_dm(reporter, dm.get(), false); in DEF_TEST() 58 DEF_TEST(DiscardableMemory_nonglobal, reporter) { in DEF_TEST() 62 test_dm(reporter, d in DEF_TEST() [all...] |
/third_party/skia/tests/graphite/ |
H A D | UniformCacheTest.cpp | 43 DEF_GRAPHITE_TEST_FOR_CONTEXTS(UniformCacheTest, reporter, context) { in DEF_GRAPHITE_TEST_FOR_CONTEXTS() 48 REPORTER_ASSERT(reporter, cache->count() == 0); in DEF_GRAPHITE_TEST_FOR_CONTEXTS() 55 REPORTER_ASSERT(reporter, result1->id() != UniformData::kInvalidUniformID); in DEF_GRAPHITE_TEST_FOR_CONTEXTS() 56 REPORTER_ASSERT(reporter, ud1->id() == result1->id()); in DEF_GRAPHITE_TEST_FOR_CONTEXTS() 58 REPORTER_ASSERT(reporter, lookup->id() == result1->id()); in DEF_GRAPHITE_TEST_FOR_CONTEXTS() 60 REPORTER_ASSERT(reporter, cache->count() == 1); in DEF_GRAPHITE_TEST_FOR_CONTEXTS() 67 REPORTER_ASSERT(reporter, result2->id() != UniformData::kInvalidUniformID); in DEF_GRAPHITE_TEST_FOR_CONTEXTS() 68 REPORTER_ASSERT(reporter, ud2->id() == UniformData::kInvalidUniformID); in DEF_GRAPHITE_TEST_FOR_CONTEXTS() 69 REPORTER_ASSERT(reporter, result2->id() == result1->id()); in DEF_GRAPHITE_TEST_FOR_CONTEXTS() 71 REPORTER_ASSERT(reporter, looku in DEF_GRAPHITE_TEST_FOR_CONTEXTS() [all...] |
H A D | ProgramCacheTest.cpp | 16 DEF_GRAPHITE_TEST_FOR_CONTEXTS(ProgramCacheTest, reporter, context) { in DEF_GRAPHITE_TEST_FOR_CONTEXTS() 21 REPORTER_ASSERT(reporter, cache->count() == 0); in DEF_GRAPHITE_TEST_FOR_CONTEXTS() 28 REPORTER_ASSERT(reporter, pi1->id() != ProgramCache::kInvalidProgramID); in DEF_GRAPHITE_TEST_FOR_CONTEXTS() 29 REPORTER_ASSERT(reporter, pi1->combo() == c1); in DEF_GRAPHITE_TEST_FOR_CONTEXTS() 31 REPORTER_ASSERT(reporter, lookup->id() == pi1->id()); in DEF_GRAPHITE_TEST_FOR_CONTEXTS() 33 REPORTER_ASSERT(reporter, cache->count() == 1); in DEF_GRAPHITE_TEST_FOR_CONTEXTS() 40 REPORTER_ASSERT(reporter, pi2->id() != ProgramCache::kInvalidProgramID); in DEF_GRAPHITE_TEST_FOR_CONTEXTS() 41 REPORTER_ASSERT(reporter, pi2->id() == pi1->id()); in DEF_GRAPHITE_TEST_FOR_CONTEXTS() 42 REPORTER_ASSERT(reporter, pi2->combo() == c2); in DEF_GRAPHITE_TEST_FOR_CONTEXTS() 44 REPORTER_ASSERT(reporter, looku in DEF_GRAPHITE_TEST_FOR_CONTEXTS() [all...] |
/third_party/skia/experimental/sktext/tests/ |
H A D | UnicodeText.cpp | 54 UNIX_ONLY_TEST(SkText_UnicodeText_Flags, reporter) { in UNIX_ONLY_TEST() 55 REPORTER_ASSERT(reporter, true); in UNIX_ONLY_TEST() 62 REPORTER_ASSERT(reporter, unicodeText16.getText16() == unicodeText8.getText16(), "UTF16 and UTF8 texts should be the same\n"); in UNIX_ONLY_TEST() 66 REPORTER_ASSERT(reporter, unicodeText16.hasProperty(i, CodeUnitFlags::kHardLineBreakBefore), "Pos16 %d should point to hard line break\n", lineBreak); in UNIX_ONLY_TEST() 67 REPORTER_ASSERT(reporter, unicodeText8 .hasProperty(i, CodeUnitFlags::kHardLineBreakBefore), "Pos8 %d should point to hard line break\n", lineBreak); in UNIX_ONLY_TEST() 69 REPORTER_ASSERT(reporter, unicodeText16.hasProperty(i, CodeUnitFlags::kGraphemeStart), "Pos16 %d should be a grapheme start\n", i); in UNIX_ONLY_TEST() 70 REPORTER_ASSERT(reporter, unicodeText8 .hasProperty(i, CodeUnitFlags::kGraphemeStart), "Pos8 %d should be a grapheme start\n", i); in UNIX_ONLY_TEST() 77 REPORTER_ASSERT(reporter, unicodeText16.hasProperty(space1, CodeUnitFlags::kPartOfWhiteSpace), "Pos16 %d should be a part of whitespaces\n", space1); in UNIX_ONLY_TEST() 78 REPORTER_ASSERT(reporter, unicodeText16.hasProperty(space1 + 1, CodeUnitFlags::kSoftLineBreakBefore), "Pos16 %d should have soft line break before\n", space1 + 1); in UNIX_ONLY_TEST() 79 REPORTER_ASSERT(reporter, unicodeText1 in UNIX_ONLY_TEST() [all...] |
H A D | FontResolvedText.cpp | 41 UNIX_ONLY_TEST(SkText_FontResolution1, reporter) { in UNIX_ONLY_TEST() 54 REPORTER_ASSERT(reporter, resolvedFonts.size() == 1); in UNIX_ONLY_TEST() 55 REPORTER_ASSERT(reporter, resolvedFonts.front().textRange.width() == utf16.size()); in UNIX_ONLY_TEST() 56 REPORTER_ASSERT(reporter, resolvedFonts.front().typeface->uniqueID() == fontChain->getTypeface()->uniqueID()); in UNIX_ONLY_TEST() 57 REPORTER_ASSERT(reporter, resolvedFonts.front().size == 40.0f); in UNIX_ONLY_TEST() 58 REPORTER_ASSERT(reporter, resolvedFonts.front().style == SkFontStyle::Normal()); in UNIX_ONLY_TEST() 61 UNIX_ONLY_TEST(SkText_FontResolution3, reporter) { in UNIX_ONLY_TEST() 76 REPORTER_ASSERT(reporter, prev == rf.textRange.fStart); in UNIX_ONLY_TEST() 77 REPORTER_ASSERT(reporter, rf.textRange.width() > 0.0f); in UNIX_ONLY_TEST() 81 REPORTER_ASSERT(reporter, resolvedFont in UNIX_ONLY_TEST() [all...] |