aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar fmalita <fmalita@chromium.org>2014-12-08 09:04:05 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-12-08 09:04:05 -0800
commit2be0fd8dcbd1155ba4b702f1a606f3a816759dbb (patch)
treeb9fd6ff82aa2c279822df2dd43eab75deb990ce5
parent999f5e73a18cb68d36b02560f5ca595217fc8a6b (diff)
Constify CreatePictureShader's picture arg.
R=robertphillips@google.com Review URL: https://codereview.chromium.org/768113004
-rw-r--r--include/core/SkShader.h3
-rw-r--r--src/core/SkShader.cpp2
2 files changed, 2 insertions, 3 deletions
diff --git a/include/core/SkShader.h b/include/core/SkShader.h
index 0033485e29..8018cd44ff 100644
--- a/include/core/SkShader.h
+++ b/include/core/SkShader.h
@@ -443,7 +443,6 @@ public:
* @param src The picture to use inside the shader (if not NULL, its ref count
* is incremented). The SkPicture must not be changed after
* successfully creating a picture shader.
- * FIXME: src cannot be const due to SkCanvas::drawPicture
* @param tmx The tiling mode to use when sampling the bitmap in the x-direction.
* @param tmy The tiling mode to use when sampling the bitmap in the y-direction.
* @param tile The tile rectangle in picture coordinates: this represents the subset
@@ -453,7 +452,7 @@ public:
* bounds.
* @return Returns a new shader object. Note: this function never returns null.
*/
- static SkShader* CreatePictureShader(SkPicture* src,
+ static SkShader* CreatePictureShader(const SkPicture* src,
TileMode tmx, TileMode tmy,
const SkMatrix* localMatrix,
const SkRect* tile);
diff --git a/src/core/SkShader.cpp b/src/core/SkShader.cpp
index 9c2fc2f100..65caf7b0fc 100644
--- a/src/core/SkShader.cpp
+++ b/src/core/SkShader.cpp
@@ -236,7 +236,7 @@ SkShader* SkShader::CreateBitmapShader(const SkBitmap& src, TileMode tmx, TileMo
return SkCreateBitmapShader(src, tmx, tmy, localMatrix, NULL);
}
-SkShader* SkShader::CreatePictureShader(SkPicture* src, TileMode tmx, TileMode tmy,
+SkShader* SkShader::CreatePictureShader(const SkPicture* src, TileMode tmx, TileMode tmy,
const SkMatrix* localMatrix, const SkRect* tile) {
return SkPictureShader::Create(src, tmx, tmy, localMatrix, tile);
}