aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/libpng
Commit message (Collapse)AuthorAge
* Add a png.imp for include-what-you-use.Gravatar Ben Wagner2018-03-14
| | | | | | | | | | | | | The png.h header provides some macros and declarations from subincludes. By default include-what-you-use will suggest using these subincludes directly, but this was not the intent of png.h. This adds a mapping file so that include-what-you-use knows that these subincludes are actually private and png.h should be used instead. Change-Id: Ibf9df6dbdbde0e657f6e548ed0e8f2310f44cfea Reviewed-on: https://skia-review.googlesource.com/114481 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Support pngs with incorrect CMF bytesGravatar Leon Scroggins III2018-02-28
| | | | | | | | | | | | | Bug: chromium:807324 Though these pngs are technically incorrect, many such PNGs exist, and they are supported in Chromium. Ensure that users of SkCodec (e.g. Android, Flutter) display them as well. Change-Id: I2f1e573b4b7039cea81f96397cc0aa4cbc9461c3 Reviewed-on: https://skia-review.googlesource.com/111082 Commit-Queue: Leon Scroggins <scroggo@google.com> Reviewed-by: Derek Sollenberger <djsollen@google.com>
* roll libpng to 1.6.33Gravatar Mike Klein2017-10-02
| | | | | | | | | | | | | Apparently 1.6.34 has been released too, but I can't find it in Git, and 1.6.33 is the one with that patch we're really interested in, right? Let's also just #include the prebuilt pnglibconf.h to make it clear that it's unchanged from the original? Change-Id: Ia415486f30c7aff1575f96add8edce855eef9207 Reviewed-on: https://skia-review.googlesource.com/54040 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* libpng: update to 1.6.32, pull using DEPSGravatar Mike Klein2017-09-19
| | | | | | | | | | | I'd have done this as two steps, but we didn't have a pure copy of libpng to start with. The patches we did have, though, have been upstreamed and are now unneeded. Change-Id: I884b9bc47afe5000f5a521f66a3bb95c0411b39a Reviewed-on: https://skia-review.googlesource.com/48620 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Strengthen is_official_build, update docs.Gravatar Mike Klein2017-03-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes is_official_build turn off all development targets and features in Skia, including building third-party dependencies from source. This will intentionally break some external users, who will find themselves no longer able to find third-party headers or link against third-party libraries. These users have been building with our testing third-party dependencies unknowingly. They'll need to either explicitly turn back on building each dependency from source (skia_use_system_foo=false) or disable that dependency entirely (skia_use_foo=false). is_skia_standalone is now basically !is_official_build, so I've propagated that through, removing is_skia_standalone. In a few places we were using it as a stand-in for defined(ndk), so I've just written defined(ndk) there. Duh. gn_to_bp: is_offical_build's new strength also makes gn_to_bp.py simpler to write. In spirit, Android builds are official Skia builds that also build DM and nanobench. It seems that SkJumper (src/jumper/*) is (unintentionally) enabled on Android. Switching to an is_official_build would have disabled that. But as that accidental launch seems to have gone fine, I've kept it explicitly enabled. In the end, no changes to Android.bp or its SkUserConfig.h. The -Mini builder no longer needs to explicitly disable tools. CQ_INCLUDE_TRYBOTS=skia.primary:Build-Ubuntu-Clang-x86_64-Release-Mini Change-Id: Id06e53268a5caf55c6046ada354a0863c3031c73 Reviewed-on: https://skia-review.googlesource.com/9190 Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* GN: turn on libpng SSE2 filtersGravatar Mike Klein2016-11-07
| | | | | | | | | | | | | | | | | I was profiling and remembered GN hasn't turned on much CPU-specific code. I looked at zlib, then libpng, then libjpeg-turbo: - zlib was easy but not useful. No routine we use in decoding changes significantly. - libpng was easy and useful, and we were already using NEON filters on ARM. - libjpeg-turbo requires yasm and is annoying. BUG=skia:5875 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4531 Change-Id: Ie072a457da41ee6538eebacb5eb5dbe5a6eb585e Reviewed-on: https://skia-review.googlesource.com/4531 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Matt Sarett <msarett@google.com>
* Allow most third_party targets to use system libraries if asked.Gravatar Mike Klein2016-11-01
| | | | | | | | | | | | | | | | | This extends the pattern in freetype2 to expat, icu, libjpeg-turbo, libpng, libwebp, and zlib, and gives all these an arg to control which to use. Homebrew doesn't have dng_sdk, piex, or sftnly, or I'd have done the same for them too. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4260 DOCS_PREVIEW= https://skia.org/?cl=4260 Change-Id: I82e780502bf2217336e791787f172a6fc8f55460 Reviewed-on: https://skia-review.googlesource.com/4260 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Hal Canary <halcanary@google.com>
* GN: AndroidGravatar mtklein2016-08-25
| | | | | | | | | | | | | | | | Once you have downloaded an android NDK, you can set the ndk GN arg to use it. E.g. my gn.args looks like: is_debug = false ndk = "/opt/android-ndk" This should be enough to get you going for an arm64 build. You ought to be able to tweak that to other architectures by changing target_cpu to "arm", "x86", "x86-64", etc. That won't quite work until I follow this up a bit, but the skeleton is there. This is enough to get me compiled, linked, and running to completion on my N5x. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2275983004 Review-Url: https://codereview.chromium.org/2275983004
* GN: dmGravatar mtklein2016-07-27
| | | | | | | | | | | | | | | | This builds, links, and runs on Linux. Have not tried Mac. I've tested is_debug={true,false} and is_component_build. It's neat that the component build DM works, but it's also an indication I've missed an essential flag or two... it shouldn't work. :) The GPU backend isn't working yet, but all the software configurations I've tried look good. This fleshes out all the other parts of SkCodec too... I noticed we weren't able to decode gifs or webp. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2188643002 Review-Url: https://codereview.chromium.org/2188643002
* GN: fixes for MacGravatar mtklein2016-07-27
| | | | | | | | | | | | | | - Make fiddle build on Mac (skipping GL). - Now that we're building in SkCodec, we depend on libpng and libjpeg-turbo unconditionally, not just on Linux. - Re-arrange third_party a bit so that our targets are Fuchsia/Chrome compatible. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2184133002 NOTREECHECKS=true This doesn't affect Chrome/Blink, so landing through the closed tree. Review-Url: https://codereview.chromium.org/2184133002
* Prefix png functionsGravatar scroggo2016-06-06
| | | | | | | | | This way multiple copies of libpng can coexist. Update libpng's README.google GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2046603002 Review-Url: https://codereview.chromium.org/2046603002
* Update pnglibconf.hGravatar scroggo2016-06-06
| | | | | | | | | | It should have been updated when we updated the version. Update README.google to better reflect the difference from the original file. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2042833002 Review-Url: https://codereview.chromium.org/2042833002
* Fix undefined behavior in libpngGravatar scroggo2016-06-03
| | | | | | | | | Check for a null source before calling memcpy. BUG=skia:5390 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2040433002 Review-Url: https://codereview.chromium.org/2040433002
* Check libpng directly into third_party/Gravatar scroggo2016-06-02
| | | | | | | | | | | | | | | | | | | With this change, the CMake build, which does not use DEPS to sync external projects, is able to build and use the same version of libpng that is used in other builds. This will allow all platforms (including Google3 CMake build) to test on the same version of libpng, so we do not need to make SkPngCodec support all versions of libpng. - Update CMakeLists.txt to use the checked in libpng. - Check in libpng version 1.6.22rc01 - Update README.google - Replace our old LICENSE file with the latest one from libpng GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2033063003 CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot Review-Url: https://codereview.chromium.org/2033063003
* Update libpng to 1.6.22rc01Gravatar msarett2016-05-17
| | | | | | | | | | | | If there are no issues, this version will be released May 26. Let's start testing with it, so we are ready to update Chrome when it is available. BUG=skia:4710 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1983853002 Review-Url: https://codereview.chromium.org/1983853002
* Update libpng to 1.6.22betaGravatar msarett2016-02-19
| | | | | | | | | | Intel SSE filter optimizations have been upstreamed. Let's test on the upstream version (which we can use in Android). BUG=skia:4573 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1710083007 Review URL: https://codereview.chromium.org/1710083007
* Update the version of libpng used by Skia testsGravatar scroggo2016-02-19
| | | | | | | | | | | | | | | | | | | | The version of libpng we were using has some security vulnerabilities. Update to a newer version - 1.6.20 (http://sourceforge.net/p/libpng/code/ci/047737496a77eeb97f9991919dac08ca3c149711/). Update pnglibconf.h. The new version is a copy of the newer version of the file, with our /* custom settings */ tacked onto the end. (The custom settings are unchanged from the last version.) Update the LICENSE. The new version is a copy of the LICENSE that libpng now includes as a separate file. Update the README file to reflect the change in source of the LICENSE file. BUG=skia:4573 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1453373003 Review URL: https://codereview.chromium.org/1453373003
* sketch hooking into PNG_FILTER_OPTIMIZATIONSGravatar mtklein2016-01-27
| | | | | | | | | | | | | | | | | | | | | | | | | | Local timing says this 4-byte Paeth function takes about 0.3x the time the serial libpng code does, dropping from ~10 cycles per byte to ~2.9. bpp=4 is mainly an easy demo. This approach can work for any bpp up to 16, 1 pixel at a time, at roughly the same cost per pixel. Doing more than 1 pixel at a time is a tricky math problem I have yet to attempt to solve. Everything here can be trivially downgraded to MMX, supporting bpp up to 8. It seems to be a little slower (~3.5 cycles per byte), but it would make the code compatible with every x86 that can still power on. I've tried four approaches: - this way; - doing things naively in 16-bit; - a 16-bit version that requires division by 3 (i.e. mulhi_epu16(..., 0x5580) ); - a mostly 8-bit version of the same. They're all fine, but this one is consistently the fastest I've measured. I'd be happy to settle on the naive 16-bit version too, which would have a very clear implementation that's only minorly slower than this version. The other two are way more complicated, and would require us to draw some serious ASCII diagrams to explain. I have learned that the .skp serialization tests (serialize-8888) have a nice side effect of testing the correctness of these filters! (Since writing the description above, I've bumped things up to {Paeth,Sub,Avg} x { 3 bpp, 4 bpp }.) BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1573943002 Review URL: https://codereview.chromium.org/1573943002
* Fix the build on Android devicesGravatar Matt Sarett2015-11-06
|
* Enable both static and dynamically linked libpngGravatar djsollen2015-04-03
| | | | | | | | | | | All platforms except android are configured to use the statically linked copy of libpng. Android uses the system provided dynamic copy for SkImageDecoder and the static copy for SkCodec. The exception being android framework builds that currently use the dynamic copy everywhere. This CL also enables NEON optimizations for libpng. Review URL: https://codereview.chromium.org/1058823002
* Revert of Enable both static and dynamically linked libpng (patchset #4 ↵Gravatar djsollen2015-04-01
| | | | | | | | | | | | | | | | | | | | | | | id:60001 of https://codereview.chromium.org/1032253003/) Reason for revert: breaking the nexus_9 and ios builds. Original issue's description: > Enable both static and dynamically linked libpng > > All platforms except android are configured to use the statically linked copy of libpng. Android uses the system provided dynamic copy for SkImageDecoder and the static copy for SkCodec. The exception being android framework builds that currently use the dynamic copy everywhere. > > This CL also enables NEON optimizations for libpng. > > Committed: https://skia.googlesource.com/skia/+/2469c999518e7b0063d35e9e2eb074a0477c21ac TBR=scroggo@google.com,msarett@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1050183002
* Enable both static and dynamically linked libpngGravatar djsollen2015-04-01
| | | | | | | | All platforms except android are configured to use the statically linked copy of libpng. Android uses the system provided dynamic copy for SkImageDecoder and the static copy for SkCodec. The exception being android framework builds that currently use the dynamic copy everywhere. This CL also enables NEON optimizations for libpng. Review URL: https://codereview.chromium.org/1032253003
* Add SkCodec, including PNG implementation.Gravatar scroggo2015-03-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DM: Add a flag to use SkCodec instead of SkImageDecoder. SkCodec: Base class for codecs, allowing creation from an SkStream or an SkData. An SkCodec, on creation, knows properties of the data like its width and height. Further calls can be used to generate the image. TODO: Add scanline iterator SkPngCodec: New decoder for png. Wraps libpng. The code has been repurposed from SkImageDecoder_libpng. TODO: Handle other destination colortypes TODO: Substitute the transpose color TODO: Allow silencing warnings TODO: Use RGB instead of filler? TODO: sRGB SkSwizzler: Simplified version of SkScaledSampler. Unlike the sampler, this object does no sampling. TODO: Implement other swizzles. Requires a gclient sync to pull down libpng. BUG=skia:3257 Committed: https://skia.googlesource.com/skia/+/ca358852b4fed656d11107b2aaf28318a4518b49 (and then reverted) Review URL: https://codereview.chromium.org/930283002
* remove libpng and zlib from third_party Gravatar epoger@google.com2011-06-16
| | | | | | | | http://codereview.appspot.com/4571077 git-svn-id: http://skia.googlecode.com/svn/trunk@1609 2bbb7eff-a529-9590-31e7-b0007b416f81
* add libpng source to repo and make Unix build use itGravatar epoger@google.com2011-06-15
http://codereview.appspot.com/4572067 git-svn-id: http://skia.googlecode.com/svn/trunk@1591 2bbb7eff-a529-9590-31e7-b0007b416f81