aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pdf/SkPDFDevice.cpp
diff options
context:
space:
mode:
authorGravatar halcanary <halcanary@google.com>2016-03-31 07:33:57 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-31 07:33:57 -0700
commitdda239e25b54f4265734c62e2fdc76c872406f28 (patch)
tree987683b415c32774d78a6c174e1b2ceb1a28c68f /src/pdf/SkPDFDevice.cpp
parentad5dcd17cd9996a99068601d11df1c27b3652b9a (diff)
SkPDF: Use Pathops clipping
Turn this on all the time. Remove the SK_PDF_USE_PATHOPS_CLIPPING define that used to hide this functionality. All rendering tests are the same or improved by this. Also, remove non-functional SK_ALLOW_LARGE_PDF_SCALARS. TBR=reed@google.com removing dead #defines from SkUserConfig.h BUG=591805 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1845623002 Review URL: https://codereview.chromium.org/1845623002
Diffstat (limited to 'src/pdf/SkPDFDevice.cpp')
-rw-r--r--src/pdf/SkPDFDevice.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp
index df6a8f8fe2..38e6d1f021 100644
--- a/src/pdf/SkPDFDevice.cpp
+++ b/src/pdf/SkPDFDevice.cpp
@@ -320,7 +320,6 @@ static bool calculate_inverse_path(const SkRect& bounds, const SkPath& invPath,
return Op(clipPath, invPath, kIntersect_SkPathOp, outPath);
}
-#ifdef SK_PDF_USE_PATHOPS_CLIPPING
// Sanity check the numerical values of the SkRegion ops and PathOps ops
// enums so region_op_to_pathops_op can do a straight passthrough cast.
// If these are failing, it may be necessary to make region_op_to_pathops_op
@@ -387,7 +386,6 @@ static bool get_clip_stack_path(const SkMatrix& transform,
}
return true;
}
-#endif
// TODO(vandebo): Take advantage of SkClipStack::getSaveCount(), the PDF
// graphic state stack, and the fact that we can know all the clips used
@@ -413,13 +411,12 @@ void GraphicStackState::updateClip(const SkClipStack& clipStack,
SkMatrix transform;
transform.setTranslate(translation.fX, translation.fY);
-#ifdef SK_PDF_USE_PATHOPS_CLIPPING
SkPath clipPath;
if (get_clip_stack_path(transform, clipStack, clipRegion, &clipPath)) {
emit_clip(&clipPath, nullptr, fContentStream);
return;
}
-#endif
+
// gsState->initialEntry()->fClipStack/Region specifies the clip that has
// already been applied. (If this is a top level device, then it specifies
// a clip to the content area. If this is a layer, then it specifies