diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-05-16 13:49:08 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-05-16 13:49:08 +0000 |
commit | e2b193ca5c76f01f8e12b4a92e9bd6ccb3ed4280 (patch) | |
tree | 6fdc1c9c9bbfb0b7be6854a9e6993df145c31792 /gm/shadertext3.cpp | |
parent | dbe0cd13a0e1f437b81f1a63055da6e0fc3b0673 (diff) |
Revert of remove unused (by clients) SkUnitMapper (https://codereview.chromium.org/283273002/)
Reason for revert:
does not address all legacy callsites in chrome.
e.g.
[13:45:32.091872] ../../ui/native_theme/native_theme_base.cc:608:76: error: no matching function for call to ‘SkGradientShader::CreateLinear(SkPoint [3], SkColor [3], NULL, int, SkShader::TileMode, NULL)’
[13:45:32.091919] gradient_bounds, colors, NULL, 3, SkShader::kClamp_TileMode, NULL));
Original issue's description:
> remove unused (by clients) SkUnitMapper
>
> BUG=skia:
>
> Committed: http://code.google.com/p/skia/source/detail?r=14761
R=robertphillips@google.com, scroggo@google.com, george@mozilla.com
TBR=george@mozilla.com, robertphillips@google.com, scroggo@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Author: reed@google.com
Review URL: https://codereview.chromium.org/287063009
git-svn-id: http://skia.googlecode.com/svn/trunk@14763 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gm/shadertext3.cpp')
-rw-r--r-- | gm/shadertext3.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gm/shadertext3.cpp b/gm/shadertext3.cpp index 3c6400d8d6..8aa6e6965c 100644 --- a/gm/shadertext3.cpp +++ b/gm/shadertext3.cpp @@ -4,10 +4,10 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ - #include "gm.h" #include "SkCanvas.h" #include "SkGradientShader.h" +#include "SkUnitMappers.h" namespace skiagm { @@ -26,8 +26,14 @@ static void makebm(SkBitmap* bm, int w, int h) { SkPaint paint; + SkUnitMapper* um = NULL; + + um = new SkCosineMapper; + + SkAutoUnref au(um); + paint.setShader(SkGradientShader::CreateLinear(kPts0, kColors0, kPos, - SK_ARRAY_COUNT(kColors0), SkShader::kClamp_TileMode))->unref(); + SK_ARRAY_COUNT(kColors0), SkShader::kClamp_TileMode, um))->unref(); canvas.drawPaint(paint); paint.setShader(SkGradientShader::CreateLinear(kPts1, kColors1, kPos, SK_ARRAY_COUNT(kColors1), SkShader::kClamp_TileMode))->unref(); |