diff options
| author | 2017-02-23 21:24:35 +0000 | |
|---|---|---|
| committer | 2017-02-23 21:24:39 +0000 | |
| commit | d7ece194c79e9a959c0ec8380e17c960a1a98c9c (patch) | |
| tree | 3a1717f2dd81dec6e2c8da2002aee6f54b794298 | |
| parent | ff14143cee60a38b17c2610807a0503ba86d0bb2 (diff) | |
| parent | dfe0647f6c7a80242f1646541a6f3460e0ef3c76 (diff) | |
Merge "Fix unit test that failed due to incorrect refactor."
| -rw-r--r-- | libs/hwui/tests/unit/RecordingCanvasTests.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libs/hwui/tests/unit/RecordingCanvasTests.cpp b/libs/hwui/tests/unit/RecordingCanvasTests.cpp index f48d98ce4934..b2ea9accf63a 100644 --- a/libs/hwui/tests/unit/RecordingCanvasTests.cpp +++ b/libs/hwui/tests/unit/RecordingCanvasTests.cpp @@ -201,8 +201,16 @@ OPENGL_PIPELINE_TEST(RecordingCanvas, drawGlyphs_strikeThruAndUnderline) { for (int i = 0; i < 2; i++) { for (int j = 0; j < 2; j++) { uint32_t flags = paint.getFlags(); - if (i != 0) flags |= SkPaint::kUnderlineText_ReserveFlag; - if (j != 0) flags |= SkPaint::kStrikeThruText_ReserveFlag; + if (i != 0) { + flags |= SkPaint::kUnderlineText_ReserveFlag; + } else { + flags &= ~SkPaint::kUnderlineText_ReserveFlag; + } + if (j != 0) { + flags |= SkPaint::kStrikeThruText_ReserveFlag; + } else { + flags &= ~SkPaint::kStrikeThruText_ReserveFlag; + } paint.setFlags(flags); TestUtils::drawUtf8ToCanvas(&canvas, "test text", paint, 25, 25); } |