Index: gm/xfermodes3.cpp |
diff --git a/gm/xfermodes3.cpp b/gm/xfermodes3.cpp |
index bb7d6149c5e3c790a2720b65b4b13597c1832bd2..76c4b88380d6c9d093a0b3522168572be1978a9b 100644 |
--- a/gm/xfermodes3.cpp |
+++ b/gm/xfermodes3.cpp |
@@ -168,8 +168,11 @@ private: |
if (NULL == layerCanvas) { |
canvas->restore(); |
} else { |
- SkBitmap bitmap = layerCanvas->getDevice()->accessBitmap(false); |
- canvas->drawBitmap(bitmap, 0, 0); |
+ SkAutoROCanvasPixels ropixels(layerCanvas); |
+ SkBitmap bitmap; |
+ if (ropixels.asROBitmap(&bitmap)) { |
+ canvas->drawBitmap(bitmap, 0, 0); |
+ } |
} |
r.inset(-SK_ScalarHalf, -SK_ScalarHalf); |