Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: src/pdf/SkPDFDevice.cpp

Issue 1845623002: SkPDF: Use Pathops clipping (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/config/SkUserConfig.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFDevice.cpp
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp
index df6a8f8fe2612fb11193f1c5c72e340a144a87f0..38e6d1f021506390204125f84c106132559d9f2f 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
« no previous file with comments | « include/config/SkUserConfig.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698