Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Unified Diff: tests/PictureTest.cpp

Issue 1978533002: Remove SkPicture::hasText() (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkPictureCommon.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PictureTest.cpp
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp
index 832a80f438e7dfb8535223ac652e485ef143061b..b7fa1d1d91d0be18b684059ee555266dbb0ae3d3 100644
--- a/tests/PictureTest.cpp
+++ b/tests/PictureTest.cpp
@@ -473,69 +473,6 @@ static void test_savelayer_extraction(skiatest::Reporter* reporter) {
}
}
-static void test_has_text(skiatest::Reporter* reporter) {
- SkPictureRecorder recorder;
-
- SkCanvas* canvas = recorder.beginRecording(100,100);
- {
- canvas->drawRect(SkRect::MakeWH(20, 20), SkPaint());
- }
- sk_sp<SkPicture> picture(recorder.finishRecordingAsPicture());
- REPORTER_ASSERT(reporter, !picture->hasText());
-
- SkPoint point = SkPoint::Make(10, 10);
- canvas = recorder.beginRecording(100,100);
- {
- canvas->drawText("Q", 1, point.fX, point.fY, SkPaint());
- }
- picture = recorder.finishRecordingAsPicture();
- REPORTER_ASSERT(reporter, picture->hasText());
-
- canvas = recorder.beginRecording(100,100);
- {
- canvas->drawPosText("Q", 1, &point, SkPaint());
- }
- picture = recorder.finishRecordingAsPicture();
- REPORTER_ASSERT(reporter, picture->hasText());
-
- canvas = recorder.beginRecording(100,100);
- {
- canvas->drawPosTextH("Q", 1, &point.fX, point.fY, SkPaint());
- }
- picture = recorder.finishRecordingAsPicture();
- REPORTER_ASSERT(reporter, picture->hasText());
-
- canvas = recorder.beginRecording(100,100);
- {
- SkPath path;
- path.moveTo(0, 0);
- path.lineTo(50, 50);
-
- canvas->drawTextOnPathHV("Q", 1, path, point.fX, point.fY, SkPaint());
- }
- picture = recorder.finishRecordingAsPicture();
- REPORTER_ASSERT(reporter, picture->hasText());
-
- canvas = recorder.beginRecording(100,100);
- {
- SkPath path;
- path.moveTo(0, 0);
- path.lineTo(50, 50);
-
- canvas->drawTextOnPath("Q", 1, path, nullptr, SkPaint());
- }
- picture = recorder.finishRecordingAsPicture();
- REPORTER_ASSERT(reporter, picture->hasText());
-
- // Nest the previous picture inside a new one.
- canvas = recorder.beginRecording(100,100);
- {
- canvas->drawPicture(picture.get());
- }
- picture = recorder.finishRecordingAsPicture();
- REPORTER_ASSERT(reporter, picture->hasText());
-}
-
static void set_canvas_to_save_count_4(SkCanvas* canvas) {
canvas->restoreToCount(1);
canvas->save();
@@ -1180,7 +1117,6 @@ static void test_typeface(skiatest::Reporter* reporter) {
paint.setTypeface(SkTypeface::MakeFromName("Arial", SkTypeface::kItalic));
canvas->drawText("Q", 1, 0, 10, paint);
sk_sp<SkPicture> picture(recorder.finishRecordingAsPicture());
- REPORTER_ASSERT(reporter, picture->hasText());
SkDynamicMemoryWStream stream;
picture->serialize(&stream);
}
@@ -1198,7 +1134,6 @@ DEF_TEST(Picture, reporter) {
#if SK_SUPPORT_GPU
test_gpu_veto(reporter);
#endif
- test_has_text(reporter);
test_images_are_found_by_willPlayBackBitmaps(reporter);
test_analysis(reporter);
test_clip_bound_opt(reporter);
« no previous file with comments | « src/core/SkPictureCommon.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698