aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects/SkBlurMaskFilter.cpp
diff options
context:
space:
mode:
authorGravatar egdaniel <egdaniel@google.com>2014-12-08 11:20:39 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-12-08 11:20:40 -0800
commit7c66342a399b529634bed0fabfaa562db2c0dbd4 (patch)
tree1acf634452770b9ef66d8a1422748422062ec9d6 /src/effects/SkBlurMaskFilter.cpp
parenta2bd24fd15378d0a25d79b4aa2d76dddc4cf564c (diff)
Make all blending up to GrOptDrawState be handled by the xp/xp factory.
In this cl the blending information is extracted for the xp and stored in the ODS which is then used as it currently is. In the follow up cl, an XP backend will be added and at that point all blending work will take place inside XP's. BUG=skia: Review URL: https://codereview.chromium.org/759713002
Diffstat (limited to 'src/effects/SkBlurMaskFilter.cpp')
-rw-r--r--src/effects/SkBlurMaskFilter.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/effects/SkBlurMaskFilter.cpp b/src/effects/SkBlurMaskFilter.cpp
index f7174e921f..52f99e112a 100644
--- a/src/effects/SkBlurMaskFilter.cpp
+++ b/src/effects/SkBlurMaskFilter.cpp
@@ -24,6 +24,7 @@
#include "GrInvariantOutput.h"
#include "SkGrPixelRef.h"
#include "SkDraw.h"
+#include "effects/GrPorterDuffXferProcessor.h"
#include "effects/GrSimpleTextureEffect.h"
#include "gl/GrGLProcessor.h"
#include "gl/builders/GrGLProgramBuilder.h"
@@ -1218,15 +1219,15 @@ bool SkBlurMaskFilterImpl::filterMaskGPU(GrTexture* src,
paint.addColorProcessor(GrSimpleTextureEffect::Create(src, matrix))->unref();
if (kInner_SkBlurStyle == fBlurStyle) {
// inner: dst = dst * src
- paint.setBlendFunc(kDC_GrBlendCoeff, kZero_GrBlendCoeff);
+ paint.setPorterDuffXPFactory(kDC_GrBlendCoeff, kZero_GrBlendCoeff);
} else if (kSolid_SkBlurStyle == fBlurStyle) {
// solid: dst = src + dst - src * dst
// = (1 - dst) * src + 1 * dst
- paint.setBlendFunc(kIDC_GrBlendCoeff, kOne_GrBlendCoeff);
+ paint.setPorterDuffXPFactory(kIDC_GrBlendCoeff, kOne_GrBlendCoeff);
} else if (kOuter_SkBlurStyle == fBlurStyle) {
// outer: dst = dst * (1 - src)
// = 0 * src + (1 - src) * dst
- paint.setBlendFunc(kZero_GrBlendCoeff, kISC_GrBlendCoeff);
+ paint.setPorterDuffXPFactory(kZero_GrBlendCoeff, kISC_GrBlendCoeff);
}
context->drawRect(paint, clipRect);
}