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

Unified Diff: tests/PaintTest.cpp

Issue 232913003: Make sure SkDrawLooper objects can only be allocated on the heap. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 8 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 | « src/effects/SkLayerDrawLooper.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PaintTest.cpp
diff --git a/tests/PaintTest.cpp b/tests/PaintTest.cpp
index c41e23ac54630e5844710f6427a7a8c1671bb208..cfbe23aa6f63f9ee0ab0151cb5b344bbe3fab13e 100644
--- a/tests/PaintTest.cpp
+++ b/tests/PaintTest.cpp
@@ -147,7 +147,8 @@ DEF_TEST(Paint_copy, reporter) {
paint.setTextAlign(SkPaint::kLeft_Align);
paint.setStrokeWidth(SkIntToScalar(2));
// set a few pointers
- SkLayerDrawLooper* looper = new SkLayerDrawLooper();
+ SkLayerDrawLooper::Builder looperBuilder;
+ SkLayerDrawLooper* looper = looperBuilder.detachLooper();
paint.setLooper(looper)->unref();
SkMaskFilter* mask = SkBlurMaskFilter::Create(SkBlurMaskFilter::kNormal_BlurStyle,
SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(1)));
« no previous file with comments | « src/effects/SkLayerDrawLooper.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698