aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/effects/SkGradientShader.h
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-28 14:55:39 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-28 14:55:39 +0000
commit9c9005a347e9996f357bd79591bd34f74f8bbc66 (patch)
tree5e03fa9c44510f969be6dee9641968574dbed932 /include/effects/SkGradientShader.h
parentc76a4b2a81b5c502ded23dee1e0c5d762028d5cf (diff)
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
Diffstat (limited to 'include/effects/SkGradientShader.h')
-rw-r--r--include/effects/SkGradientShader.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/include/effects/SkGradientShader.h b/include/effects/SkGradientShader.h
index ed0f1bf75b..871b34a41f 100644
--- a/include/effects/SkGradientShader.h
+++ b/include/effects/SkGradientShader.h
@@ -49,7 +49,8 @@ public:
const SkColor colors[], const SkScalar pos[], int count,
SkShader::TileMode mode,
SkUnitMapper* mapper = NULL,
- uint32_t flags = 0);
+ uint32_t flags = 0,
+ const SkMatrix* localMatrix = NULL);
/** Returns a shader that generates a radial gradient given the center and radius.
<p />
@@ -72,7 +73,8 @@ public:
const SkColor colors[], const SkScalar pos[], int count,
SkShader::TileMode mode,
SkUnitMapper* mapper = NULL,
- uint32_t flags = 0);
+ uint32_t flags = 0,
+ const SkMatrix* localMatrix = NULL);
/** Returns a shader that generates a radial gradient given the start position, start radius, end position and end radius.
<p />
@@ -102,7 +104,8 @@ public:
const SkScalar pos[], int count,
SkShader::TileMode mode,
SkUnitMapper* mapper = NULL,
- uint32_t flags = 0);
+ uint32_t flags = 0,
+ const SkMatrix* localMatrix = NULL);
/**
* Returns a shader that generates a conical gradient given two circles, or
@@ -118,7 +121,8 @@ public:
const SkScalar pos[], int count,
SkShader::TileMode mode,
SkUnitMapper* mapper = NULL,
- uint32_t flags = 0);
+ uint32_t flags = 0,
+ const SkMatrix* localMatrix = NULL);
/** Returns a shader that generates a sweep gradient given a center.
<p />
@@ -139,7 +143,8 @@ public:
static SkShader* CreateSweep(SkScalar cx, SkScalar cy,
const SkColor colors[], const SkScalar pos[],
int count, SkUnitMapper* mapper = NULL,
- uint32_t flags = 0);
+ uint32_t flags = 0,
+ const SkMatrix* localMatrix = NULL);
SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP()
};