aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar reed <reed@chromium.org>2015-05-23 12:26:41 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-05-23 12:26:41 -0700
commitc240e719b2bebd3711ade4e6fe056921aa7b0521 (patch)
treee16d5f179eb9305398774ead2eb8203f9e5e675a /src
parentc33db93d1b285923b5deef97ecb04d4d01e05dd5 (diff)
remove bitmaps entirely from sprite blits (as source)
BUG=skia: TBR= Review URL: https://codereview.chromium.org/1156713004
Diffstat (limited to 'src')
-rw-r--r--src/core/SkBlitter.h2
-rw-r--r--src/core/SkBlitter_Sprite.cpp20
-rw-r--r--src/core/SkDraw.cpp41
-rw-r--r--src/core/SkSpriteBlitter.h26
-rw-r--r--src/core/SkSpriteBlitterTemplate.h18
-rw-r--r--src/core/SkSpriteBlitter_ARGB32.cpp42
-rw-r--r--src/core/SkSpriteBlitter_RGB16.cpp37
7 files changed, 73 insertions, 113 deletions
diff --git a/src/core/SkBlitter.h b/src/core/SkBlitter.h
index 7cf8301a4a..83e2e4e6ba 100644
--- a/src/core/SkBlitter.h
+++ b/src/core/SkBlitter.h
@@ -130,7 +130,7 @@ public:
static SkBlitter* ChooseSprite(const SkBitmap& device,
const SkPaint&,
- const SkBitmap& src,
+ const SkPixmap& src,
int left, int top,
SkTBlitterAllocator*);
///@}
diff --git a/src/core/SkBlitter_Sprite.cpp b/src/core/SkBlitter_Sprite.cpp
index ab70222c6b..46cd0a8e67 100644
--- a/src/core/SkBlitter_Sprite.cpp
+++ b/src/core/SkBlitter_Sprite.cpp
@@ -8,21 +8,13 @@
#include "SkSmallAllocator.h"
#include "SkSpriteBlitter.h"
-SkSpriteBlitter::SkSpriteBlitter(const SkBitmap& source) : fSource(NULL) {
- if (source.requestLock(&fUnlocker)) {
- fSource = &fUnlocker.pixmap();
- }
-}
+SkSpriteBlitter::SkSpriteBlitter(const SkPixmap& source) : fSource(source) {}
-bool SkSpriteBlitter::setup(const SkBitmap& device, int left, int top, const SkPaint& paint) {
- if (NULL == fSource) {
- return false;
- }
+void SkSpriteBlitter::setup(const SkBitmap& device, int left, int top, const SkPaint& paint) {
fDevice = &device;
fLeft = left;
fTop = top;
fPaint = &paint;
- return true;
}
#ifdef SK_DEBUG
@@ -49,7 +41,7 @@ void SkSpriteBlitter::blitMask(const SkMask&, const SkIRect& clip) {
// returning null means the caller will call SkBlitter::Choose() and
// have wrapped the source bitmap inside a shader
SkBlitter* SkBlitter::ChooseSprite(const SkBitmap& device, const SkPaint& paint,
- const SkBitmap& source, int left, int top, SkTBlitterAllocator* allocator) {
+ const SkPixmap& source, int left, int top, SkTBlitterAllocator* allocator) {
/* We currently ignore antialiasing and filtertype, meaning we will take our
special blitters regardless of these settings. Ignoring filtertype seems fine
since by definition there is no scale in the matrix. Ignoring antialiasing is
@@ -76,11 +68,7 @@ SkBlitter* SkBlitter::ChooseSprite(const SkBitmap& device, const SkPaint& paint,
}
if (blitter) {
- if (!blitter->setup(device, left, top, paint)) {
- // blitter was allocated by allocator, so we have to manually call its destructor
- blitter->~SkSpriteBlitter();
- blitter = NULL;
- }
+ blitter->setup(device, left, top, paint);
}
return blitter;
}
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp
index 918ef765eb..918885117c 100644
--- a/src/core/SkDraw.cpp
+++ b/src/core/SkDraw.cpp
@@ -1242,10 +1242,8 @@ static bool clipped_out(const SkMatrix& matrix, const SkRasterClip& clip,
return clipped_out(matrix, clip, r);
}
-static bool clipHandlesSprite(const SkRasterClip& clip, int x, int y,
- const SkBitmap& bitmap) {
- return clip.isBW() ||
- clip.quickContains(x, y, x + bitmap.width(), y + bitmap.height());
+static bool clipHandlesSprite(const SkRasterClip& clip, int x, int y, const SkPixmap& pmap) {
+ return clip.isBW() || clip.quickContains(x, y, x + pmap.width(), y + pmap.height());
}
void SkDraw::drawBitmap(const SkBitmap& bitmap, const SkMatrix& prematrix,
@@ -1274,24 +1272,23 @@ void SkDraw::drawBitmap(const SkBitmap& bitmap, const SkMatrix& prematrix,
// It is safe to call lock pixels now, since we know the matrix is
// (more or less) identity.
//
- SkAutoLockPixels alp(bitmap);
- if (!bitmap.readyToDraw()) {
+ SkAutoPixmapUnlock unlocker;
+ if (!bitmap.requestLock(&unlocker)) {
return;
}
+ const SkPixmap& pmap = unlocker.pixmap();
int ix = SkScalarRoundToInt(matrix.getTranslateX());
int iy = SkScalarRoundToInt(matrix.getTranslateY());
- if (clipHandlesSprite(*fRC, ix, iy, bitmap)) {
+ if (clipHandlesSprite(*fRC, ix, iy, pmap)) {
SkTBlitterAllocator allocator;
// blitter will be owned by the allocator.
- SkBlitter* blitter = SkBlitter::ChooseSprite(*fBitmap, paint, bitmap,
- ix, iy, &allocator);
+ SkBlitter* blitter = SkBlitter::ChooseSprite(*fBitmap, paint, pmap, ix, iy, &allocator);
if (blitter) {
- SkIRect ir;
- ir.set(ix, iy, ix + bitmap.width(), iy + bitmap.height());
-
- SkScan::FillIRect(ir, *fRC, blitter);
+ SkScan::FillIRect(SkIRect::MakeXYWH(ix, iy, pmap.width(), pmap.height()),
+ *fRC, blitter);
return;
}
+ // if !blitter, then we fall-through to the slower case
}
}
@@ -1314,8 +1311,7 @@ void SkDraw::drawBitmap(const SkBitmap& bitmap, const SkMatrix& prematrix,
}
}
-void SkDraw::drawSprite(const SkBitmap& bitmap, int x, int y,
- const SkPaint& origPaint) const {
+void SkDraw::drawSprite(const SkBitmap& bitmap, int x, int y, const SkPaint& origPaint) const {
SkDEBUGCODE(this->validate();)
// nothing to draw
@@ -1325,8 +1321,7 @@ void SkDraw::drawSprite(const SkBitmap& bitmap, int x, int y,
return;
}
- SkIRect bounds;
- bounds.set(x, y, x + bitmap.width(), y + bitmap.height());
+ const SkIRect bounds = SkIRect::MakeXYWH(x, y, bitmap.width(), bitmap.height());
if (fRC->quickReject(bounds)) {
return; // nothing to draw
@@ -1335,12 +1330,16 @@ void SkDraw::drawSprite(const SkBitmap& bitmap, int x, int y,
SkPaint paint(origPaint);
paint.setStyle(SkPaint::kFill_Style);
- if (NULL == paint.getColorFilter() && clipHandlesSprite(*fRC, x, y, bitmap)) {
+ SkAutoPixmapUnlock unlocker;
+ if (!bitmap.requestLock(&unlocker)) {
+ return;
+ }
+ const SkPixmap& pmap = unlocker.pixmap();
+
+ if (NULL == paint.getColorFilter() && clipHandlesSprite(*fRC, x, y, pmap)) {
SkTBlitterAllocator allocator;
// blitter will be owned by the allocator.
- SkBlitter* blitter = SkBlitter::ChooseSprite(*fBitmap, paint, bitmap,
- x, y, &allocator);
-
+ SkBlitter* blitter = SkBlitter::ChooseSprite(*fBitmap, paint, pmap, x, y, &allocator);
if (blitter) {
SkScan::FillIRect(bounds, *fRC, blitter);
return;
diff --git a/src/core/SkSpriteBlitter.h b/src/core/SkSpriteBlitter.h
index 0bbc8561d0..5cc483f682 100644
--- a/src/core/SkSpriteBlitter.h
+++ b/src/core/SkSpriteBlitter.h
@@ -1,4 +1,3 @@
-
/*
* Copyright 2006 The Android Open Source Project
*
@@ -6,7 +5,6 @@
* found in the LICENSE file.
*/
-
#ifndef SkSpriteBlitter_DEFINED
#define SkSpriteBlitter_DEFINED
@@ -20,31 +18,25 @@ class SkPaint;
class SkSpriteBlitter : public SkBlitter {
public:
- SkSpriteBlitter(const SkBitmap& source);
+ SkSpriteBlitter(const SkPixmap& source);
- virtual bool setup(const SkBitmap& device, int left, int top, const SkPaint& paint);
+ virtual void setup(const SkBitmap& device, int left, int top, const SkPaint&);
- // overrides
#ifdef SK_DEBUG
- virtual void blitH(int x, int y, int width);
- virtual void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_t runs[]);
- virtual void blitV(int x, int y, int height, SkAlpha alpha);
- virtual void blitMask(const SkMask&, const SkIRect& clip);
+ void blitH(int x, int y, int width) override;
+ void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_t runs[]) override;
+ void blitV(int x, int y, int height, SkAlpha alpha) override;
+ void blitMask(const SkMask&, const SkIRect& clip) override;
#endif
- static SkSpriteBlitter* ChooseD16(const SkBitmap& source, const SkPaint&,
- SkTBlitterAllocator*);
- static SkSpriteBlitter* ChooseD32(const SkBitmap& source, const SkPaint&,
- SkTBlitterAllocator*);
+ static SkSpriteBlitter* ChooseD16(const SkPixmap& source, const SkPaint&, SkTBlitterAllocator*);
+ static SkSpriteBlitter* ChooseD32(const SkPixmap& source, const SkPaint&, SkTBlitterAllocator*);
protected:
const SkBitmap* fDevice;
- const SkPixmap* fSource;
+ const SkPixmap fSource;
int fLeft, fTop;
const SkPaint* fPaint;
-
-private:
- SkAutoPixmapUnlock fUnlocker;
};
#endif
diff --git a/src/core/SkSpriteBlitterTemplate.h b/src/core/SkSpriteBlitterTemplate.h
index 0243e4f28a..3806dbcd31 100644
--- a/src/core/SkSpriteBlitterTemplate.h
+++ b/src/core/SkSpriteBlitterTemplate.h
@@ -1,4 +1,3 @@
-
/*
* Copyright 2006 The Android Open Source Project
*
@@ -6,12 +5,9 @@
* found in the LICENSE file.
*/
-
-
class SkSPRITE_CLASSNAME : public SkSpriteBlitter {
public:
- SkSPRITE_CLASSNAME(const SkBitmap& source SkSPRITE_ARGS)
- : SkSpriteBlitter(source) {
+ SkSPRITE_CLASSNAME(const SkPixmap& source SkSPRITE_ARGS) : SkSpriteBlitter(source) {
SkSPRITE_INIT
}
@@ -20,15 +16,14 @@ public:
int srcX = x - fLeft;
int srcY = y - fTop;
SkSPRITE_DST_TYPE* SK_RESTRICT dst =fDevice->SkSPRITE_DST_GETADDR(x, y);
- const SkSPRITE_SRC_TYPE* SK_RESTRICT src =
- fSource->SkSPRITE_SRC_GETADDR(srcX, srcY);
+ const SkSPRITE_SRC_TYPE* SK_RESTRICT src = fSource.SkSPRITE_SRC_GETADDR(srcX, srcY);
size_t dstRB = fDevice->rowBytes();
- size_t srcRB = fSource->rowBytes();
+ size_t srcRB = fSource.rowBytes();
SkDEBUGCODE((void)fDevice->SkSPRITE_DST_GETADDR(x + width - 1, y + height - 1);)
- SkDEBUGCODE((void)fSource->SkSPRITE_SRC_GETADDR(srcX + width - 1, srcY + height - 1);)
+ SkDEBUGCODE((void)fSource.SkSPRITE_SRC_GETADDR(srcX + width - 1, srcY + height - 1);)
- SkSPRITE_PREAMBLE((*fSource), srcX, srcY);
+ SkSPRITE_PREAMBLE(fSource, srcX, srcY);
do {
SkSPRITE_DST_TYPE* d = dst;
@@ -48,8 +43,7 @@ public:
} while (--w != 0);
#endif
dst = (SkSPRITE_DST_TYPE* SK_RESTRICT)((char*)dst + dstRB);
- src = (const SkSPRITE_SRC_TYPE* SK_RESTRICT)
- ((const char*)src + srcRB);
+ src = (const SkSPRITE_SRC_TYPE* SK_RESTRICT)((const char*)src + srcRB);
SkSPRITE_NEXT_ROW
#ifdef SkSPRITE_ROW_PROC
y += 1;
diff --git a/src/core/SkSpriteBlitter_ARGB32.cpp b/src/core/SkSpriteBlitter_ARGB32.cpp
index 7d5ac152db..4138b72902 100644
--- a/src/core/SkSpriteBlitter_ARGB32.cpp
+++ b/src/core/SkSpriteBlitter_ARGB32.cpp
@@ -19,7 +19,7 @@
class Sprite_D32_S32 : public SkSpriteBlitter {
public:
- Sprite_D32_S32(const SkBitmap& src, U8CPU alpha) : INHERITED(src) {
+ Sprite_D32_S32(const SkPixmap& src, U8CPU alpha) : INHERITED(src) {
SkASSERT(src.colorType() == kN32_SkColorType);
unsigned flags32 = 0;
@@ -37,9 +37,9 @@ public:
void blitRect(int x, int y, int width, int height) override {
SkASSERT(width > 0 && height > 0);
uint32_t* SK_RESTRICT dst = fDevice->getAddr32(x, y);
- const uint32_t* SK_RESTRICT src = fSource->addr32(x - fLeft, y - fTop);
+ const uint32_t* SK_RESTRICT src = fSource.addr32(x - fLeft, y - fTop);
size_t dstRB = fDevice->rowBytes();
- size_t srcRB = fSource->rowBytes();
+ size_t srcRB = fSource.rowBytes();
SkBlitRow::Proc32 proc = fProc32;
U8CPU alpha = fAlpha;
@@ -61,8 +61,7 @@ private:
class Sprite_D32_XferFilter : public SkSpriteBlitter {
public:
- Sprite_D32_XferFilter(const SkBitmap& source, const SkPaint& paint)
- : SkSpriteBlitter(source) {
+ Sprite_D32_XferFilter(const SkPixmap& source, const SkPaint& paint) : SkSpriteBlitter(source) {
fColorFilter = paint.getColorFilter();
SkSafeRef(fColorFilter);
@@ -90,10 +89,8 @@ public:
SkSafeUnref(fColorFilter);
}
- bool setup(const SkBitmap& device, int left, int top, const SkPaint& paint) override {
- if (!this->INHERITED::setup(device, left, top, paint)) {
- return false;
- }
+ void setup(const SkBitmap& device, int left, int top, const SkPaint& paint) override {
+ this->INHERITED::setup(device, left, top, paint);
int width = device.width();
if (width > fBufferSize) {
@@ -101,7 +98,6 @@ public:
delete[] fBuffer;
fBuffer = new SkPMColor[width];
}
- return true;
}
protected:
@@ -120,15 +116,15 @@ private:
class Sprite_D32_S32A_XferFilter : public Sprite_D32_XferFilter {
public:
- Sprite_D32_S32A_XferFilter(const SkBitmap& source, const SkPaint& paint)
+ Sprite_D32_S32A_XferFilter(const SkPixmap& source, const SkPaint& paint)
: Sprite_D32_XferFilter(source, paint) {}
void blitRect(int x, int y, int width, int height) override {
SkASSERT(width > 0 && height > 0);
uint32_t* SK_RESTRICT dst = fDevice->getAddr32(x, y);
- const uint32_t* SK_RESTRICT src = fSource->addr32(x - fLeft, y - fTop);
+ const uint32_t* SK_RESTRICT src = fSource.addr32(x - fLeft, y - fTop);
size_t dstRB = fDevice->rowBytes();
- size_t srcRB = fSource->rowBytes();
+ size_t srcRB = fSource.rowBytes();
SkColorFilter* colorFilter = fColorFilter;
SkXfermode* xfermode = fXfermode;
@@ -166,15 +162,15 @@ static void fillbuffer(SkPMColor* SK_RESTRICT dst,
class Sprite_D32_S4444_XferFilter : public Sprite_D32_XferFilter {
public:
- Sprite_D32_S4444_XferFilter(const SkBitmap& source, const SkPaint& paint)
+ Sprite_D32_S4444_XferFilter(const SkPixmap& source, const SkPaint& paint)
: Sprite_D32_XferFilter(source, paint) {}
void blitRect(int x, int y, int width, int height) override {
SkASSERT(width > 0 && height > 0);
SkPMColor* SK_RESTRICT dst = fDevice->getAddr32(x, y);
- const SkPMColor16* SK_RESTRICT src = fSource->addr16(x - fLeft, y - fTop);
+ const SkPMColor16* SK_RESTRICT src = fSource.addr16(x - fLeft, y - fTop);
size_t dstRB = fDevice->rowBytes();
- size_t srcRB = fSource->rowBytes();
+ size_t srcRB = fSource.rowBytes();
SkPMColor* SK_RESTRICT buffer = fBuffer;
SkColorFilter* colorFilter = fColorFilter;
SkXfermode* xfermode = fXfermode;
@@ -213,14 +209,14 @@ static void src_row(SkPMColor* SK_RESTRICT dst,
class Sprite_D32_S4444_Opaque : public SkSpriteBlitter {
public:
- Sprite_D32_S4444_Opaque(const SkBitmap& source) : SkSpriteBlitter(source) {}
+ Sprite_D32_S4444_Opaque(const SkPixmap& source) : SkSpriteBlitter(source) {}
void blitRect(int x, int y, int width, int height) override {
SkASSERT(width > 0 && height > 0);
SkPMColor* SK_RESTRICT dst = fDevice->getAddr32(x, y);
- const SkPMColor16* SK_RESTRICT src = fSource->addr16(x - fLeft, y - fTop);
+ const SkPMColor16* SK_RESTRICT src = fSource.addr16(x - fLeft, y - fTop);
size_t dstRB = fDevice->rowBytes();
- size_t srcRB = fSource->rowBytes();
+ size_t srcRB = fSource.rowBytes();
do {
src_row(dst, src, width);
@@ -241,14 +237,14 @@ static void srcover_row(SkPMColor* SK_RESTRICT dst,
class Sprite_D32_S4444 : public SkSpriteBlitter {
public:
- Sprite_D32_S4444(const SkBitmap& source) : SkSpriteBlitter(source) {}
+ Sprite_D32_S4444(const SkPixmap& source) : SkSpriteBlitter(source) {}
void blitRect(int x, int y, int width, int height) override {
SkASSERT(width > 0 && height > 0);
SkPMColor* SK_RESTRICT dst = fDevice->getAddr32(x, y);
- const SkPMColor16* SK_RESTRICT src = fSource->addr16(x - fLeft, y - fTop);
+ const SkPMColor16* SK_RESTRICT src = fSource.addr16(x - fLeft, y - fTop);
size_t dstRB = fDevice->rowBytes();
- size_t srcRB = fSource->rowBytes();
+ size_t srcRB = fSource.rowBytes();
do {
srcover_row(dst, src, width);
@@ -260,7 +256,7 @@ public:
///////////////////////////////////////////////////////////////////////////////
-SkSpriteBlitter* SkSpriteBlitter::ChooseD32(const SkBitmap& source, const SkPaint& paint,
+SkSpriteBlitter* SkSpriteBlitter::ChooseD32(const SkPixmap& source, const SkPaint& paint,
SkTBlitterAllocator* allocator) {
SkASSERT(allocator != NULL);
diff --git a/src/core/SkSpriteBlitter_RGB16.cpp b/src/core/SkSpriteBlitter_RGB16.cpp
index 3cd8306c9b..ce4b2a9923 100644
--- a/src/core/SkSpriteBlitter_RGB16.cpp
+++ b/src/core/SkSpriteBlitter_RGB16.cpp
@@ -32,12 +32,9 @@ static inline void D16_S32A_Blend_Pixel_helper(uint16_t* dst, SkPMColor sc,
db = SkAlphaBlend(SkPacked32ToB16(sc), SkGetPackedB16(dc), src_scale);
} else {
unsigned dst_scale = 255 - SkAlphaMul(sa, src_scale);
- dr = (SkPacked32ToR16(sc) * src_scale +
- SkGetPackedR16(dc) * dst_scale) >> 8;
- dg = (SkPacked32ToG16(sc) * src_scale +
- SkGetPackedG16(dc) * dst_scale) >> 8;
- db = (SkPacked32ToB16(sc) * src_scale +
- SkGetPackedB16(dc) * dst_scale) >> 8;
+ dr = (SkPacked32ToR16(sc) * src_scale + SkGetPackedR16(dc) * dst_scale) >> 8;
+ dg = (SkPacked32ToG16(sc) * src_scale + SkGetPackedG16(dc) * dst_scale) >> 8;
+ db = (SkPacked32ToB16(sc) * src_scale + SkGetPackedB16(dc) * dst_scale) >> 8;
}
*dst = SkPackRGB16(dr, dg, db);
}
@@ -50,15 +47,14 @@ static inline void D16_S32A_Blend_Pixel_helper(uint16_t* dst, SkPMColor sc,
class Sprite_D16_S16_Opaque : public SkSpriteBlitter {
public:
- Sprite_D16_S16_Opaque(const SkBitmap& source)
- : SkSpriteBlitter(source) {}
+ Sprite_D16_S16_Opaque(const SkPixmap& source) : SkSpriteBlitter(source) {}
// overrides
void blitRect(int x, int y, int width, int height) override {
uint16_t* SK_RESTRICT dst = fDevice->getAddr16(x, y);
- const uint16_t* SK_RESTRICT src = fSource->addr16(x - fLeft, y - fTop);
+ const uint16_t* SK_RESTRICT src = fSource.addr16(x - fLeft, y - fTop);
size_t dstRB = fDevice->rowBytes();
- size_t srcRB = fSource->rowBytes();
+ size_t srcRB = fSource.rowBytes();
while (--height >= 0) {
memcpy(dst, src, width << 1);
@@ -257,35 +253,30 @@ static void blitrow_d16_si8(uint16_t* SK_RESTRICT dst,
class Sprite_D16_S32_BlitRowProc : public SkSpriteBlitter {
public:
- Sprite_D16_S32_BlitRowProc(const SkBitmap& source)
- : SkSpriteBlitter(source) {}
+ Sprite_D16_S32_BlitRowProc(const SkPixmap& source) : SkSpriteBlitter(source) {}
- bool setup(const SkBitmap& device, int left, int top,
- const SkPaint& paint) override {
- if (!this->INHERITED::setup(device, left, top, paint)) {
- return false;
- }
+ void setup(const SkBitmap& device, int left, int top, const SkPaint& paint) override {
+ this->INHERITED::setup(device, left, top, paint);
unsigned flags = 0;
if (paint.getAlpha() < 0xFF) {
flags |= SkBlitRow::kGlobalAlpha_Flag;
}
- if (!fSource->isOpaque()) {
+ if (!fSource.isOpaque()) {
flags |= SkBlitRow::kSrcPixelAlpha_Flag;
}
if (paint.isDither()) {
flags |= SkBlitRow::kDither_Flag;
}
fProc = SkBlitRow::Factory16(flags);
- return true;
}
void blitRect(int x, int y, int width, int height) override {
uint16_t* SK_RESTRICT dst = fDevice->getAddr16(x, y);
- const SkPMColor* SK_RESTRICT src = fSource->addr32(x - fLeft, y - fTop);
+ const SkPMColor* SK_RESTRICT src = fSource.addr32(x - fLeft, y - fTop);
size_t dstRB = fDevice->rowBytes();
- size_t srcRB = fSource->rowBytes();
+ size_t srcRB = fSource.rowBytes();
SkBlitRow::Proc16 proc = fProc;
U8CPU alpha = fPaint->getAlpha();
@@ -305,8 +296,8 @@ private:
///////////////////////////////////////////////////////////////////////////////
-SkSpriteBlitter* SkSpriteBlitter::ChooseD16(const SkBitmap& source, const SkPaint& paint,
- SkTBlitterAllocator* allocator) {
+SkSpriteBlitter* SkSpriteBlitter::ChooseD16(const SkPixmap& source, const SkPaint& paint,
+ SkTBlitterAllocator* allocator) {
SkASSERT(allocator != NULL);