diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-04-28 14:55:39 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-04-28 14:55:39 +0000 |
commit | 9c9005a347e9996f357bd79591bd34f74f8bbc66 (patch) | |
tree | 5e03fa9c44510f969be6dee9641968574dbed932 /tests/DrawBitmapRectTest.cpp | |
parent | c76a4b2a81b5c502ded23dee1e0c5d762028d5cf (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 'tests/DrawBitmapRectTest.cpp')
-rw-r--r-- | tests/DrawBitmapRectTest.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/DrawBitmapRectTest.cpp b/tests/DrawBitmapRectTest.cpp index 9912643566..e6cc781f18 100644 --- a/tests/DrawBitmapRectTest.cpp +++ b/tests/DrawBitmapRectTest.cpp @@ -197,8 +197,6 @@ static void test_wacky_bitmapshader(skiatest::Reporter* reporter, bm.allocN32Pixels(width, height); bm.eraseColor(SK_ColorRED); - SkShader* s = SkShader::CreateBitmapShader(bm, SkShader::kRepeat_TileMode, - SkShader::kRepeat_TileMode); matrix.setAll(0.0078740157f, 0, SkIntToScalar(249), @@ -206,7 +204,8 @@ static void test_wacky_bitmapshader(skiatest::Reporter* reporter, 0.0078740157f, SkIntToScalar(239), 0, 0, SK_Scalar1); - s->setLocalMatrix(matrix); + SkShader* s = SkShader::CreateBitmapShader(bm, SkShader::kRepeat_TileMode, + SkShader::kRepeat_TileMode, &matrix); SkPaint paint; paint.setShader(s)->unref(); |