Index: src/core/SkShader.cpp |
diff --git a/src/core/SkShader.cpp b/src/core/SkShader.cpp |
index b49dae8b5d5769bf5bb745498c165861c22244cc..0078121f2fa0bcafa7fad49f9ba6d1ebfdae852d 100644 |
--- a/src/core/SkShader.cpp |
+++ b/src/core/SkShader.cpp |
@@ -15,8 +15,12 @@ |
#include "SkShader.h" |
#include "SkWriteBuffer.h" |
-SkShader::SkShader() { |
- fLocalMatrix.reset(); |
+SkShader::SkShader(const SkMatrix* localMatrix) { |
+ if (localMatrix) { |
+ fLocalMatrix = *localMatrix; |
+ } else { |
+ fLocalMatrix.reset(); |
+ } |
} |
SkShader::SkShader(SkReadBuffer& buffer) |
@@ -180,9 +184,9 @@ GrEffectRef* SkShader::asNewEffect(GrContext*, const SkPaint&) const { |
return NULL; |
} |
-SkShader* SkShader::CreateBitmapShader(const SkBitmap& src, |
- TileMode tmx, TileMode tmy) { |
- return ::CreateBitmapShader(src, tmx, tmy, NULL); |
+SkShader* SkShader::CreateBitmapShader(const SkBitmap& src, TileMode tmx, TileMode tmy, |
+ const SkMatrix* localMatrix) { |
+ return ::CreateBitmapShader(src, tmx, tmy, localMatrix, NULL); |
} |
SkShader* SkShader::CreatePictureShader(SkPicture* src, TileMode tmx, TileMode tmy) { |