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)) {
@ -466,7 +467,7 @@ bool SkBitmapProcShader::asFragmentProcessor(GrContext* context, const SkPaint&
"Couldn't convert bitmap to texture.");
return false;
}
*paintColor = (kAlpha_8_SkColorType == fRawBitmap.colorType()) ?
SkColor2GrColor(paint.getColor()) :
SkColor2GrColorJustAlpha(paint.getColor());
@ -480,7 +481,7 @@ bool SkBitmapProcShader::asFragmentProcessor(GrContext* context, const SkPaint&
return true;
}
#else
#else
bool SkBitmapProcShader::asFragmentProcessor(GrContext*, const SkPaint&, const SkMatrix*, GrColor*,
GrFragmentProcessor**) const {

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());
}
@ -595,7 +595,7 @@ void SkDraw::drawPoints(SkCanvas::PointMode mode, size_t count,
if (newPaint.getStrokeCap() == SkPaint::kRound_Cap) {
SkPath path;
SkMatrix preMatrix;
path.addCircle(0, 0, radius);
for (size_t i = 0; i < count; i++) {
preMatrix.setTranslate(pts[i].fX, pts[i].fY);
@ -1955,7 +1955,7 @@ void SkDraw::drawTextOnPath(const char text[], size_t byteLength,
if (iterPath) {
SkPath tmp;
SkMatrix m(scaledMatrix);
tmp.setIsVolatile(true);
m.postTranslate(xpos + hOffset, 0);
if (matrix) {

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,