Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(225)

Unified Diff: ui/views/touchui/touch_selection_controller_impl.cc

Issue 11418217: Add skia::RefPtr class to wrap ref counted classes from Skia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Drop TNoRef Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/views/touchui/touch_selection_controller_impl.cc
diff --git a/ui/views/touchui/touch_selection_controller_impl.cc b/ui/views/touchui/touch_selection_controller_impl.cc
index 4b06e0945c9da42117676912e47122d45bd390e6..4c10fb5c71c1e40d7ce77642a476685d9f7b3b78 100644
--- a/ui/views/touchui/touch_selection_controller_impl.cc
+++ b/ui/views/touchui/touch_selection_controller_impl.cc
@@ -253,14 +253,13 @@ class TouchSelectionControllerImpl::TouchContextMenuView
points[0].iset(0, 0);
points[1].iset(0, height());
- SkShader* shader = SkGradientShader::CreateLinear(points,
+ skia::RefPtr<SkShader> shader = 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);

Powered by Google App Engine
This is Rietveld 408576698