Move SkShader::fLocalMatrix into SkShader constructor.
As a first step towards removing SkShader::setLocalMatrix, which will make
SkShader thread-safe, remove calls to setLocalMatrix that happen immediately
after the shader is being created. Instead, pass the matrix into the constructor
or factory method.
BUG=skia:1976
R=scroggo@google.com, reed@google.com, skyostil@google.com, mtklein@google.com
Author: dominikg@chromium.org
Review URL: https://codereview.chromium.org/245963010
git-svn-id: http://skia.googlecode.com/svn/trunk@14401 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/effects/gradients/SkLinearGradient.h b/src/effects/gradients/SkLinearGradient.h
index 8d80667..699d76e 100644
--- a/src/effects/gradients/SkLinearGradient.h
+++ b/src/effects/gradients/SkLinearGradient.h
@@ -13,7 +13,7 @@
class SkLinearGradient : public SkGradientShaderBase {
public:
- SkLinearGradient(const SkPoint pts[2], const Descriptor&);
+ SkLinearGradient(const SkPoint pts[2], const Descriptor&, const SkMatrix* localMatrix);
virtual SkShader::Context* createContext(const SkBitmap&, const SkPaint&, const SkMatrix&,
void* storage) const SK_OVERRIDE;