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

Unified Diff: src/codec/SkPngCodec.cpp

Issue 2277903002: SkPngCodec: voidp instead of forward-declares for png.h types. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 months 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/codec/SkPngCodec.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkPngCodec.cpp
diff --git a/src/codec/SkPngCodec.cpp b/src/codec/SkPngCodec.cpp
index 7096933d579f4f4beb8a5933551e3fc54e79ff66..a708f2a1a0ffc485da99f4b8b37cfe0c77d2162f 100644
--- a/src/codec/SkPngCodec.cpp
+++ b/src/codec/SkPngCodec.cpp
@@ -777,8 +777,8 @@ static bool read_header(SkStream* stream, SkPngChunkReader* chunkReader, SkCodec
}
SkPngCodec::SkPngCodec(const SkEncodedInfo& encodedInfo, const SkImageInfo& imageInfo,
- SkStream* stream, SkPngChunkReader* chunkReader, png_structp png_ptr,
- png_infop info_ptr, int bitDepth, int numberPasses)
+ SkStream* stream, SkPngChunkReader* chunkReader, void* png_ptr,
+ void* info_ptr, int bitDepth, int numberPasses)
: INHERITED(encodedInfo, imageInfo, stream)
, fPngChunkReader(SkSafeRef(chunkReader))
, fPng_ptr(png_ptr)
@@ -798,7 +798,7 @@ void SkPngCodec::destroyReadStruct() {
if (fPng_ptr) {
// We will never have a nullptr fInfo_ptr with a non-nullptr fPng_ptr
SkASSERT(fInfo_ptr);
- png_destroy_read_struct(&fPng_ptr, &fInfo_ptr, nullptr);
+ png_destroy_read_struct((png_struct**)&fPng_ptr, (png_info**)&fInfo_ptr, nullptr);
fPng_ptr = nullptr;
fInfo_ptr = nullptr;
}
« no previous file with comments | « src/codec/SkPngCodec.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698