Reason for revert:
Breaking windows bots all over the place :(
Original issue's description:
> Add SkCodec, including PNG implementation.
>
> 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.
>
> BUG=skia:3257
>
> Committed: https://skia.googlesource.com/skia/+/ca358852b4fed656d11107b2aaf28318a4518b49TBR=reed@google.com,djsollen@google.com,msarett@google.com,mtklein@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:3257
Review URL: https://codereview.chromium.org/972743003
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.
BUG=skia:3257
Review URL: https://codereview.chromium.org/930283002
If a quad, cubic, or conic goes back on itself, assume it's not convex.
In a future CL, we could check to see if the curve is linear so that
linear curves are treated the same as lines.
BUG=skia:3469
Review URL: https://codereview.chromium.org/971773002
Sometimes, the intersection returned by check_intersection() is
out-of-bounds for both edges (above both tops or below both bottoms)
due to floating-point inaccuracy. This causes split_edge() to create a
tiny negative-length edge on one side (which would then assert).
Although we could safely remove this assert and allow the negative
length edge to be removed, it's faster/safer to simply avoid its
creation in the first place by adjusting one edge to the other edge's
endpoint.
Added a new unit test to exercise this case.
Review URL: https://codereview.chromium.org/968993002
Since on Mac onOpenStream always creates a new stream of a
non-collection font, be sure the out ttcIndex is always set to 0.
Review URL: https://codereview.chromium.org/975473002
Partially in preparation for building libpng on Windows.
Also, this makes us consistent across platforms for PDF.
Uses the version of zlib checked into the Chromium tree.
Remove miniz, which is replaced by zlib.
Review URL: https://codereview.chromium.org/966963002
Also, Revert "Revert of Flate: fix valgrind miniz
Conditional-jump-or-move-depends... error"
This reverts commit 6dc4ef01a6.
The alloc functions really do have different types depending
on zlib implementation.
CQ_INCLUDE_TRYBOTS=client.skia:Linux Builder-Trybot
Review URL: https://codereview.chromium.org/963853002
Add SkPDFCanon::reset function to unref all objects.
No longer possible to remove object from canon
Motivation: this doesn't change these object's lifetime, (they will
still be fully unrefed when SkDocument::close() is called, but we no
longer have to remove them from the array when their destructor is
called.
Review URL: https://codereview.chromium.org/966863002
Also fix a clip transform issue: clips are tracked in device space,
but if applied directly to leaf elements they are also subject to local
transforms ("transform='...'"). Instead, apply via <g> wrapper elements.
R=reed@google.com,mtklein@google.com
Review URL: https://codereview.chromium.org/959883003
/analyze recently reported two new warnings about reading from
potentially uninitialized local variables:
src\third_party\skia\src\gpu\grclipmaskmanager.cpp(290) :
warning C6001: Using uninitialized memory 'requiresAA'.
src\third_party\skia\src\gpu\grclipmaskmanager.cpp(336) :
warning C6001: Using uninitialized memory 'genID'.
It is not clear whether the uninitialized reads can actually happen,
but the guarantees seem sufficiently non-obvious that the prudent thing
to do to guarantee future stability is to initialized them -- it's
cheap. I also initialized initialState because it seemed to fall in
the same class, despite there being no warning for it.
BUG=427616
Review URL: https://codereview.chromium.org/957133002
- Adds miniz.c v115_r4 (latest release) to third_party.
- Merges SkDeflateWStream into SkFlate so including "miniz.c" links
without duplicating symbols.
The only interesting code change I've made is to remove the line
fImpl->fZStream.data_type = Z_BINARY;
from SkDeflateWStream::SkDeflateWStream(). miniz doesn't have Z_BINARY
defined, and as far as I can tell, both zlib and miniz ignore data_type.
We should be able to swap skflate.gyp's dependency between zlib.gyp:zlib and
zlib.gyp:miniz at will (except of course on Windows) if we're interested in
zlib itself. I've left android framework on its own zlib. I think this all
means we can stop defining SK_NO_FLATE on Windows.
I'll leave the possible cleanup of SK_NO_FLATE itself for another time. Might
be we always want to keep this dependency optional.
CQ_EXTRA_TRYBOTS=client.skia:Test-Win8-ShuttleA-HD7770-x86-Debug-Trybot
BUG=skia:
Review URL: https://codereview.chromium.org/957323003
This doesn't add them to the second-stringer Sk4i. It's unclear we should be
doing that often, and we don't have efficient ways to do it except via floats.
BUG=skia:
Review URL: https://codereview.chromium.org/964603002