Fix HWUI tests to use android-only SkPaint flags
Test: compile only Change-Id: Ia3a5710d4ae13d68e5b2655a8b135dae8ffeb513
This commit is contained in:
@@ -579,7 +579,7 @@ RENDERTHREAD_OPENGL_PIPELINE_TEST(FrameBuilder, textStrikethrough) {
|
||||
SkPaint textPaint;
|
||||
textPaint.setAntiAlias(true);
|
||||
textPaint.setTextSize(20);
|
||||
textPaint.setStrikeThruText(true);
|
||||
textPaint.setFlags(textPaint.getFlags() | SkPaint::kStrikeThruText_ReserveFlag);
|
||||
textPaint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
|
||||
for (int i = 0; i < LOOPS; i++) {
|
||||
TestUtils::drawUtf8ToCanvas(&canvas, "test text", textPaint, 10, 100 * (i + 1));
|
||||
|
||||
@@ -200,8 +200,10 @@ OPENGL_PIPELINE_TEST(RecordingCanvas, drawGlyphs_strikeThruAndUnderline) {
|
||||
paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
|
||||
for (int i = 0; i < 2; i++) {
|
||||
for (int j = 0; j < 2; j++) {
|
||||
paint.setUnderlineText(i != 0);
|
||||
paint.setStrikeThruText(j != 0);
|
||||
uint32_t flags = paint.getFlags();
|
||||
if (i != 0) flags |= SkPaint::kUnderlineText_ReserveFlag;
|
||||
if (j != 0) flags |= SkPaint::kStrikeThruText_ReserveFlag;
|
||||
paint.setFlags(flags);
|
||||
TestUtils::drawUtf8ToCanvas(&canvas, "test text", paint, 25, 25);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user