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

Unified Diff: src/pdf/SkPDFCanvas.cpp

Issue 1925693002: remove 'deprecated' region from SkDraw (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update dox Created 4 years, 8 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 | « src/pdf/SkPDFCanvas.h ('k') | src/pdf/SkPDFDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFCanvas.cpp
diff --git a/src/pdf/SkPDFCanvas.cpp b/src/pdf/SkPDFCanvas.cpp
index de3dc93528cb8783653bcfc2e5564847d39da94c..f3ba66b57ac8e9022865196b7896c0c178bc62da 100644
--- a/src/pdf/SkPDFCanvas.cpp
+++ b/src/pdf/SkPDFCanvas.cpp
@@ -14,6 +14,23 @@ SkPDFCanvas::SkPDFCanvas(const sk_sp<SkPDFDevice>& dev)
SkPDFCanvas::~SkPDFCanvas() {}
+/*
+ * PDF's impl sometimes wants to access the raster clip as a SkRegion. To keep this valid,
+ * we intercept all clip calls to ensure that the clip stays BW (i.e. never antialiased), since
+ * an antialiased clip won't build a SkRegion (it builds SkAAClip).
+ */
+void SkPDFCanvas::onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle edgeStyle) {
+ this->INHERITED::onClipRect(rect, op, kHard_ClipEdgeStyle);
+}
+
+void SkPDFCanvas::onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeStyle edgeStyle) {
+ this->INHERITED::onClipRRect(rrect, op, kHard_ClipEdgeStyle);
+}
+
+void SkPDFCanvas::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle edgeStyle) {
+ this->INHERITED::onClipPath(path, op, kHard_ClipEdgeStyle);
+}
+
void SkPDFCanvas::onDrawBitmapNine(const SkBitmap& bitmap,
const SkIRect& center,
const SkRect& dst,
« no previous file with comments | « src/pdf/SkPDFCanvas.h ('k') | src/pdf/SkPDFDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698