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

Unified Diff: tests/CodexTest.cpp

Issue 1553303003: Store ninepatch chunks in the png header in CodexTest (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Response to comments Created 4 years, 11 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/SkCodec_libpng.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/CodexTest.cpp
diff --git a/tests/CodexTest.cpp b/tests/CodexTest.cpp
index 94eea65b938ad3d9ec96663b1e8422fde80f02f8..96d03c1f126aa15214db0378c9f2290bb0a72fa1 100644
--- a/tests/CodexTest.cpp
+++ b/tests/CodexTest.cpp
@@ -742,17 +742,17 @@ DEF_TEST(Codec_pngChunkReader, r) {
// Create some chunks that match the Android framework's use.
static png_unknown_chunk gUnknowns[] = {
- { "npOl", (png_byte*)"outline", sizeof("outline"), PNG_HAVE_PLTE },
- { "npLb", (png_byte*)"layoutBounds", sizeof("layoutBounds"), PNG_HAVE_PLTE },
- { "npTc", (png_byte*)"ninePatchData", sizeof("ninePatchData"), PNG_HAVE_PLTE },
+ { "npOl", (png_byte*)"outline", sizeof("outline"), PNG_HAVE_IHDR },
+ { "npLb", (png_byte*)"layoutBounds", sizeof("layoutBounds"), PNG_HAVE_IHDR },
+ { "npTc", (png_byte*)"ninePatchData", sizeof("ninePatchData"), PNG_HAVE_IHDR },
};
png_set_keep_unknown_chunks(png, PNG_HANDLE_CHUNK_ALWAYS, (png_byte*)"npOl\0npLb\0npTc\0", 3);
png_set_unknown_chunks(png, info, gUnknowns, SK_ARRAY_COUNT(gUnknowns));
#if PNG_LIBPNG_VER < 10600
/* Deal with unknown chunk location bug in 1.5.x and earlier */
- png_set_unknown_chunk_location(png, info, 0, PNG_HAVE_PLTE);
- png_set_unknown_chunk_location(png, info, 1, PNG_HAVE_PLTE);
+ png_set_unknown_chunk_location(png, info, 0, PNG_HAVE_IHDR);
+ png_set_unknown_chunk_location(png, info, 1, PNG_HAVE_IHDR);
#endif
png_write_info(png, info);
« no previous file with comments | « src/codec/SkCodec_libpng.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698