Index: tests/PictureTest.cpp |
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp |
index 2881e5f5a825b0e732664a23a30d6b93e4f58575..b98cc4680e1798e68605a6ef6fe62e5460fc1d45 100644 |
--- a/tests/PictureTest.cpp |
+++ b/tests/PictureTest.cpp |
@@ -1448,14 +1448,10 @@ static void test_bad_bitmap() { |
// FIXME: Share with PictureRenderer.cpp? |
class PngPixelSerializer : public SkPixelSerializer { |
public: |
- virtual bool onUseEncodedData(const void*, size_t) SK_OVERRIDE { return true; } |
- virtual SkData* onEncodePixels(const SkImageInfo& info, void* pixels, |
- size_t rowBytes) SK_OVERRIDE { |
- SkBitmap bm; |
- if (!bm.installPixels(info, pixels, rowBytes)) { |
- return NULL; |
- } |
- return SkImageEncoder::EncodeData(bm, SkImageEncoder::kPNG_Type, 100); |
+ bool onUseEncodedData(const void*, size_t) SK_OVERRIDE { return true; } |
+ SkData* onEncodePixels(const SkImageInfo& info, const void* pixels, |
+ size_t rowBytes) SK_OVERRIDE { |
+ return SkImageEncoder::EncodeData(info, pixels, rowBytes, SkImageEncoder::kPNG_Type, 100); |
} |
}; |