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

Unified Diff: src/gpu/GrClipMaskManager.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/gpu/GrClipMaskManager.cpp
diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp
index f86aa9de29f7e1eb649972d4b88179505ab1c614..881c46660133e54d59a8cf122d5be2365506e1cf 100644
--- a/src/gpu/GrClipMaskManager.cpp
+++ b/src/gpu/GrClipMaskManager.cpp
@@ -18,9 +18,10 @@
#include "SkRasterClip.h"
#include "SkStrokeRec.h"
#include "SkTLazy.h"
-#include "effects/GrTextureDomain.h"
#include "effects/GrConvexPolyEffect.h"
+#include "effects/GrPorterDuffXferProcessor.h"
#include "effects/GrRRectEffect.h"
+#include "effects/GrTextureDomain.h"
#define GR_AA_CLIP 1
typedef SkClipStack::Element Element;
@@ -334,22 +335,22 @@ namespace {
void setup_boolean_blendcoeffs(SkRegion::Op op, GrDrawState* drawState) {
switch (op) {
case SkRegion::kReplace_Op:
- drawState->setBlendFunc(kOne_GrBlendCoeff, kZero_GrBlendCoeff);
+ drawState->setPorterDuffXPFactory(kOne_GrBlendCoeff, kZero_GrBlendCoeff);
bsalomon 2014/12/08 15:38:51 Just FYI, these will all be coverage drawing xp in
egdaniel 2014/12/08 16:24:01 Okay. Added todo to annotate this fact.
break;
case SkRegion::kIntersect_Op:
- drawState->setBlendFunc(kDC_GrBlendCoeff, kZero_GrBlendCoeff);
+ drawState->setPorterDuffXPFactory(kDC_GrBlendCoeff, kZero_GrBlendCoeff);
break;
case SkRegion::kUnion_Op:
- drawState->setBlendFunc(kOne_GrBlendCoeff, kISC_GrBlendCoeff);
+ drawState->setPorterDuffXPFactory(kOne_GrBlendCoeff, kISC_GrBlendCoeff);
break;
case SkRegion::kXOR_Op:
- drawState->setBlendFunc(kIDC_GrBlendCoeff, kISC_GrBlendCoeff);
+ drawState->setPorterDuffXPFactory(kIDC_GrBlendCoeff, kISC_GrBlendCoeff);
break;
case SkRegion::kDifference_Op:
- drawState->setBlendFunc(kZero_GrBlendCoeff, kISC_GrBlendCoeff);
+ drawState->setPorterDuffXPFactory(kZero_GrBlendCoeff, kISC_GrBlendCoeff);
break;
case SkRegion::kReverseDifference_Op:
- drawState->setBlendFunc(kIDC_GrBlendCoeff, kZero_GrBlendCoeff);
+ drawState->setPorterDuffXPFactory(kIDC_GrBlendCoeff, kZero_GrBlendCoeff);
break;
default:
SkASSERT(false);

Powered by Google App Engine
This is Rietveld 408576698