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>
This commit is contained in:
parent
edfe4a5ca0
commit
fc3afa921b
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user