Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(518)

Unified Diff: src/image/SkImage_Raster.cpp

Issue 409653003: Now able to set the localMatrix when creating a SkShader from a SkImage (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Corrects warnings in windows build Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/image/SkImage_Gpu.cpp ('k') | tests/ImageNewShaderTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkImage_Raster.cpp
diff --git a/src/image/SkImage_Raster.cpp b/src/image/SkImage_Raster.cpp
index 464a4ba7a4177829d0382d89c05f97c6ace3ee5a..828d80276c7b3873fe016feef532b0d45751a803 100644
--- a/src/image/SkImage_Raster.cpp
+++ b/src/image/SkImage_Raster.cpp
@@ -64,7 +64,9 @@ public:
SkPixelRef* getPixelRef() const { return fBitmap.pixelRef(); }
- virtual SkShader* onNewShader(SkShader::TileMode, SkShader::TileMode) const SK_OVERRIDE;
+ virtual SkShader* onNewShader(SkShader::TileMode,
+ SkShader::TileMode,
+ const SkMatrix* localMatrix) const SK_OVERRIDE;
private:
SkImage_Raster() : INHERITED(0, 0) {}
@@ -113,8 +115,11 @@ SkImage_Raster::SkImage_Raster(const Info& info, SkPixelRef* pr, size_t rowBytes
SkImage_Raster::~SkImage_Raster() {}
-SkShader* SkImage_Raster::onNewShader(SkShader::TileMode tileX, SkShader::TileMode tileY) const {
- return SkShader::CreateBitmapShader(fBitmap, tileX, tileY, NULL);
+SkShader* SkImage_Raster::onNewShader(SkShader::TileMode tileX,
+ SkShader::TileMode tileY,
+ const SkMatrix* localMatrix) const
+{
+ return SkShader::CreateBitmapShader(fBitmap, tileX, tileY, localMatrix);
}
void SkImage_Raster::onDraw(SkCanvas* canvas, SkScalar x, SkScalar y, const SkPaint* paint) {
« no previous file with comments | « src/image/SkImage_Gpu.cpp ('k') | tests/ImageNewShaderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698