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

Unified Diff: tests/PictureTest.cpp

Issue 1817543002: Revert of switch patheffects over to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 months 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 | « tests/GpuDrawPathTest.cpp ('k') | tools/debugger/SkDrawCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PictureTest.cpp
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp
index 58a08ecc348bf11dfaf9a2cd88c8d792fc5034b4..0ac50d97f99222002c8f344fd49ee4ff4347203c 100644
--- a/tests/PictureTest.cpp
+++ b/tests/PictureTest.cpp
@@ -144,7 +144,7 @@
path.lineTo(50, 50);
SkScalar intervals[] = { 1.0f, 1.0f };
- sk_sp<SkPathEffect> dash(SkDashPathEffect::Make(intervals, 2, 0));
+ SkAutoTUnref<SkPathEffect> dash(SkDashPathEffect::Create(intervals, 2, 0));
SkPaint paint;
paint.setStyle(SkPaint::kStroke_Style);
@@ -233,7 +233,8 @@
{
SkPaint paint;
SkScalar intervals [] = { 10, 20 };
- paint.setPathEffect(SkDashPathEffect::Make(intervals, 2, 25));
+ SkPathEffect* pe = SkDashPathEffect::Create(intervals, 2, 25);
+ paint.setPathEffect(pe)->unref();
SkPoint points [2] = { { 0, 0 }, { 100, 0 } };
@@ -249,7 +250,8 @@
{
SkPaint paint;
SkScalar intervals [] = { 10, 20 };
- paint.setPathEffect(SkDashPathEffect::Make(intervals, 2, 25));
+ SkPathEffect* pe = SkDashPathEffect::Create(intervals, 2, 25);
+ paint.setPathEffect(pe)->unref();
for (int i = 0; i < 50; ++i) {
canvas->drawRect(SkRect::MakeWH(10, 10), paint);
« no previous file with comments | « tests/GpuDrawPathTest.cpp ('k') | tools/debugger/SkDrawCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698