Add Sk prefix to CreateBitmapShader.

It's neither static nor namespaced, so we should probably prefix it.

BUG=skia:

Review URL: https://codereview.chromium.org/754083002
This commit is contained in:
mtklein 2014-11-24 09:11:45 -08:00 committed by Commit bot
parent 01c412e40a
commit 7ef849d45a
4 changed files with 13 additions and 12 deletions

View File

@ -337,8 +337,9 @@ static bool bitmapIsTooBig(const SkBitmap& bm) {
return bm.width() > maxSize || bm.height() > maxSize;
}
SkShader* CreateBitmapShader(const SkBitmap& src, SkShader::TileMode tmx,
SkShader::TileMode tmy, const SkMatrix* localMatrix, SkTBlitterAllocator* allocator) {
SkShader* SkCreateBitmapShader(const SkBitmap& src, SkShader::TileMode tmx,
SkShader::TileMode tmy, const SkMatrix* localMatrix,
SkTBlitterAllocator* allocator) {
SkShader* shader;
SkColor color;
if (src.isNull() || bitmapIsTooBig(src)) {

View File

@ -78,7 +78,7 @@ typedef SkSmallAllocator<3, 1024> SkTBlitterAllocator;
// If alloc is non-NULL, it will be used to allocate the returned SkShader, and MUST outlive
// the SkShader.
SkShader* CreateBitmapShader(const SkBitmap& src, SkShader::TileMode, SkShader::TileMode,
const SkMatrix* localMatrix, SkTBlitterAllocator* alloc);
SkShader* SkCreateBitmapShader(const SkBitmap& src, SkShader::TileMode, SkShader::TileMode,
const SkMatrix* localMatrix, SkTBlitterAllocator* alloc);
#endif

View File

@ -77,9 +77,9 @@ public:
SkAutoBitmapShaderInstall(const SkBitmap& src, const SkPaint& paint,
const SkMatrix* localMatrix = NULL)
: fPaint(paint) /* makes a copy of the paint */ {
fPaint.setShader(CreateBitmapShader(src, SkShader::kClamp_TileMode,
SkShader::kClamp_TileMode,
localMatrix, &fAllocator));
fPaint.setShader(SkCreateBitmapShader(src, SkShader::kClamp_TileMode,
SkShader::kClamp_TileMode,
localMatrix, &fAllocator));
// we deliberately left the shader with an owner-count of 2
SkASSERT(2 == fPaint.getShader()->getRefCnt());
}

View File

@ -242,7 +242,7 @@ SkShader* SkShader::CreateColorShader(SkColor color) {
SkShader* SkShader::CreateBitmapShader(const SkBitmap& src, TileMode tmx, TileMode tmy,
const SkMatrix* localMatrix) {
return ::CreateBitmapShader(src, tmx, tmy, localMatrix, NULL);
return SkCreateBitmapShader(src, tmx, tmy, localMatrix, NULL);
}
SkShader* SkShader::CreatePictureShader(SkPicture* src, TileMode tmx, TileMode tmy,