Index: src/core/SkDrawLooper.cpp |
diff --git a/src/core/SkDrawLooper.cpp b/src/core/SkDrawLooper.cpp |
index e372e8f157f3214960bcb7e16a549c7d56e8135a..aa53f2e3a13176893d84fabaaec25848bd93b288 100644 |
--- a/src/core/SkDrawLooper.cpp |
+++ b/src/core/SkDrawLooper.cpp |
@@ -15,12 +15,9 @@ |
bool SkDrawLooper::canComputeFastBounds(const SkPaint& paint) const { |
SkCanvas canvas; |
SkSmallAllocator<1, 32> allocator; |
+ void* buffer = allocator.reserveT<SkDrawLooper::Context>(this->contextSize()); |
- SkDrawLooper::Context* context = allocator.createWithIniter( |
- this->contextSize(), |
- [&](void* buffer) { |
- return this->createContext(&canvas, buffer); |
- }); |
+ SkDrawLooper::Context* context = this->createContext(&canvas, buffer); |
for (;;) { |
SkPaint p(paint); |
if (context->next(&canvas, &p)) { |
@@ -42,13 +39,10 @@ |
SkCanvas canvas; |
SkSmallAllocator<1, 32> allocator; |
+ void* buffer = allocator.reserveT<SkDrawLooper::Context>(this->contextSize()); |
*dst = src; // catch case where there are no loops |
- SkDrawLooper::Context* context = allocator.createWithIniter( |
- this->contextSize(), |
- [&](void* buffer) { |
- return this->createContext(&canvas, buffer); |
- }); |
+ SkDrawLooper::Context* context = this->createContext(&canvas, buffer); |
for (bool firstTime = true;; firstTime = false) { |
SkPaint p(paint); |
if (context->next(&canvas, &p)) { |