aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pdf
diff options
context:
space:
mode:
authorGravatar Hal Canary <halcanary@google.com>2017-07-19 14:19:14 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-19 19:07:45 +0000
commitfc3afa921bc42a357120e1e7856b3c256bfe1a6a (patch)
tree0c3fe8124c71c23ed5b5ad36758f737c1136a640 /src/pdf
parentedfe4a5ca01858f47c4d12cc15ec36d606048704 (diff)
SkPDF: more paths as rects
Motivation: Content streams are marginally smaller and easier to read (for debugging). Change-Id: Idb82276f512408c083a1001da217707fd2d48e49 Reviewed-on: https://skia-review.googlesource.com/24744 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
Diffstat (limited to 'src/pdf')
-rw-r--r--src/pdf/SkPDFUtils.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pdf/SkPDFUtils.cpp b/src/pdf/SkPDFUtils.cpp
index af18432eb2..c9f5806211 100644
--- a/src/pdf/SkPDFUtils.cpp
+++ b/src/pdf/SkPDFUtils.cpp
@@ -129,7 +129,9 @@ void SkPDFUtils::EmitPath(const SkPath& path, SkPaint::Style paintStyle,
bool isClosed; // Both closure and direction need to be checked.
SkPath::Direction direction;
if (path.isRect(&rect, &isClosed, &direction) &&
- isClosed && SkPath::kCW_Direction == direction)
+ isClosed &&
+ (SkPath::kCW_Direction == direction ||
+ SkPath::kEvenOdd_FillType == path.getFillType()))
{
SkPDFUtils::AppendRectangle(rect, content);
return;