diff options
Diffstat (limited to 'samplecode')
| -rw-r--r-- | samplecode/SampleTextOnPath.cpp | 8 | ||||
| -rw-r--r-- | samplecode/SampleTiling.cpp | 14 | ||||
| -rw-r--r-- | samplecode/SampleUnpremul.cpp | 8 |
3 files changed, 15 insertions, 15 deletions
diff --git a/samplecode/SampleTextOnPath.cpp b/samplecode/SampleTextOnPath.cpp index f2b9af6732..6d79e20755 100644 --- a/samplecode/SampleTextOnPath.cpp +++ b/samplecode/SampleTextOnPath.cpp @@ -35,10 +35,10 @@ static void textStrokePath(SkCanvas* canvas) { canvas->drawPath(path, paint); - paint.setLooper(new SkBlurDrawLooper(SK_ColorBLACK, - SkBlurMask::ConvertRadiusToSigma(0.002f), - 0.0f, - 0.0f))->unref(); + paint.setLooper(SkBlurDrawLooper::Create(SK_ColorBLACK, + SkBlurMask::ConvertRadiusToSigma(0.002f), + 0.0f, + 0.0f))->unref(); const char* text = "DRAWING STROKED TEXT WITH A BLUR ON A PATH"; size_t len = strlen(text); diff --git a/samplecode/SampleTiling.cpp b/samplecode/SampleTiling.cpp index faa8d80144..7d109fd50f 100644 --- a/samplecode/SampleTiling.cpp +++ b/samplecode/SampleTiling.cpp @@ -62,13 +62,13 @@ static const int gWidth = 32; static const int gHeight = 32; class TilingView : public SampleView { - SkAutoTUnref<SkPicture> fTextPicture; - SkBlurDrawLooper fLooper; + SkAutoTUnref<SkPicture> fTextPicture; + SkAutoTUnref<SkBlurDrawLooper> fLooper; public: TilingView() - : fLooper(0x88000000, - SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(1)), - SkIntToScalar(2), SkIntToScalar(2)) { + : fLooper(SkBlurDrawLooper::Create(0x88000000, + SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(1)), + SkIntToScalar(2), SkIntToScalar(2))) { for (size_t i = 0; i < SK_ARRAY_COUNT(gColorTypes); i++) { makebm(&fTexture[i], gColorTypes[i], gWidth, gHeight); } @@ -116,7 +116,7 @@ protected: SkString str; p.setAntiAlias(true); p.setDither(true); - p.setLooper(&fLooper); + p.setLooper(fLooper); str.printf("[%s,%s]", gModeNames[kx], gModeNames[ky]); p.setTextAlign(SkPaint::kCenter_Align); @@ -150,7 +150,7 @@ protected: SkPaint p; SkString str; p.setAntiAlias(true); - p.setLooper(&fLooper); + p.setLooper(fLooper); str.printf("%s, %s", gConfigNames[i], gFilterNames[j]); textCanvas->drawText(str.c_str(), str.size(), x, y + r.height() * 2 / 3, p); } diff --git a/samplecode/SampleUnpremul.cpp b/samplecode/SampleUnpremul.cpp index f2f60cc312..0b1848df95 100644 --- a/samplecode/SampleUnpremul.cpp +++ b/samplecode/SampleUnpremul.cpp @@ -85,10 +85,10 @@ protected: SkPaint paint; paint.setAntiAlias(true); paint.setTextSize(SkIntToScalar(24)); - SkAutoTUnref<SkBlurDrawLooper> looper(SkNEW_ARGS(SkBlurDrawLooper, - (SK_ColorBLUE, - SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(2)), - 0, 0))); + SkAutoTUnref<SkBlurDrawLooper> looper( + SkBlurDrawLooper::Create(SK_ColorBLUE, + SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(2)), + 0, 0)); paint.setLooper(looper); SkScalar height = paint.getFontMetrics(NULL); if (!fDecodeSucceeded) { |
