Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit b6d158a

Browse files
reed-at-googleSkia Commit-Bot
authored andcommitted
use SkOnce for singleton patheffect
Change-Id: Iabeadca7dda29d0247536b5a02f977066772e2ee Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291657 Commit-Queue: Mike Reed <[email protected]> Reviewed-by: Mike Klein <[email protected]>
1 parent 3422479 commit b6d158a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/effects/SkOpPathEffect.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ sk_sp<SkFlattenable> SkStrokePE::CreateProc(SkReadBuffer& buffer) {
127127
#include "src/core/SkPathPriv.h"
128128

129129
sk_sp<SkPathEffect> SkStrokeAndFillPathEffect::Make() {
130-
return sk_sp<SkPathEffect>(new SkStrokeAndFillPE);
130+
static SkPathEffect* strokeAndFill = new SkStrokeAndFillPE;
131+
return sk_ref_sp(strokeAndFill);
131132
}
132133

133134
void SkStrokeAndFillPE::flatten(SkWriteBuffer&) const {}

0 commit comments

Comments
 (0)