diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkDraw.cpp | 2 | ||||
-rw-r--r-- | src/core/SkPath.cpp | 2 | ||||
-rw-r--r-- | src/core/SkPathPriv.h | 4 | ||||
-rw-r--r-- | src/core/SkScalerContext.cpp | 2 | ||||
-rw-r--r-- | src/core/SkScan_AntiPath.cpp | 3 |
5 files changed, 12 insertions, 1 deletions
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp index 62b84d804c..ccfd5b9991 100644 --- a/src/core/SkDraw.cpp +++ b/src/core/SkDraw.cpp @@ -22,6 +22,7 @@ #include "SkMatrixUtils.h" #include "SkPaint.h" #include "SkPathEffect.h" +#include "SkPathPriv.h" #include "SkRasterClip.h" #include "SkRectPriv.h" #include "SkRRect.h" @@ -1069,6 +1070,7 @@ void SkDraw::drawPath(const SkPath& origSrcPath, const SkPaint& origPaint, tmpPath = iData->fAlloc->make<SkPath>(); } tmpPath->setIsVolatile(true); + SkPathPriv::SetIsBadForDAA(*tmpPath, SkPathPriv::IsBadForDAA(origSrcPath)); if (prePathMatrix) { if (origPaint.getPathEffect() || origPaint.getStyle() != SkPaint::kFill_Style) { diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp index 284a6a716c..3fb91a38df 100644 --- a/src/core/SkPath.cpp +++ b/src/core/SkPath.cpp @@ -140,6 +140,7 @@ SkPath::SkPath() : fPathRef(SkPathRef::CreateEmpty()) { this->resetFields(); fIsVolatile = false; + fIsBadForDAA = false; } void SkPath::resetFields() { @@ -179,6 +180,7 @@ void SkPath::copyFields(const SkPath& that) { fLastMoveToIndex = that.fLastMoveToIndex; fFillType = that.fFillType; fIsVolatile = that.fIsVolatile; + fIsBadForDAA = that.fIsBadForDAA; // Non-atomic assignment of atomic values. fConvexity .store(that.fConvexity .load()); diff --git a/src/core/SkPathPriv.h b/src/core/SkPathPriv.h index 49977b10fd..506c5e181a 100644 --- a/src/core/SkPathPriv.h +++ b/src/core/SkPathPriv.h @@ -211,6 +211,10 @@ public: } return result; } + + // For crbug.com/821353 and skbug.com/6886 + static bool IsBadForDAA(const SkPath& path) { return path.fIsBadForDAA; } + static void SetIsBadForDAA(SkPath& path, bool isBadForDAA) { path.fIsBadForDAA = isBadForDAA; } }; #endif diff --git a/src/core/SkScalerContext.cpp b/src/core/SkScalerContext.cpp index 600163910a..6e5fbe5635 100644 --- a/src/core/SkScalerContext.cpp +++ b/src/core/SkScalerContext.cpp @@ -21,6 +21,7 @@ #include "SkMatrix22.h" #include "SkPaintPriv.h" #include "SkPathEffect.h" +#include "SkPathPriv.h" #include "SkRasterClip.h" #include "SkReadBuffer.h" #include "SkStroke.h" @@ -444,6 +445,7 @@ void SkScalerContext::getImage(const SkGlyph& origGlyph) { } else { SkASSERT(SkMask::kARGB32_Format != origGlyph.fMaskFormat); SkASSERT(SkMask::kARGB32_Format != mask.fFormat); + SkPathPriv::SetIsBadForDAA(devPath, true); // crbug.com/821353 generateMask(mask, devPath, fPreBlend); } } diff --git a/src/core/SkScan_AntiPath.cpp b/src/core/SkScan_AntiPath.cpp index ab86b4e7d9..45bc2e2ea6 100644 --- a/src/core/SkScan_AntiPath.cpp +++ b/src/core/SkScan_AntiPath.cpp @@ -8,6 +8,7 @@ #include "SkScanPriv.h" #include "SkPath.h" +#include "SkPathPriv.h" #include "SkMatrix.h" #include "SkBlitter.h" #include "SkRegion.h" @@ -601,7 +602,7 @@ static bool ShouldUseDAA(const SkPath& path) { if (gSkForceDeltaAA) { return true; } - if (!gSkUseDeltaAA) { + if (!gSkUseDeltaAA || SkPathPriv::IsBadForDAA(path)) { return false; } |