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

Unified Diff: src/core/SkCanvas.cpp

Issue 2380163002: Remove soft clip bool from SkCanvas (Closed)
Patch Set: Created 4 years, 3 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 | « include/core/SkCanvas.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkCanvas.cpp
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index 33d1deee60783807bd8db88a54a2267a47226f0a..6a0d5e6da6ec37c9a0c119a0dbe56edba9a72a69 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -653,7 +653,6 @@ SkBaseDevice* SkCanvas::init(SkBaseDevice* device, InitFlags flags) {
// const-cast.
*const_cast<bool*>(&fConservativeRasterClip) = SkToBool(flags & kConservativeRasterClip_InitFlag);
- fAllowSoftClip = true;
fAllowSimplifyClip = false;
fDeviceCMDirty = true;
fSaveCount = 1;
@@ -1540,10 +1539,6 @@ sk_sp<SkLights> SkCanvas::getLights() const {
//////////////////////////////////////////////////////////////////////////////
void SkCanvas::clipRect(const SkRect& rect, ClipOp op, bool doAA) {
- if (!fAllowSoftClip) {
- doAA = false;
- }
-
this->checkForDeferredSave();
ClipEdgeStyle edgeStyle = doAA ? kSoft_ClipEdgeStyle : kHard_ClipEdgeStyle;
this->onClipRect(rect, op, edgeStyle);
@@ -1605,9 +1600,6 @@ void SkCanvas::onClipRRect(const SkRRect& rrect, ClipOp op, ClipEdgeStyle edgeSt
AutoValidateClip avc(this);
fDeviceCMDirty = true;
- if (!fAllowSoftClip) {
- edgeStyle = kHard_ClipEdgeStyle;
- }
fClipStack->clipDevRRect(transformedRRect, op, kSoft_ClipEdgeStyle == edgeStyle);
@@ -1653,9 +1645,6 @@ void SkCanvas::onClipPath(const SkPath& path, ClipOp op, ClipEdgeStyle edgeStyle
AutoValidateClip avc(this);
fDeviceCMDirty = true;
- if (!fAllowSoftClip) {
- edgeStyle = kHard_ClipEdgeStyle;
- }
SkPath devPath;
if (fMCRec->fMatrix.isIdentity()) {
« no previous file with comments | « include/core/SkCanvas.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698