diff options
Diffstat (limited to 'tests/RecordOptsTest.cpp')
-rw-r--r-- | tests/RecordOptsTest.cpp | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/tests/RecordOptsTest.cpp b/tests/RecordOptsTest.cpp index e17b5e6bfa..c5c4471d67 100644 --- a/tests/RecordOptsTest.cpp +++ b/tests/RecordOptsTest.cpp @@ -16,30 +16,6 @@ static const int W = 1920, H = 1080; -static void draw_pos_text(SkCanvas* canvas, const char* text, bool constantY) { - const size_t len = strlen(text); - SkAutoTMalloc<SkPoint> pos(len); - for (size_t i = 0; i < len; i++) { - pos[i].fX = (SkScalar)i; - pos[i].fY = constantY ? SK_Scalar1 : (SkScalar)i; - } - canvas->drawPosText(text, len, pos, SkPaint()); -} - -DEF_TEST(RecordOpts_StrengthReduction, r) { - SkRecord record; - SkRecorder recorder(&record, W, H); - - // We can convert a drawPosText into a drawPosTextH when all the Ys are the same. - draw_pos_text(&recorder, "This will be reduced to drawPosTextH.", true); - draw_pos_text(&recorder, "This cannot be reduced to drawPosTextH.", false); - - SkRecordReduceDrawPosTextStrength(&record); - - assert_type<SkRecords::DrawPosTextH>(r, record, 0); - assert_type<SkRecords::DrawPosText>(r, record, 1); -} - DEF_TEST(RecordOpts_NoopDrawSaveRestore, r) { SkRecord record; SkRecorder recorder(&record, W, H); |