Index: src/core/SkDrawProcs.h |
=================================================================== |
--- src/core/SkDrawProcs.h (revision 8931) |
+++ src/core/SkDrawProcs.h (working copy) |
@@ -8,6 +8,7 @@ |
#ifndef SkDrawProcs_DEFINED |
#define SkDrawProcs_DEFINED |
+#include "SkBlitter.h" |
#include "SkDraw.h" |
class SkAAClip; |
@@ -20,6 +21,7 @@ |
const SkAAClip* fAAClip; |
SkBlitter* fBlitter; |
SkGlyphCache* fCache; |
+ const SkPaint* fPaint; |
SkIRect fClipBounds; |
/** Half the sampling frequency of the rasterized glyph in x. */ |
SkFixed fHalfSampleX; |
@@ -35,7 +37,22 @@ |
*/ |
typedef void (*Proc)(const SkDraw1Glyph&, SkFixed x, SkFixed y, const SkGlyph&); |
- Proc init(const SkDraw* draw, SkBlitter* blitter, SkGlyphCache* cache); |
+ Proc init(const SkDraw* draw, SkBlitter* blitter, SkGlyphCache* cache, |
+ const SkPaint&); |
+ |
+ // call this instead of fBlitter->blitMask() since this wrapper will handle |
+ // the case when the mask is ARGB32_Format |
+ // |
+ void blitMask(const SkMask& mask, const SkIRect& clip) const { |
+ if (SkMask::kARGB32_Format == mask.fFormat) { |
+ this->blitMaskAsSprite(mask); |
+ } else { |
+ fBlitter->blitMask(mask, clip); |
+ } |
+ } |
+ |
+ // mask must be kARGB32_Format |
+ void blitMaskAsSprite(const SkMask& mask) const; |
}; |
struct SkDrawProcs { |