Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1842)

Unified Diff: tests/PictureTest.cpp

Issue 788143007: add const to encodePixels pixel parameter (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/images/SkImageEncoder.cpp ('k') | tools/PictureRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
};
« no previous file with comments | « src/images/SkImageEncoder.cpp ('k') | tools/PictureRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698