Index: gm/gmmain.cpp |
diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp |
index 4979d79a544ac381633c808389225bcab015dfb5..e21a714cf76b1b04c260d7edc37fabcc134d6b3c 100644 |
--- a/gm/gmmain.cpp |
+++ b/gm/gmmain.cpp |
@@ -951,7 +951,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; |
} |
@@ -1042,7 +1045,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, |
@@ -1081,7 +1086,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, |