Remove use of SkSmallAllocator from all Loopers.
R=reed@google.com
Change-Id: I22b140ee8e12900de13bc623adb30b5fca3051f9
Reviewed-on: https://skia-review.googlesource.com/7658
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Herb Derby <herb@google.com>
diff --git a/tests/LayerDrawLooperTest.cpp b/tests/LayerDrawLooperTest.cpp
index 8fcbf16..2910341 100644
--- a/tests/LayerDrawLooperTest.cpp
+++ b/tests/LayerDrawLooperTest.cpp
@@ -5,6 +5,7 @@
* found in the LICENSE file.
*/
+#include "SkArenaAlloc.h"
#include "SkBitmap.h"
#include "SkBitmapDevice.h"
#include "SkCanvas.h"
@@ -15,7 +16,6 @@
#include "SkRect.h"
#include "SkRefCnt.h"
#include "SkScalar.h"
-#include "SkSmallAllocator.h"
#include "Test.h"
static SkBitmap make_bm(int w, int h) {
@@ -58,12 +58,8 @@
SkCanvas canvas(&device);
SkPaint paint;
auto looper(looperBuilder.detach());
- SkSmallAllocator<1, 32> allocator;
- SkDrawLooper::Context* context = allocator.createWithIniter(
- looper->contextSize(),
- [&](void* buffer) {
- return looper->createContext(&canvas, buffer);
- });
+ SkArenaAlloc alloc{48};
+ SkDrawLooper::Context* context = looper->makeContext(&canvas, &alloc);
// The back layer should come first.
REPORTER_ASSERT(reporter, context->next(&canvas, &paint));
@@ -101,12 +97,8 @@
SkCanvas canvas(&device);
SkPaint paint;
auto looper(looperBuilder.detach());
- SkSmallAllocator<1, 32> allocator;
- SkDrawLooper::Context* context = allocator.createWithIniter(
- looper->contextSize(),
- [&](void* buffer) {
- return looper->createContext(&canvas, buffer);
- });
+ SkArenaAlloc alloc{48};
+ SkDrawLooper::Context* context = looper->makeContext(&canvas, &alloc);
// The back layer should come first.
REPORTER_ASSERT(reporter, context->next(&canvas, &paint));
@@ -144,12 +136,8 @@
SkCanvas canvas(&device);
SkPaint paint;
sk_sp<SkDrawLooper> looper(looperBuilder.detach());
- SkSmallAllocator<1, 32> allocator;
- SkDrawLooper::Context* context = allocator.createWithIniter(
- looper->contextSize(),
- [&](void* buffer) {
- return looper->createContext(&canvas, buffer);
- });
+ SkArenaAlloc alloc{48};
+ SkDrawLooper::Context* context = looper->makeContext(&canvas, &alloc);
// The back layer should come first.
REPORTER_ASSERT(reporter, context->next(&canvas, &paint));