Index: gm/bitmapcopy.cpp |
diff --git a/gm/bitmapcopy.cpp b/gm/bitmapcopy.cpp |
index 928b4037c136000d0d9910102c37ad51c5a4a31d..f210b4aa5e0870e2c55682924c5e93831797be95 100644 |
--- a/gm/bitmapcopy.cpp |
+++ b/gm/bitmapcopy.cpp |
@@ -62,14 +62,14 @@ protected: |
virtual void onDraw(SkCanvas* canvas) { |
SkPaint paint; |
- SkScalar horizMargin(SkIntToScalar(10)); |
- SkScalar vertMargin(SkIntToScalar(10)); |
+ SkScalar horizMargin = 10; |
+ SkScalar vertMargin = 10; |
- SkBitmapDevice devTmp(SkBitmap::kARGB_8888_Config, 40, 40, false); |
- SkCanvas canvasTmp(&devTmp); |
+ SkBitmap src; |
+ src.allocN32Pixels(40, 40); |
+ SkCanvas canvasTmp(src); |
draw_checks(&canvasTmp, 40, 40); |
- SkBitmap src = canvasTmp.getTopDevice()->accessBitmap(false); |
for (unsigned i = 0; i < NUM_CONFIGS; ++i) { |
if (!src.deepCopyTo(&fDst[i], gConfigs[i])) { |