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

Unified Diff: src/effects/SkAlphaThresholdFilter.cpp

Issue 759713002: Make all blending up to GrOptDrawState be handled by the xp/xp factory. (Closed) Base URL: https://skia.googlesource.com/skia.git@xferFactorySolo
Patch Set: Update from review comments Created 6 years 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
Index: src/effects/SkAlphaThresholdFilter.cpp
diff --git a/src/effects/SkAlphaThresholdFilter.cpp b/src/effects/SkAlphaThresholdFilter.cpp
index 6f9fefce1ba112af36e5c920aa3f343f2442f094..13a745efe0760b6836df279728f5a016d24ba69e 100644
--- a/src/effects/SkAlphaThresholdFilter.cpp
+++ b/src/effects/SkAlphaThresholdFilter.cpp
@@ -48,6 +48,7 @@ SkImageFilter* SkAlphaThresholdFilter::Create(const SkRegion& region,
#include "GrFragmentProcessor.h"
#include "GrInvariantOutput.h"
#include "GrTextureAccess.h"
+#include "effects/GrPorterDuffXferProcessor.h"
#include "SkGr.h"
@@ -281,7 +282,7 @@ bool SkAlphaThresholdFilterImpl::asFragmentProcessor(GrFragmentProcessor** fp,
{
GrContext::AutoRenderTarget art(context, maskTexture->asRenderTarget());
GrPaint grPaint;
- grPaint.setBlendFunc(kOne_GrBlendCoeff, kZero_GrBlendCoeff);
+ grPaint.setPorterDuffXPFactory(SkXfermode::kSrc_Mode);
SkRegion::Iterator iter(fRegion);
context->clear(NULL, 0x0, true, maskTexture->asRenderTarget());

Powered by Google App Engine
This is Rietveld 408576698