diff options
author | 2011-05-24 16:39:05 +0000 | |
---|---|---|
committer | 2011-05-24 16:39:05 +0000 | |
commit | 481aef68333e01c19badda456d8e60bd1f1bee2a (patch) | |
tree | e2f472800cff801a1ddf334f64b9d79f3216a8b3 /include/pdf | |
parent | 2f83940c4db5d17dcb4fd7df24d8002022730a85 (diff) |
[PDF] Add clip support and some optimizations for "complex" xfer modes.
For Clear, Src, Dst/Src-In/Out, we have to consider the current clip, and
potentially draw Dst, clipped to the inverse of the current clip before
doing the operation of interest.
For clear or src, if we haven't drawn anything, or the clip is empty, there's
nothing to be done.
For Src/Dst-In/Out, if either is empty, the result is empty.
Review URL: http://codereview.appspot.com/4538082
git-svn-id: http://skia.googlecode.com/svn/trunk@1407 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/pdf')
-rw-r--r-- | include/pdf/SkPDFDevice.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/pdf/SkPDFDevice.h b/include/pdf/SkPDFDevice.h index 0f634aac44..b6c1389100 100644 --- a/include/pdf/SkPDFDevice.h +++ b/include/pdf/SkPDFDevice.h @@ -169,6 +169,10 @@ private: // Clear the passed clip from all existing content entries. void clearClipFromContent(const SkClipStack* clipStack, const SkRegion& clipRegion); + void drawFormXObjectWithClip(SkPDFFormXObject* form, + const SkClipStack* clipStack, + const SkRegion& clipRegion, + bool invertClip); // If the paint or clip is such that we shouldn't draw anything, these // return false and do not create a content entry. @@ -182,6 +186,8 @@ private: const SkMatrix& matrix, const SkPaint& paint); void finishContentEntry(const SkPaint& paint); + bool isContentEmpty(); + void populateGraphicStateEntryFromPaint(const SkMatrix& matrix, const SkClipStack& clipStack, const SkRegion& clipRegion, |