Index: tools/PictureRenderer.cpp |
diff --git a/tools/PictureRenderer.cpp b/tools/PictureRenderer.cpp |
index 123cc2c5cccee9bc08a2d3486abbdd14f573a13b..5af0538a0dd53f71a05bc8a5860fba8a9e4b64a8 100644 |
--- a/tools/PictureRenderer.cpp |
+++ b/tools/PictureRenderer.cpp |
@@ -366,14 +366,10 @@ SkCanvas* RecordPictureRenderer::setupCanvas(int width, int height) { |
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); |
} |
}; |