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

Unified Diff: ash/wm/gestures/long_press_affordance_handler.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
« no previous file with comments | « no previous file | cc/damage_tracker_unittest.cc » ('j') | skia/ext/refptr.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/gestures/long_press_affordance_handler.cc
diff --git a/ash/wm/gestures/long_press_affordance_handler.cc b/ash/wm/gestures/long_press_affordance_handler.cc
index 25d3a4dcea3a377590549efea307dc89751a3893..3127791ffedc0203070959faec791cf158e30e91 100644
--- a/ash/wm/gestures/long_press_affordance_handler.cc
+++ b/ash/wm/gestures/long_press_affordance_handler.cc
@@ -105,7 +105,7 @@ void PaintAffordanceGlow(gfx::Canvas* canvas,
int radius = (end_radius + start_radius) / 2;
int glow_width = end_radius - start_radius;
sk_center.iset(center.x(), center.y());
- SkShader* shader = SkGradientShader::CreateTwoPointRadial(
+ skia::RefPtr<SkShader> shader = SkGradientShader::CreateTwoPointRadial(
sk_center,
SkIntToScalar(start_radius),
sk_center,
@@ -118,9 +118,8 @@ void PaintAffordanceGlow(gfx::Canvas* canvas,
SkPaint paint;
paint.setStyle(SkPaint::kStroke_Style);
paint.setStrokeWidth(glow_width);
- paint.setShader(shader);
+ paint.setShader(shader.get());
paint.setAntiAlias(true);
- shader->unref();
SkPath arc_path;
arc_path.addArc(SkRect::MakeXYWH(center.x() - radius,
center.y() - radius,
« no previous file with comments | « no previous file | cc/damage_tracker_unittest.cc » ('j') | skia/ext/refptr.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698