Index: src/core/SkCanvas.cpp |
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp |
index aa984502aa3273459d10833ac246493c1e06dcf4..cd4dcbc2a509349838e5957b76f4535f00083c0c 100644 |
--- a/src/core/SkCanvas.cpp |
+++ b/src/core/SkCanvas.cpp |
@@ -495,11 +495,9 @@ |
} |
if (SkDrawLooper* looper = paint.getLooper()) { |
- fLooperContext = fLooperContextAllocator.createWithIniter( |
- looper->contextSize(), |
- [&](void* buffer) { |
- return looper->createContext(canvas, buffer); |
- }); |
+ void* buffer = fLooperContextAllocator.reserveT<SkDrawLooper::Context>( |
+ looper->contextSize()); |
+ fLooperContext = looper->createContext(canvas, buffer); |
fIsSimple = false; |
} else { |
fLooperContext = nullptr; |