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:
committed by
Android (Google) Code Review
commit
707b4aebe6
@@ -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));
|
||||
|
||||
@@ -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