Index: src/core/SkDrawLooper.cpp |
diff --git a/src/core/SkDrawLooper.cpp b/src/core/SkDrawLooper.cpp |
index bac2d969c0505d318fe7881c638c1a4750544fd3..b6c587a0fcd4317179b4d85d8e3e3696065b04d3 100644 |
--- a/src/core/SkDrawLooper.cpp |
+++ b/src/core/SkDrawLooper.cpp |
@@ -13,11 +13,12 @@ |
bool SkDrawLooper::canComputeFastBounds(const SkPaint& paint) { |
SkCanvas canvas; |
+ ContextAllocator allocator; |
- this->init(&canvas); |
+ SkDrawLooper::Context* context = this->init(&canvas, &allocator); |
for (;;) { |
SkPaint p(paint); |
- if (this->next(&canvas, &p)) { |
+ if (context->next(&canvas, &p)) { |
p.setLooper(NULL); |
if (!p.canComputeFastBounds()) { |
return false; |
@@ -32,12 +33,13 @@ bool SkDrawLooper::canComputeFastBounds(const SkPaint& paint) { |
void SkDrawLooper::computeFastBounds(const SkPaint& paint, const SkRect& src, |
SkRect* dst) { |
SkCanvas canvas; |
+ ContextAllocator allocator; |
*dst = src; // catch case where there are no loops |
- this->init(&canvas); |
+ SkDrawLooper::Context* context = this->init(&canvas, &allocator); |
for (bool firstTime = true;; firstTime = false) { |
SkPaint p(paint); |
- if (this->next(&canvas, &p)) { |
+ if (context->next(&canvas, &p)) { |
SkRect r(src); |
p.setLooper(NULL); |