diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-05 01:00:54 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-05 01:00:54 +0000 |
commit | 3699ae5a17c4b0b68842a673550d86cdc7961728 (patch) | |
tree | cf60fc865bcbdf60e47ca37b43fa7cfd5898f01f /ui/views/touchui | |
parent | f775d10814adf1320c8bf9de8279d473c254dd9e (diff) | |
download | chromium_src-3699ae5a17c4b0b68842a673550d86cdc7961728.zip chromium_src-3699ae5a17c4b0b68842a673550d86cdc7961728.tar.gz chromium_src-3699ae5a17c4b0b68842a673550d86cdc7961728.tar.bz2 |
ui: Use skia::RefPtr<T> for implicit safe reference counting.
R=sky
BUG=163454
Depends on: https://codereview.chromium.org/11418217/
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/11299262
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171107 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/touchui')
-rw-r--r-- | ui/views/touchui/touch_selection_controller_impl.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/ui/views/touchui/touch_selection_controller_impl.cc b/ui/views/touchui/touch_selection_controller_impl.cc index 4b06e09..a6e151b 100644 --- a/ui/views/touchui/touch_selection_controller_impl.cc +++ b/ui/views/touchui/touch_selection_controller_impl.cc @@ -253,14 +253,15 @@ class TouchSelectionControllerImpl::TouchContextMenuView points[0].iset(0, 0); points[1].iset(0, height()); - SkShader* shader = SkGradientShader::CreateLinear(points, - kGradientColors, kGradientPoints, arraysize(kGradientPoints), - SkShader::kRepeat_TileMode); + skia::RefPtr<SkShader> shader = skia::AdoptRef( + SkGradientShader::CreateLinear( + points, kGradientColors, kGradientPoints, + arraysize(kGradientPoints), + SkShader::kRepeat_TileMode)); DCHECK(shader); SkPaint paint; - paint.setShader(shader); - shader->unref(); + paint.setShader(shader.get()); paint.setStyle(SkPaint::kFill_Style); paint.setXfermodeMode(SkXfermode::kSrc_Mode); |