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

Unified Diff: include/gpu/GrTypes.h

Issue 1139513002: Add assignment op to enum bitfield ops (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 7 months 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
« no previous file with comments | « no previous file | src/gpu/effects/GrCustomXfermode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrTypes.h
diff --git a/include/gpu/GrTypes.h b/include/gpu/GrTypes.h
index fceae19f3711d1fb2cee201a7e112dcc816a8a98..653756acbc9094559c094641a32c91d02448e92e 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); \
\
« no previous file with comments | « no previous file | src/gpu/effects/GrCustomXfermode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698