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

Unified Diff: tests/PictureTest.cpp

Issue 1813553005: switch patheffects over to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: try to fix xpsdevice 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 0ac50d97f99222002c8f344fd49ee4ff4347203c..58a08ecc348bf11dfaf9a2cd88c8d792fc5034b4 100644
--- a/tests/PictureTest.cpp
+++ b/tests/PictureTest.cpp
@@ -144,7 +144,7 @@ static void test_gpu_veto(skiatest::Reporter* reporter) {
path.lineTo(50, 50);
SkScalar intervals[] = { 1.0f, 1.0f };
- SkAutoTUnref<SkPathEffect> dash(SkDashPathEffect::Create(intervals, 2, 0));
+ sk_sp<SkPathEffect> dash(SkDashPathEffect::Make(intervals, 2, 0));
SkPaint paint;
paint.setStyle(SkPaint::kStroke_Style);
@@ -233,8 +233,7 @@ static void test_gpu_veto(skiatest::Reporter* reporter) {
{
SkPaint paint;
SkScalar intervals [] = { 10, 20 };
- SkPathEffect* pe = SkDashPathEffect::Create(intervals, 2, 25);
- paint.setPathEffect(pe)->unref();
+ paint.setPathEffect(SkDashPathEffect::Make(intervals, 2, 25));
SkPoint points [2] = { { 0, 0 }, { 100, 0 } };
@@ -250,8 +249,7 @@ static void test_gpu_veto(skiatest::Reporter* reporter) {
{
SkPaint paint;
SkScalar intervals [] = { 10, 20 };
- SkPathEffect* pe = SkDashPathEffect::Create(intervals, 2, 25);
- paint.setPathEffect(pe)->unref();
+ paint.setPathEffect(SkDashPathEffect::Make(intervals, 2, 25));
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