diff options
author | reed <reed@google.com> | 2016-03-25 09:08:00 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-25 09:08:00 -0700 |
commit | fe63045f075165b1be5d3e7fc5c710021d85f53b (patch) | |
tree | c60f764504ba1d622613a432c88e43f7f65c0fec /src/core/SkLightingShader.cpp | |
parent | cce49271124ff75c880dc0dfed1489f02c82890b (diff) |
move setshader to sk_sp, re-using SK_SUPPORT_LEGACY_CREATESHADER_PTR
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1829303002
Review URL: https://codereview.chromium.org/1829303002
Diffstat (limited to 'src/core/SkLightingShader.cpp')
-rw-r--r-- | src/core/SkLightingShader.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/SkLightingShader.cpp b/src/core/SkLightingShader.cpp index 02f75f3516..d8e88c9a0a 100644 --- a/src/core/SkLightingShader.cpp +++ b/src/core/SkLightingShader.cpp @@ -700,10 +700,10 @@ static bool bitmap_is_too_big(const SkBitmap& bm) { return bm.width() > kMaxSize || bm.height() > kMaxSize; } -SkShader* SkLightingShader::Create(const SkBitmap& diffuse, const SkBitmap& normal, - const Lights* lights, - const SkVector& invNormRotation, - const SkMatrix* diffLocalM, const SkMatrix* normLocalM) { +sk_sp<SkShader> SkLightingShader::Make(const SkBitmap& diffuse, const SkBitmap& normal, + const Lights* lights, + const SkVector& invNormRotation, + const SkMatrix* diffLocalM, const SkMatrix* normLocalM) { if (diffuse.isNull() || bitmap_is_too_big(diffuse) || normal.isNull() || bitmap_is_too_big(normal) || diffuse.width() != normal.width() || @@ -713,8 +713,8 @@ SkShader* SkLightingShader::Create(const SkBitmap& diffuse, const SkBitmap& norm SkASSERT(SkScalarNearlyEqual(invNormRotation.lengthSqd(), SK_Scalar1)); - return new SkLightingShaderImpl(diffuse, normal, lights, invNormRotation, diffLocalM, - normLocalM); + return sk_make_sp<SkLightingShaderImpl>(diffuse, normal, lights, invNormRotation, diffLocalM, + normLocalM); } /////////////////////////////////////////////////////////////////////////////// |