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

Unified Diff: include/core/SkCanvas.h

Issue 2396953002: Revert[8] "replace SkXfermode obj with SkBlendMode enum in paints" (Closed)
Patch Set: add tmp virtual to unroll legacy arithmodes Created 4 years, 2 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 | « include/core/SkBlendMode.h ('k') | include/core/SkColorFilter.h » ('j') | no next file with comments »
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 8d98e5024f0d1b9151aafe2f7ab0550b8f69dd82..5078f4255ce2a78f4278e61605215a1de4d725ef 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -9,6 +9,7 @@
#define SkCanvas_DEFINED
#include "SkTypes.h"
+#include "SkBlendMode.h"
#include "SkBitmap.h"
#include "SkClipOp.h"
#include "SkDeque.h"
@@ -595,22 +596,31 @@ public:
@param b the blue component (0..255) of the color to fill the canvas
@param mode the mode to apply the color in (defaults to SrcOver)
*/
- void drawARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b,
- SkXfermode::Mode mode = SkXfermode::kSrcOver_Mode);
+ void drawARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b, SkBlendMode mode = SkBlendMode::kSrcOver);
+#ifdef SK_SUPPORT_LEGACY_XFERMODE_OBJECT
+ void drawARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b, SkXfermode::Mode mode) {
+ this->drawARGB(a, r, g, b, (SkBlendMode)mode);
+ }
+#endif
/** Fill the entire canvas' bitmap (restricted to the current clip) with the
specified color and mode.
@param color the color to draw with
@param mode the mode to apply the color in (defaults to SrcOver)
*/
- void drawColor(SkColor color, SkXfermode::Mode mode = SkXfermode::kSrcOver_Mode);
+ void drawColor(SkColor color, SkBlendMode mode = SkBlendMode::kSrcOver);
+#ifdef SK_SUPPORT_LEGACY_XFERMODE_OBJECT
+ void drawColor(SkColor color, SkXfermode::Mode mode) {
+ this->drawColor(color, (SkBlendMode)mode);
+ }
+#endif
/**
* Helper method for drawing a color in SRC mode, completely replacing all the pixels
* in the current clip with this color.
*/
void clear(SkColor color) {
- this->drawColor(color, SkXfermode::kSrc_Mode);
+ this->drawColor(color, SkBlendMode::kSrc);
}
/**
« no previous file with comments | « include/core/SkBlendMode.h ('k') | include/core/SkColorFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698