From 9c9005a347e9996f357bd79591bd34f74f8bbc66 Mon Sep 17 00:00:00 2001 From: "commit-bot@chromium.org" Date: Mon, 28 Apr 2014 14:55:39 +0000 Subject: 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 --- gm/shadertext3.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'gm/shadertext3.cpp') diff --git a/gm/shadertext3.cpp b/gm/shadertext3.cpp index a1c2d6006b..6ae3159b91 100644 --- a/gm/shadertext3.cpp +++ b/gm/shadertext3.cpp @@ -100,14 +100,15 @@ protected: int i = 0; for (size_t tm0 = 0; tm0 < SK_ARRAY_COUNT(kTileModes); ++tm0) { for (size_t tm1 = 0; tm1 < SK_ARRAY_COUNT(kTileModes); ++tm1) { - SkAutoTUnref shader(SkShader::CreateBitmapShader(fBmp, - kTileModes[tm0], - kTileModes[tm1])); SkMatrix localM; localM.setTranslate(5.f, 5.f); localM.postRotate(20); localM.postScale(1.15f, .85f); - shader->setLocalMatrix(localM); + + SkAutoTUnref shader(SkShader::CreateBitmapShader(fBmp, + kTileModes[tm0], + kTileModes[tm1], + &localM)); SkPaint fillPaint; fillPaint.setAntiAlias(true); -- cgit v1.2.3