aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/gpu/GrTypes.h4
-rw-r--r--src/gpu/effects/GrCustomXfermode.cpp4
2 files changed, 6 insertions, 2 deletions
diff --git a/include/gpu/GrTypes.h b/include/gpu/GrTypes.h
index 67cf4db8d9..c1d324bad0 100644
--- a/include/gpu/GrTypes.h
+++ b/include/gpu/GrTypes.h
@@ -23,6 +23,9 @@
inline X operator | (X a, X b) { \
return (X) (+a | +b); \
} \
+ inline X& operator |= (X& a, X b) { \
+ return (a = a | b); \
+ } \
\
inline X operator & (X a, X b) { \
return (X) (+a & +b); \
@@ -38,6 +41,7 @@
#define GR_DECL_BITFIELD_OPS_FRIENDS(X) \
friend X operator | (X a, X b); \
+ friend X& operator |= (X& a, X b); \
\
friend X operator & (X a, X b); \
\
diff --git a/src/gpu/effects/GrCustomXfermode.cpp b/src/gpu/effects/GrCustomXfermode.cpp
index 4963198e7e..1fdd3b781f 100644
--- a/src/gpu/effects/GrCustomXfermode.cpp
+++ b/src/gpu/effects/GrCustomXfermode.cpp
@@ -751,10 +751,10 @@ GrXferProcessor::OptFlags CustomXP::onGetOptimizations(const GrProcOptInfo& colo
OptFlags flags = kNone_Opt;
if (colorPOI.allStagesMultiplyInput()) {
- flags = flags | kCanTweakAlphaForCoverage_OptFlag;
+ flags |= kCanTweakAlphaForCoverage_OptFlag;
}
if (coveragePOI.isSolidWhite()) {
- flags = flags | kIgnoreCoverage_OptFlag;
+ flags |= kIgnoreCoverage_OptFlag;
}
if (caps.advancedBlendEquationSupport() && !coveragePOI.isFourChannelOutput()) {
// This blend mode can be implemented in hardware.