| Index: src/core/SkPictureRecord.cpp
|
| ===================================================================
|
| --- src/core/SkPictureRecord.cpp (revision 13577)
|
| +++ src/core/SkPictureRecord.cpp (working copy)
|
| @@ -836,14 +836,14 @@
|
| }
|
| #endif
|
|
|
| -bool SkPictureRecord::clipRect(const SkRect& rect, SkRegion::Op op, bool doAA) {
|
| +void SkPictureRecord::onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle edgeStyle) {
|
|
|
| #ifdef SK_COLLAPSE_MATRIX_CLIP_STATE
|
| fMCMgr.clipRect(rect, op, doAA);
|
| #else
|
| - this->recordClipRect(rect, op, doAA);
|
| + this->recordClipRect(rect, op, kSoft_ClipEdgeStyle == edgeStyle);
|
| #endif
|
| - return this->INHERITED::clipRect(rect, op, doAA);
|
| + this->INHERITED::onClipRect(rect, op, edgeStyle);
|
| }
|
|
|
| int SkPictureRecord::recordClipRect(const SkRect& rect, SkRegion::Op op, bool doAA) {
|
| @@ -867,20 +867,17 @@
|
| return offset;
|
| }
|
|
|
| -bool SkPictureRecord::clipRRect(const SkRRect& rrect, SkRegion::Op op, bool doAA) {
|
| - if (rrect.isRect()) {
|
| - return this->SkPictureRecord::clipRect(rrect.getBounds(), op, doAA);
|
| - }
|
| +void SkPictureRecord::onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeStyle edgeStyle) {
|
|
|
| #ifdef SK_COLLAPSE_MATRIX_CLIP_STATE
|
| fMCMgr.clipRRect(rrect, op, doAA);
|
| #else
|
| - this->recordClipRRect(rrect, op, doAA);
|
| + this->recordClipRRect(rrect, op, kSoft_ClipEdgeStyle == edgeStyle);
|
| #endif
|
| if (fRecordFlags & SkPicture::kUsePathBoundsForClip_RecordingFlag) {
|
| - return this->updateClipConservativelyUsingBounds(rrect.getBounds(), op, false);
|
| + this->updateClipConservativelyUsingBounds(rrect.getBounds(), op, false);
|
| } else {
|
| - return this->INHERITED::clipRRect(rrect, op, doAA);
|
| + this->INHERITED::onClipRRect(rrect, op, edgeStyle);
|
| }
|
| }
|
|
|
| @@ -904,25 +901,20 @@
|
| return offset;
|
| }
|
|
|
| -bool SkPictureRecord::clipPath(const SkPath& path, SkRegion::Op op, bool doAA) {
|
| +void SkPictureRecord::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle edgeStyle) {
|
|
|
| - SkRect r;
|
| - if (!path.isInverseFillType() && path.isRect(&r)) {
|
| - return this->clipRect(r, op, doAA);
|
| - }
|
| -
|
| #ifdef SK_COLLAPSE_MATRIX_CLIP_STATE
|
| fMCMgr.clipPath(path, op, doAA);
|
| #else
|
| int pathID = this->addPathToHeap(path);
|
| - this->recordClipPath(pathID, op, doAA);
|
| + this->recordClipPath(pathID, op, kSoft_ClipEdgeStyle == edgeStyle);
|
| #endif
|
|
|
| if (fRecordFlags & SkPicture::kUsePathBoundsForClip_RecordingFlag) {
|
| - return this->updateClipConservativelyUsingBounds(path.getBounds(), op,
|
| - path.isInverseFillType());
|
| + this->updateClipConservativelyUsingBounds(path.getBounds(), op,
|
| + path.isInverseFillType());
|
| } else {
|
| - return this->INHERITED::clipPath(path, op, doAA);
|
| + this->INHERITED::onClipPath(path, op, edgeStyle);
|
| }
|
| }
|
|
|
| @@ -946,14 +938,14 @@
|
| return offset;
|
| }
|
|
|
| -bool SkPictureRecord::clipRegion(const SkRegion& region, SkRegion::Op op) {
|
| +void SkPictureRecord::onClipRegion(const SkRegion& region, SkRegion::Op op) {
|
|
|
| #ifdef SK_COLLAPSE_MATRIX_CLIP_STATE
|
| fMCMgr.clipRegion(region, op);
|
| #else
|
| this->recordClipRegion(region, op);
|
| #endif
|
| - return this->INHERITED::clipRegion(region, op);
|
| + this->INHERITED::onClipRegion(region, op);
|
| }
|
|
|
| int SkPictureRecord::recordClipRegion(const SkRegion& region, SkRegion::Op op) {
|
|
|