Merge changes from topic 'skia_merge_1933880'

* changes:
  Fix HWUI tests to use android-only SkPaint flags
  Update framework to use new method for disabling DF path rendering.
This commit is contained in:
TreeHugger Robot
2017-02-23 17:18:13 +00:00
committed by Android (Google) Code Review
3 changed files with 6 additions and 4 deletions

View File

@@ -133,7 +133,7 @@ void EglManager::initialize() {
LOG_ALWAYS_FATAL_IF(!glInterface.get());
GrContextOptions options;
options.fDisableDistanceFieldPaths = true;
options.fGpuPathRenderers &= ~GrContextOptions::GpuPathRenderers::kDistanceField;
options.fAllowPathMaskCaching = true;
mRenderThread.setGrContext(GrContext::Create(GrBackend::kOpenGL_GrBackend,
(GrBackendContext)glInterface.get(), options));

View File

@@ -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));

View File

@@ -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);
}
}