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

Unified Diff: include/core/SkCanvas.h

Issue 303373003: Add an OR operator overload for SaveFlags to avoid extra static casts. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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/core/SkCanvas.cpp » ('j') | src/core/SkMatrixClipStateMgr.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkCanvas.h
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index 81dcfe19b0fcfeca4c22815de439b7d6acc0c31d..657b96af1e4e1273da5b168a6e60987a16b584c3 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -1507,4 +1507,8 @@ private:
size_t fRowBytes;
};
+inline SkCanvas::SaveFlags operator|(const SkCanvas::SaveFlags lhs, const SkCanvas::SaveFlags rhs) {
+ return static_cast<SkCanvas::SaveFlags>(lhs | rhs);
+}
+
#endif
« no previous file with comments | « no previous file | src/core/SkCanvas.cpp » ('j') | src/core/SkMatrixClipStateMgr.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698