SkPDF: draw persepctive text
This improves the gm output on several gms:
dftext_blob_persp
dftext
glyph_pos_h_f
glyph_pos_n_f
poly2poly
shadertext2
Bug: chromium:884150
Change-Id: I16899f32ac2a8e7afdd2452017de6d27656679e7
Reviewed-on: https://skia-review.googlesource.com/155609
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp
index d30dd7c..9a86c36 100644
--- a/src/pdf/SkPDFDevice.cpp
+++ b/src/pdf/SkPDFDevice.cpp
@@ -1182,6 +1182,7 @@
if (srcPaint.getPathEffect()
|| srcPaint.getMaskFilter()
|| srcPaint.isVerticalText()
+ || this->ctm().hasPerspective()
|| SkPaint::kFill_Style != srcPaint.getStyle()) {
// Stroked Text doesn't work well with Type3 fonts.
return draw_glyph_run_as_path(this, glyphRun, offset);