aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkCanvas.h
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2016-10-05 17:33:02 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-10-05 17:33:03 -0700
commit374772bd61951f01bf84fe17bf53d8867681c9ae (patch)
treeade94be090be12f7503fd35e77c4dae2dc1f0a47 /include/core/SkCanvas.h
parent61c21cdcc31081a1bd4a3a7480b482d135f7df33 (diff)
Revert[8] "replace SkXfermode obj with SkBlendMode enum in paints"
Diffstat (limited to 'include/core/SkCanvas.h')
-rw-r--r--include/core/SkCanvas.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index 8d98e5024f..5078f4255c 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);
}
/**