| Index: src/core/SkDraw.cpp
|
| ===================================================================
|
| --- src/core/SkDraw.cpp (revision 8931)
|
| +++ src/core/SkDraw.cpp (working copy)
|
| @@ -1489,7 +1489,7 @@
|
| mask.fRowBytes = glyph.rowBytes();
|
| mask.fFormat = static_cast<SkMask::Format>(glyph.fMaskFormat);
|
| mask.fImage = aa;
|
| - state.fBlitter->blitMask(mask, *bounds);
|
| + state.blitMask(mask, *bounds);
|
| }
|
|
|
| static void D1G_NoBounder_RgnClip(const SkDraw1Glyph& state,
|
| @@ -1523,7 +1523,7 @@
|
| mask.fFormat = static_cast<SkMask::Format>(glyph.fMaskFormat);
|
| mask.fImage = (uint8_t*)aa;
|
| do {
|
| - state.fBlitter->blitMask(mask, cr);
|
| + state.blitMask(mask, cr);
|
| clipper.next();
|
| } while (!clipper.done());
|
| }
|
| @@ -1563,7 +1563,7 @@
|
| mask.fFormat = static_cast<SkMask::Format>(glyph.fMaskFormat);
|
| mask.fImage = (uint8_t*)aa;
|
| do {
|
| - state.fBlitter->blitMask(mask, cr);
|
| + state.blitMask(mask, cr);
|
| clipper.next();
|
| } while (!clipper.done());
|
| }
|
| @@ -1592,11 +1592,12 @@
|
| }
|
|
|
| SkDraw1Glyph::Proc SkDraw1Glyph::init(const SkDraw* draw, SkBlitter* blitter,
|
| - SkGlyphCache* cache) {
|
| + SkGlyphCache* cache, const SkPaint& pnt) {
|
| fDraw = draw;
|
| fBounder = draw->fBounder;
|
| fBlitter = blitter;
|
| fCache = cache;
|
| + fPaint = &pnt;
|
|
|
| if (cache->isSubpixel()) {
|
| fHalfSampleX = fHalfSampleY = (SK_FixedHalf >> SkGlyph::kSubBits);
|
| @@ -1636,6 +1637,17 @@
|
| }
|
| }
|
|
|
| +void SkDraw1Glyph::blitMaskAsSprite(const SkMask& mask) const {
|
| + SkASSERT(SkMask::kARGB32_Format == mask.fFormat);
|
| +
|
| + SkBitmap bm;
|
| + bm.setConfig(SkBitmap::kARGB_8888_Config,
|
| + mask.fBounds.width(), mask.fBounds.height(), mask.fRowBytes);
|
| + bm.setPixels((SkPMColor*)mask.fImage);
|
| +
|
| + fDraw->drawSprite(bm, mask.fBounds.x(), mask.fBounds.y(), *fPaint);
|
| +}
|
| +
|
| ///////////////////////////////////////////////////////////////////////////////
|
|
|
| void SkDraw::drawText(const char text[], size_t byteLength,
|
| @@ -1704,7 +1716,7 @@
|
|
|
| SkAutoKern autokern;
|
| SkDraw1Glyph d1g;
|
| - SkDraw1Glyph::Proc proc = d1g.init(this, blitter, cache);
|
| + SkDraw1Glyph::Proc proc = d1g.init(this, blitter, cache, paint);
|
|
|
| SkFixed fxMask = ~0;
|
| SkFixed fyMask = ~0;
|
| @@ -1866,7 +1878,7 @@
|
| const char* stop = text + byteLength;
|
| AlignProc alignProc = pick_align_proc(paint.getTextAlign());
|
| SkDraw1Glyph d1g;
|
| - SkDraw1Glyph::Proc proc = d1g.init(this, blitter, cache);
|
| + SkDraw1Glyph::Proc proc = d1g.init(this, blitter, cache, paint);
|
| TextMapState tms(*fMatrix, constY);
|
| TextMapState::Proc tmsProc = tms.pickProc(scalarsPerPosition);
|
|
|
|
|