Index: bench/RectoriBench.cpp |
diff --git a/bench/RectoriBench.cpp b/bench/RectoriBench.cpp |
index ee79ca9964500135b187d8a11e9bbc3d0809ce8c..87f5feef8924dea08bb685cc1d353563ecf7878f 100644 |
--- a/bench/RectoriBench.cpp |
+++ b/bench/RectoriBench.cpp |
@@ -71,7 +71,7 @@ private: |
}; |
SkLayerDrawLooper* createLooper(SkScalar xOff, SkScalar sigma) { |
- SkLayerDrawLooper* looper = new SkLayerDrawLooper; |
+ SkLayerDrawLooper::Builder looperBuilder; |
//----------------------------------------------- |
SkLayerDrawLooper::LayerInfo info; |
@@ -83,7 +83,7 @@ private: |
info.fOffset.set(xOff, 0); |
info.fPostTranslate = false; |
- SkPaint* paint = looper->addLayer(info); |
+ SkPaint* paint = looperBuilder.addLayer(info); |
SkMaskFilter* mf = SkBlurMaskFilter::Create(SkBlurMaskFilter::kNormal_BlurStyle, |
sigma, |
@@ -94,8 +94,8 @@ private: |
info.fPaintBits = 0; |
info.fOffset.set(0, 0); |
- paint = looper->addLayer(info); |
- return looper; |
+ paint = looperBuilder.addLayer(info); |
+ return looperBuilder.detachLooper(); |
} |
typedef SkBenchmark INHERITED; |