Index: gm/ninepatchstretch.cpp |
diff --git a/gm/ninepatchstretch.cpp b/gm/ninepatchstretch.cpp |
index 74cc87f30597f1126bcec5117c346f6d67886d8b..a14af00a4e99b7ccf93c71b2ca5d7503ee8f5c99 100644 |
--- a/gm/ninepatchstretch.cpp |
+++ b/gm/ninepatchstretch.cpp |
@@ -13,7 +13,10 @@ |
const int kSize = 2*kFixed + kStretchy; |
bitmap->allocN32Pixels(kSize, kSize); |
- SkCanvas canvas(*bitmap); |
+ SkBaseDevice* dev = new SkBitmapDevice(*bitmap); |
+ |
+ SkCanvas canvas(dev); |
+ dev->unref(); |
canvas.clear(SK_ColorTRANSPARENT); |
SkRect r = SkRect::MakeWH(SkIntToScalar(kSize), SkIntToScalar(kSize)); |