diff options
author | vandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-10-30 20:48:05 +0000 |
---|---|---|
committer | vandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-10-30 20:48:05 +0000 |
commit | 3b416216d1e90cb8b1bba41bb95806fe2d40da88 (patch) | |
tree | 6b976e9d875a4aebf64868d3fe09890db6c4866c /include/pdf | |
parent | c1362424b864ee3ae7aa44971985e5481057363a (diff) |
[PDF] Improve complex xfer mode support.
Xfer mode applies only to the shape of the source drawing, not everything in the clip as in currently implemented. It's just that the current gm examples draw a shape that fills the visible layer.
R=edisonn@google.com, reed@google.com
Review URL: https://codereview.appspot.com/4631078
git-svn-id: http://skia.googlecode.com/svn/trunk@12034 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/pdf')
-rw-r--r-- | include/pdf/SkPDFDevice.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/include/pdf/SkPDFDevice.h b/include/pdf/SkPDFDevice.h index e68623e22f..d8e1aa283f 100644 --- a/include/pdf/SkPDFDevice.h +++ b/include/pdf/SkPDFDevice.h @@ -262,12 +262,11 @@ private: void cleanUp(bool clearFontUsage); SkPDFFormXObject* createFormXObjectFromDevice(); - // Clear the passed clip from all existing content entries. - void clearClipFromContent(const SkClipStack* clipStack, - const SkRegion& clipRegion); - void drawFormXObjectWithClip(SkPDFFormXObject* form, + void drawFormXObjectWithMask(int xObjectIndex, + SkPDFFormXObject* mask, const SkClipStack* clipStack, const SkRegion& clipRegion, + SkXfermode::Mode mode, bool invertClip); // If the paint or clip is such that we shouldn't draw anything, this @@ -281,7 +280,8 @@ private: bool hasText, SkPDFFormXObject** dst); void finishContentEntry(SkXfermode::Mode xfermode, - SkPDFFormXObject* dst); + SkPDFFormXObject* dst, + SkPath* shape); bool isContentEmpty(); void populateGraphicStateEntryFromPaint(const SkMatrix& matrix, @@ -291,6 +291,7 @@ private: bool hasText, GraphicStateEntry* entry); int addGraphicStateResource(SkPDFGraphicState* gs); + int addXObjectResource(SkPDFObject* xObject); void updateFont(const SkPaint& paint, uint16_t glyphID, ContentEntry* contentEntry); |