Add assignment op to enum bitfield ops

BUG=skia:

Review URL: https://codereview.chromium.org/1139513002
This commit is contained in:
cdalton 2015-05-11 11:21:23 -07:00 committed by Commit bot
parent f7cc87719e
commit 321177052b
2 changed files with 6 additions and 2 deletions

View File

@ -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); \
\

View File

@ -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.