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

Unified Diff: tests/RecordOptsTest.cpp

Issue 577673003: Turn disable or delete optimizations that don't have any effect. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 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/SkRecordOpts.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/RecordOptsTest.cpp
diff --git a/tests/RecordOptsTest.cpp b/tests/RecordOptsTest.cpp
index e17b5e6bfa2a3fd4597b59fff19382912025f902..c5c4471d6715937383b9d8b122acc843d0e44e3e 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);
« no previous file with comments | « src/core/SkRecordOpts.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698