Index: gm/gmmain.cpp |
diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp |
index e68ec81cf5c1a293d5416b3b353b5337398365a7..74b332d50457b21ac5fa831a0a894dfbab48c865 100644 |
--- a/gm/gmmain.cpp |
+++ b/gm/gmmain.cpp |
@@ -954,7 +954,10 @@ public: |
//@todo thudson 22 April 2011 when can we safely delete [] dst? |
storage.copyTo(dst); |
SkMemoryStream pictReadback(dst, streamSize); |
- SkPicture* retval = new SkPicture (&pictReadback); |
+ bool success; |
+ // Pass a decoding bitmap function so that the factory GM (which has an SkBitmap with |
+ // encoded data) does not fail. |
+ SkPicture* retval = new SkPicture (&pictReadback, &success, &SkImageDecoder::DecodeMemory); |
return retval; |
} |
@@ -1045,7 +1048,9 @@ public: |
setup_bitmap(gRec, size, &bitmap); |
SkCanvas canvas(bitmap); |
installFilter(&canvas); |
- PipeController pipeController(&canvas); |
+ // Pass a decoding function so the factory GM (which has an SkBitmap |
+ // with encoded data) will not fail playback. |
+ PipeController pipeController(&canvas, &SkImageDecoder::DecodeMemory); |
SkGPipeWriter writer; |
SkCanvas* pipeCanvas = writer.startRecording(&pipeController, |
gPipeWritingFlagCombos[i].flags, |
@@ -1084,7 +1089,7 @@ public: |
setup_bitmap(gRec, size, &bitmap); |
SkCanvas canvas(bitmap); |
installFilter(&canvas); |
- TiledPipeController pipeController(bitmap); |
+ TiledPipeController pipeController(bitmap, &SkImageDecoder::DecodeMemory); |
SkGPipeWriter writer; |
SkCanvas* pipeCanvas = writer.startRecording(&pipeController, |
gPipeWritingFlagCombos[i].flags, |