aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/bitmaprect.cpp
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2016-03-09 09:50:50 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-09 09:50:50 -0800
commit2ad1aa67c6894696cdd65ec56057f81031d1c24a (patch)
tree867b2bf372ee13336e3f0525a72d017025a97455 /gm/bitmaprect.cpp
parent7f229ed827d1dc5897acfa87d84b642ce34b678f (diff)
partial switch over to sp usage of shaders
Diffstat (limited to 'gm/bitmaprect.cpp')
-rw-r--r--gm/bitmaprect.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/gm/bitmaprect.cpp b/gm/bitmaprect.cpp
index f855ad77c4..bf06adbe1d 100644
--- a/gm/bitmaprect.cpp
+++ b/gm/bitmaprect.cpp
@@ -1,10 +1,10 @@
-
/*
* Copyright 2011 Google Inc.
*
* 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"
@@ -23,8 +23,8 @@ static void make_bitmap(SkBitmap* bitmap) {
paint.setAntiAlias(true);
const SkPoint pts[] = { { 0, 0 }, { 64, 64 } };
const SkColor colors[] = { SK_ColorWHITE, SK_ColorBLUE };
- paint.setShader(SkGradientShader::CreateLinear(pts, colors, nullptr, 2,
- SkShader::kClamp_TileMode))->unref();
+ paint.setShader(SkGradientShader::MakeLinear(pts, colors, nullptr, 2,
+ SkShader::kClamp_TileMode));
canvas.drawCircle(32, 32, 32, paint);
}