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; return bm.width() > maxSize || bm.height() > maxSize;
} }
SkShader* CreateBitmapShader(const SkBitmap& src, SkShader::TileMode tmx, SkShader* SkCreateBitmapShader(const SkBitmap& src, SkShader::TileMode tmx,
SkShader::TileMode tmy, const SkMatrix* localMatrix, SkTBlitterAllocator* allocator) { SkShader::TileMode tmy, const SkMatrix* localMatrix,
SkTBlitterAllocator* allocator) {
SkShader* shader; SkShader* shader;
SkColor color; SkColor color;
if (src.isNull() || bitmapIsTooBig(src)) { 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 // If alloc is non-NULL, it will be used to allocate the returned SkShader, and MUST outlive
// the SkShader. // the SkShader.
SkShader* CreateBitmapShader(const SkBitmap& src, SkShader::TileMode, SkShader::TileMode, SkShader* SkCreateBitmapShader(const SkBitmap& src, SkShader::TileMode, SkShader::TileMode,
const SkMatrix* localMatrix, SkTBlitterAllocator* alloc); const SkMatrix* localMatrix, SkTBlitterAllocator* alloc);
#endif #endif

View File

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

View File

@ -242,7 +242,7 @@ SkShader* SkShader::CreateColorShader(SkColor color) {
SkShader* SkShader::CreateBitmapShader(const SkBitmap& src, TileMode tmx, TileMode tmy, SkShader* SkShader::CreateBitmapShader(const SkBitmap& src, TileMode tmx, TileMode tmy,
const SkMatrix* localMatrix) { 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, SkShader* SkShader::CreatePictureShader(SkPicture* src, TileMode tmx, TileMode tmy,