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

Unified Diff: experimental/PdfViewer/SkPdfGraphicsState.cpp

Issue 166583002: Factory methods for heap-allocated SkPathEffect and SkXfermode objects. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update experimental/PdfViewer Created 6 years, 10 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 | « bench/DashBench.cpp ('k') | gm/dashcubics.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/PdfViewer/SkPdfGraphicsState.cpp
diff --git a/experimental/PdfViewer/SkPdfGraphicsState.cpp b/experimental/PdfViewer/SkPdfGraphicsState.cpp
index b52f22ccc71c340e2e880eec2a6500b4798aedb8..76c4120fa33998f36449235c1228eacf3cbf827a 100644
--- a/experimental/PdfViewer/SkPdfGraphicsState.cpp
+++ b/experimental/PdfViewer/SkPdfGraphicsState.cpp
@@ -25,9 +25,9 @@ void SkPdfGraphicsState::applyGraphicsState(SkPaint* paint, bool stroking) {
paint->setStrokeWidth(SkDoubleToScalar(fLineWidth));
// TODO(edisonn): perf, avoid allocs of the intervals
if (fDashArrayLength > 0) {
- paint->setPathEffect(new SkDashPathEffect(fDashArray,
- fDashArrayLength,
- fDashPhase))->unref();
+ paint->setPathEffect(SkDashPathEffect::Create(fDashArray,
+ fDashArrayLength,
+ fDashPhase))->unref();
}
}
« no previous file with comments | « bench/DashBench.cpp ('k') | gm/dashcubics.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698