Commit Graph

128 Commits

Author SHA1 Message Date
Matt Sarett
d59948a171 SkPngCodec: Do not return kInvalidConversion on corrupt png
In this case, the fuzzer thinks there is a bug because we are
returning kInvalidConversion for a corrupt png file.

Bug: skia:6550
Change-Id: I33f588442f5eaa8a4d642e9328750779f9a9ef5d
Reviewed-on: https://skia-review.googlesource.com/14324
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2017-04-26 17:43:38 +00:00
Leon Scroggins III
7d22a33e21 Add a test for getFrameInfo on truncated data
Prior to e132e7be5f, calling getFrameInfo
on an SkGifCodec which was truncated before fully parsing the local
color map of the first frame would hit an assert. Add a test to verify
that the problem has been fixed.

Modify box.gif to use a local color map for the first (and only) frame.

Change-Id: I905afe60c0c6ecc82e251e00ef82b2e5b22975a3
Reviewed-on: https://skia-review.googlesource.com/13320
Reviewed-by: Chris Blume <cblume@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-04-17 16:35:35 +00:00
Leon Scroggins III
a4db9be6a2 Correct GIF frame dependencies and track alpha
Add SkCodec::FrameInfo::fAlphaType. The SkImageInfo for the SkCodec
specifies the SkAlphaType for the first frame, but the opacity can vary
from frame to frame.

When determining the required frame, also compute whether a frame has
alpha. Update how we determine the required frame, which had bugs.
(Update a test that had an incorrect required frame as a result.)

Add new test images covering cases that have been fixed:
- randPixelsAnim2.gif
It has the following frames:
A (keep)
B (keep) (subset)
C (disposePrevious) (covers B)
D (any) (does *not* cover B)

B and C depend on A, but D depends on B, since after disposing C, B
should be visible again.

- alphabetAnim.gif
Includes frames which fill the image size, with different disposal
methods and transparencies.

Change-Id: Ie086167711c4cac4931ed8c4ddaeb9c9b0b91fdb
Reviewed-on: https://skia-review.googlesource.com/9810
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
2017-04-11 15:05:05 +00:00
Leon Scroggins III
0354c62e0b Set a limit on the size for BMP images
This limit matches the limit used by Chromium. I am not aware of any
real world BMPs that are larger than this (or even close to it), but
there are some invalid BMPs that are larger than this, leading to
crashes when we try to read a row.

BUG:34778578
BUG=skia:3617

Change-Id: I0f662e8d0d7bc0b084e86d0c9288b831e1b296d7
Reviewed-on: https://skia-review.googlesource.com/8966
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-02-24 21:25:44 +00:00
Matt Sarett
5c49617f3d Reland "Respect canvas size and frame offset in webp decoder"
Original Change Reviewed At:
https://skia-review.googlesource.com/c/7800

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN

BUG=skia:6185

Change-Id: I1a7732832d37920545c1775d7c7c65b43ed810f9
Reviewed-on: https://skia-review.googlesource.com/8157
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-02-07 22:40:13 +00:00
Matt Sarett
2bb94e8147 Revert "Reland "Respect canvas size and frame offset in webp decoder""
This reverts commit 604971e39a.

Reason for revert: Strange vk failures

Original change's description:
> Reland "Respect canvas size and frame offset in webp decoder"
> 
> Original Change Reviewed At:
> https://skia-review.googlesource.com/c/7800
> 
> CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN
> 
> BUG=skia:6185
> 
> Change-Id: I92baa9070e15ef3c62dd347c08c906c2715dda10
> Reviewed-on: https://skia-review.googlesource.com/8050
> Reviewed-by: Matt Sarett <msarett@google.com>
> Commit-Queue: Matt Sarett <msarett@google.com>
> 

TBR=msarett@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:6185
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN

Change-Id: Ice93b62c55ea13fce83140567be16225ff0e2fdb
Reviewed-on: https://skia-review.googlesource.com/8123
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
2017-02-07 16:39:39 +00:00
Matt Sarett
604971e39a Reland "Respect canvas size and frame offset in webp decoder"
Original Change Reviewed At:
https://skia-review.googlesource.com/c/7800

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN

BUG=skia:6185

Change-Id: I92baa9070e15ef3c62dd347c08c906c2715dda10
Reviewed-on: https://skia-review.googlesource.com/8050
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-02-06 18:55:41 +00:00
Robert Phillips
b3050b91f0 Revert "Respect canvas size and frame offset in webp decoder"
This reverts commit 0f33970c8d.

Reason for revert: msan complaint

Original change's description:
> Respect canvas size and frame offset in webp decoder
> 
> BUG=skia:6185
> 
> Change-Id: Id543cb689a5e33b800ebbc18f4a234e78a4c4298
> Reviewed-on: https://skia-review.googlesource.com/7800
> Commit-Queue: Matt Sarett <msarett@google.com>
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> 

TBR=borenet@google.com,msarett@google.com,scroggo@google.com,reviews@skia.org
# Not skipping CQ checks because original CL landed > 1 day ago.
BUG=skia:6185

Change-Id: Ie01dc7d7ebfebe36a235335d0d8cb28bccb2ecff
Reviewed-on: https://skia-review.googlesource.com/8046
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-02-06 13:43:16 +00:00
Matt Sarett
0f33970c8d Respect canvas size and frame offset in webp decoder
BUG=skia:6185

Change-Id: Id543cb689a5e33b800ebbc18f4a234e78a4c4298
Reviewed-on: https://skia-review.googlesource.com/7800
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2017-02-03 21:45:30 +00:00
Leon Scroggins III
b3b24538e0 Use fixed size buffer for RLE bmps
An RLE bmp reports how many bytes it should contain. This number may be
incorrect, or it may be a very large number. Previously, we buffered
all bytes in a single allocation. Instead, use a fixed size buffer and
only read what fits into the buffer. We already have code to refill the
buffer if there is more data, so rely on that to keep reading.

Choose an arbitrary size for the buffer. It is larger than the maximum
possible number of bytes we need to read at once.

Add a test with a test image that reports a very large number for
the number of bytes it should contain. With the old method, we would
allocate 4 gigs of memory to decode this image, which is unnecessary
and may result in OOM.

BUG=b/33251605

Change-Id: I6d66eace626002725f62237617140cab99ce42f3
Reviewed-on: https://skia-review.googlesource.com/7028
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
2017-01-19 14:21:02 +00:00
Leon Scroggins III
b0b625b796 GIF: Better check for frame dependency
If a frame does not have a valid transparent index and it covers the
prior frame, it does not really depend on that frame. Instead, it
depends on the frame that the prior frame depends on.

Determine this once we have parsed the local color map (if any), so a
transparent index out of range of the color map is not considered
valid.

Share code that determines whether a frame has a transparent pixel.

Add a test that we compute the dependencies correctly. randPixelsAnim.gif
has 13 frames. After the first, the frames cover all combinations of

- Whether the prior frame was keep, restoreBG or restoreToPrevious
- Whether the new frame covers the prior frame
- Whether the new frame has a transparent pixel

(It only does so when using a global color table. It may make sense to
expand the test to also cover using local color tables.)

The test caught a bug where we incorrectly reused an existing
SkColorTable for a different frame. Fix that bug by keeping track of
the transparent index associated with the current SkColorTable.

Change-Id: I3cf6be7f612990fa7a00d9e74d116d31bd227526
Reviewed-on: https://skia-review.googlesource.com/6402
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-01-03 19:07:41 +00:00
Leon Scroggins III
4cd68653e3 Only attempt index8 if underlying GIF is index8
Recent changes (crrev.com/2045293002) made it so that a GIF may not
support index 8. In that case, make SkAndroidCodec not suggest index 8.

Add a test and a new test file. randPixelsOffset.gif is the same as
randPixels.gif, except its frame is offset. Since it does not have a
transparent index, we have to decode to kN32.

Change-Id: I1c09ab9094083de3dfc436632b3c26dbde1dccbd
Reviewed-on: https://skia-review.googlesource.com/6196
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
2016-12-16 19:51:52 +00:00
Leon Scroggins III
0b24cbd9db Stop supporting kUnknown_BmpHeaderType
In SkBmpCodec, if the header size does not match a known header,
stop trying to create an SkCodec. We do not know of any BMPs with
arbitrarily sized headers, so this should not cause any real
regressions.

In addition, this fixes a bug where we attempt to read too much data
from a file. Since we attempt to read the header size in one read,
and a size reported by the "BMP" may be larger than SSIZE_MAX, this
will crash when reading from a file.

Add a test.

BUG:b/33651913

Change-Id: I0f3292db3124dc5ac5cbdbc07196bda130a49ba7
Reviewed-on: https://skia-review.googlesource.com/6150
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
2016-12-15 21:48:03 +00:00
Leon Scroggins III
56e3209c70 SkGifCodec: intersect frameRect with image size
When clearing due to SkCodecAnimation::RestoreBGColor_DisposalMethod,
intersect the frameRect with the image size to prevent clearing outside
the bounds of the allocated memory.

Add a test image, created by the fuzzer.

BUG=skia:6046

Change-Id: I43676d28f82abf093ef801752f3a9e881580924c
Reviewed-on: https://skia-review.googlesource.com/5860
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
2016-12-13 14:00:17 +00:00
Leon Scroggins III
d87fbee775 Do not create an SkRawCodec with zero dimensions
Add a test

BUG=skia:3534
BUG=b/33300701

Change-Id: Ifb3a824a36998c5e626c4ad58466845f49d18ebf
Reviewed-on: https://skia-review.googlesource.com/5568
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
2016-12-02 22:23:35 +00:00
Matt Sarett
dbdf6d210b Fail jpeg decodes on too many progressive scans
BUG:642462

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4560

Change-Id: I22891ce1e0b3a1bedefc34dadd5cf34dfc301b79
Reviewed-on: https://skia-review.googlesource.com/4560
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2016-11-08 21:39:15 +00:00
scroggo
e71b1a1496 Report repetition count in SkCodec
Add a new accessor to retrieve the repetition count.

Remove constants (and corresponding copyright) in SkCodecAnimation.
These may make sense for the calling code, but are not needed here.

kRepetitionCountInfinite corresponds to Blink's kAnimationLoopInfinite.
Move cLoopCountNotSeen to private. It is used to determine whether we
still need to parse. Add a new enum to the parse query - only parse
enough to determine the repetition count.

Unlike Chromium, SkGifCodec does not account for deleting the reader
(which SkGifCodec does not do) or failed decodes.

Add a test.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2447863002

Review-Url: https://codereview.chromium.org/2447863002
2016-11-01 08:28:28 -07:00
Leon Scroggins III
fc49b403eb Use correct color table for prior GIF frames
While investigating skbug.com/5883 I noticed that we use the color
table for the current frame even while recursively decoding frames that
the current frame depends on.

This CL updates fCurrColorTable, fCurrColorTableIsReal and fSwizzler
before decoding prior frames, and then sets them back afterwards.

Move telling the client about the color table into prepareToDecode,
since the other callers do not need to do so. (That is only necessary
for decoding to index 8, which is unsupported for frames with
dependencies.)

Add a test that exposes the bug. colorTables.gif has a local color
table in its second frame that does not match the global table used by
the first frame.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4208

Change-Id: Id2dc9e3283adfd92801d2f38726afa74574b1955
Reviewed-on: https://skia-review.googlesource.com/4208
Reviewed-by: Joost Ouwerling <joostouwerling@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2016-10-31 19:23:10 +00:00
Matt Sarett
0186661e85 Reject non-D50 matrices from ICC profiles
BUG:660838

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4200

Change-Id: Ib57eb3705d6fe638e3a9cb56788937fc7e282847
Reviewed-on: https://skia-review.googlesource.com/4200
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2016-10-31 18:06:24 +00:00
Matt Sarett
8a4e9c51f4 SkGifCodec: do not write off the end of memory when repeatCount > 1
BUG=skia:5887

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3940

Change-Id: I9e3ed6153a73277896ac067ef73918a41a0546b8
Reviewed-on: https://skia-review.googlesource.com/3940
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2016-10-26 00:43:27 +00:00
raftias
9488833428 Refactored SkColorSpace and added in a Lab PCS GM
The refactoring breaks off A2B0 tag support into a separate
subclass of SkColorSpace_Base, while keeping the current
(besides CLUT) functionality in a XYZTRC subclass.

ICC profile loading is now aware of this and creates the A2B0
subclass when SkColorSpace::NewICC() is called on a profile
in need of the A2B0 functionality.

The LabPCSDemo GM loads a .icc profile containing a LAB PCS and
then runs a Lab->XYZ conversion on an image using it so we can
display it and test out the A2B0 SkColorSpace functionality,
sans a/b/m-curves, as well as the Lab->XYZ conversion code.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2389983002

Review-Url: https://codereview.chromium.org/2389983002
2016-10-18 10:02:52 -07:00
Matt Sarett
29121ebd9e Avoid integer overflow in SkIcoCodec and SkImageInfo
Original Commit Message:
"""
Avoid integer overflow in SkIcoCodec

Definitely good to avoid overflow here.

FWIW, this looks to be harmless for Android's current use.
They will just fail later on when trying to allocate the
bitmap.

BUG=skia:5857
"""

With the new test, ASAN also caught an integer overflow
bug in SkImageInfo.  Fix this as well.

CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN;master.client.skia.android:Test-Android-Clang-AndroidOne-CPU-MT6582-arm-Debug-GN_Android

BUG=skia:5857

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3568

Change-Id: I0d777a547850474ea6cea87e36efa05434e33635
Reviewed-on: https://skia-review.googlesource.com/3568
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2016-10-17 21:19:54 +00:00
Matt Sarett
af017418b3 Revert "Avoid integer overflow in SkIcoCodec"
This reverts commit 20cba06a4b.

Reason for revert: <INSERT REASONING HERE>


TBR=msarett@google.com,scroggo@google.com,kjlubick@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Id8f48a90a7dc620f9c0ee2f419d14bae2b0c1e7e
Reviewed-on: https://skia-review.googlesource.com/3564
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
2016-10-17 17:43:32 +00:00
Matt Sarett
20cba06a4b Avoid integer overflow in SkIcoCodec
Definitely good to avoid overflow here.

FWIW, this looks to be harmless for Android's current use.
They will just fail later on when trying to allocate the
bitmap.

BUG=skia:5857

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3527

Change-Id: Ia1fb7d864d21ecdb127a1dd1a72cab8375cb43fb
Reviewed-on: https://skia-review.googlesource.com/3527
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2016-10-17 17:10:40 +00:00
halcanary
4ecf0d4843 GM: add test for type1 font
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2350453002

Review-Url: https://codereview.chromium.org/2350453002
2016-09-20 13:11:01 -07:00
hcm
005327b9dd BUG=skia:5602
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2302913002

Review-Url: https://codereview.chromium.org/2302913002
2016-09-02 11:19:34 -07:00
msarett
9d15dab754 Parse ICC profiles from webps
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2269333002

Review-Url: https://codereview.chromium.org/2269333002
2016-08-24 07:36:06 -07:00
msarett
c5064d9c3d Revert of Add regression test (patchset #2 id:20001 of https://codereview.chromium.org/2243143002/ )
Reason for revert:
Nexus 9 and Nexus Player failures.

Original issue's description:
> Add regression test
>
> Original bug fix was in:
> https://codereview.chromium.org/2230163002
>
> BUG:636268
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2243143002
>
> Committed: https://skia.googlesource.com/skia/+/bcae9d3d15d34a59d279c34e187e6101975500c0

TBR=reed@google.com,gogil@stealien.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2243403003
2016-08-16 04:54:19 -07:00
msarett
bcae9d3d15 Add regression test
Original bug fix was in:
https://codereview.chromium.org/2230163002

BUG:636268
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2243143002

Review-Url: https://codereview.chromium.org/2243143002
2016-08-15 09:42:00 -07:00
msarett
a714bc3929 Fix various SkColorSpace bugs
(1) Fixes serialization/deserialization of wacky SkColorSpaces
(2) Fix gamma equals checking

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2194903002

Review-Url: https://codereview.chromium.org/2194903002
2016-07-29 08:58:33 -07:00
bungeman
5dba301e91 Use hintgasp font when testing rendering.
The hintgasp font was added specifically for the typefacerendering gm.
However, this gm didn't actually use the font, so now use it. In
addition this adds embedded bitmap strikes to the hintgasp font and the
gm is updated to test these as well.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2140863002

NOTREECHECKS=true
Test only change, does not affect users.

Review-Url: https://codereview.chromium.org/2140863002
2016-07-12 06:55:25 -07:00
bungeman
61457a6b80 Add gm for various font rendering combinations.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2080453002

Review-Url: https://codereview.chromium.org/2080453002
2016-07-06 11:55:05 -07:00
msarett
97205a4b41 Add interesting features to visualize_color_gamut
(1) Draw triangles onto a D50 color gamut so they are
    actually in the correct place.
(2) Add options to display canonical sRGB and Adobe RGB
    gamuts.
(3) Label the R, G, and B points of the color gamut.
(4) Decode and reencode the input image without color
    correction, so we can compare to the corrected version.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2017153002

Review-Url: https://codereview.chromium.org/2017153002
2016-05-27 14:01:02 -07:00
msarett
888dc16684 Test color correction in DM
This will allow me to test and visualize some assumptions
on parsing and applying color profiles.  Also, it should
help me find and fix bugs.

This is certainly not an optimized implementation, and, as
far as I know, it doesn't take any shortcuts to improve
performance.  We'll probably want to do both of these
once we know where it fits in the pipeline.

Right now this test is only run on an arbitrary set of ~100
images from the top 10k skps.  I'll continue to add more
"interesting" images and probably tweak the code as
necessary.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1995233003

Review-Url: https://codereview.chromium.org/1995233003
2016-05-23 10:21:17 -07:00
msarett
aabe15e206 Simple program for visualizing gamuts
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1972343002

Review-Url: https://codereview.chromium.org/1972343002
2016-05-13 07:32:59 -07:00
herb
87bf8f7d15 Add png for difficult but common blit cases.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1973583002

Review-Url: https://codereview.chromium.org/1973583002
2016-05-11 11:12:17 -07:00
reed
93eeadf7a1 compressed texture support has been broken/untested for a while, remove cruft
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1970773002

Review-Url: https://codereview.chromium.org/1970773002
2016-05-11 08:06:11 -07:00
scroggo
fbb3102d0e Revert "Add tests and benches to support the sRGB blitter for SkOpts"
This reverts commit 554784cd85 and
1956b4ae1c

Reason for revert - ASAN failures, e.g. from https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN/builds/2233/steps/perf_skia%20on%20Ubuntu/logs/stdio :

  Uninitialized value was created by a heap allocation
    0 0x7f69aa96f799 in operator new[](unsigned long) /b/work/skia/third_party/externals/llvm/out/../projects/compiler-rt/lib/msan/msan_new_delete.cc:37
    1 0x7f69aaa315c1 in SkAutoTArray<unsigned int>::reset(int) /b/work/skia/out/Build-Ubuntu-GCC-x86_64-Debug-MSAN/Debug/../../../include/private/../private/SkTemplates.h:137:22
    2 0x7f69aaa34ee9 in LinearSrcOverBench<SrcOverVSkOptsSSE41>::LinearSrcOverBench(char const*) /b/work/skia/out/Build-Ubuntu-GCC-x86_64-Debug-MSAN/Debug/../../../bench/SkBlend_optsBench.cpp:108:9
    3 0x7f69aaa30cf2 in $_24::operator()(void*) const /b/work/skia/out/Build-Ubuntu-GCC-x86_64-Debug-MSAN/Debug/../../../bench/SkBlend_optsBench.cpp:167:1
    4 0x7f69aaa30c87 in $_24::__invoke(void*) /b/work/skia/out/Build-Ubuntu-GCC-x86_64-Debug-MSAN/Debug/../../../bench/SkBlend_optsBench.cpp:167:1
    5 0x7f69aaa68856 in BenchmarkStream::rawNext() /b/work/skia/out/Build-Ubuntu-GCC-x86_64-Debug-MSAN/Debug/../../../bench/nanobench.cpp:653:32
    6 0x7f69aaa61467 in BenchmarkStream::next() /b/work/skia/out/Build-Ubuntu-GCC-x86_64-Debug-MSAN/Debug/../../../bench/nanobench.cpp:642:25
    7 0x7f69aaa5b703 in nanobench_main() /b/work/skia/out/Build-Ubuntu-GCC-x86_64-Debug-MSAN/Debug/../../../bench/nanobench.cpp:1119:27
    8 0x7f69aaa5e10d in main /b/work/skia/out/Build-Ubuntu-GCC-x86_64-Debug-MSAN/Debug/../../../bench/nanobench.cpp:1290:12
    9 0x7f69a8c95ec4 in __libc_start_main /build/buildd/eglibc-2.19/csu/libc-start.c:287

TBR=herb@google.com

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1969803002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review-Url: https://codereview.chromium.org/1969803002
2016-05-11 06:40:32 -07:00
herb
554784cd85 Add tests and benches to support the sRGB blitter for SkOpts
1,370.85 LinearSrcOvericonstrip.pngVSkOptsSSE41
 2,359.69 LinearSrcOvericonstrip.pngVSkOptsDefault
 1,828.72 LinearSrcOvericonstrip.pngVSkOptsNonSimdCore
 3,277.40 LinearSrcOvericonstrip.pngVSkOptsTrivial
 9,862.34 LinearSrcOvericonstrip.pngVSkOptsBruteForce

   633.55 LinearSrcOvermandrill_512.pngVSkOptsSSE41
   684.29 LinearSrcOvermandrill_512.pngVSkOptsDefault
 1,201.88 LinearSrcOvermandrill_512.pngVSkOptsNonSimdCore
 2,382.63 LinearSrcOvermandrill_512.pngVSkOptsTrivial
10,888.74 LinearSrcOvermandrill_512.pngVSkOptsBruteForce

   209.14 LinearSrcOverplane.pngVSkOptsSSE41
   562.24 LinearSrcOverplane.pngVSkOptsDefault
   272.64 LinearSrcOverplane.pngVSkOptsNonSimdCore
   436.46 LinearSrcOverplane.pngVSkOptsTrivial
 1,327.23 LinearSrcOverplane.pngVSkOptsBruteForce

   318.01 LinearSrcOverbaby_tux.pngVSkOptsSSE41
   529.05 LinearSrcOverbaby_tux.pngVSkOptsDefault
   441.33 LinearSrcOverbaby_tux.pngVSkOptsNonSimdCore
   720.50 LinearSrcOverbaby_tux.pngVSkOptsTrivial
 2,191.10 LinearSrcOverbaby_tux.pngVSkOptsBruteForce

   479.68 LinearSrcOveryellow_rose.pngVSkOptsSSE41
 1,095.03 LinearSrcOveryellow_rose.pngVSkOptsDefault
   668.60 LinearSrcOveryellow_rose.pngVSkOptsNonSimdCore
 1,257.19 LinearSrcOveryellow_rose.pngVSkOptsTrivial
 4,970.25 LinearSrcOveryellow_rose.pngVSkOptsBruteForce

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1939513002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review-Url: https://codereview.chromium.org/1939513002
2016-05-10 13:33:47 -07:00
msarett
0e6274f540 Parse icc profiles and exif orientation from jpeg markers
New resources should be fine to add since they are already
checked into chromium.

BUG=skia:3834
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1813273002

Review URL: https://codereview.chromium.org/1813273002
2016-03-21 08:04:40 -07:00
msarett
6a738217ea Set SkColorSpace object for PNGs and parse ICC profiles
Code for ICC profile parsing adapted from:
https://codereview.chromium.org/1707033002/

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1726823002

Review URL: https://codereview.chromium.org/1726823002
2016-03-04 13:27:35 -08:00
halcanary
1e440510d8 SkPDF/Bench: add bench for SkPDFSharedStream (deflate)
Also, simplify gyp.

BUG=skia:5009
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1730833003

Review URL: https://codereview.chromium.org/1730833003
2016-02-24 15:17:20 -08:00
ebrauer
46d2aa824c Updates Piex and uses it to obtain the DNG dimensions.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1659873002

Review URL: https://codereview.chromium.org/1659873002
2016-02-17 08:04:00 -08:00
msarett
4946b9419f Fix scanline decoding of rare RLE bmps
This also exposed a bug in rewinding RLE bmps, which I have also
fixed in this CL.

This should fix testcase7.bmp on Gold.

The image that I am adding to resources is in the
public domain.

BUG=skia:4730
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1689953002

Review URL: https://codereview.chromium.org/1689953002
2016-02-11 08:41:01 -08:00
yujieqin
9c7a8a4648 Optimize the SkRawStream when the input is an asset stream
BUG=b/26841494
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1645963002

Review URL: https://codereview.chromium.org/1645963002
2016-02-05 08:21:19 -08:00
yujieqin
916de9ff18 Add RAW decoding into Skia.
TBR=reed@google.com

BUG=skia:

(Based on the work from ebrauer in https://codereview.chromium.org/1459473007)
(Based on the work from adaubert in https://codereview.chromium.org/1494003003)
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1520403003

Committed: https://skia.googlesource.com/skia/+/6bd8639f8c142eedf543f4e5f3b02d2bf11df308

Review URL: https://codereview.chromium.org/1520403003
2016-01-25 08:26:16 -08:00
msarett
c85a9fde77 Revert of Prototype of RAW decoding in Skia. (patchset #32 id:610001 of https://codereview.chromium.org/1520403003/ )
Reason for revert:
A few build failures on Chrome OS/Android.

Original issue's description:
> Add RAW decoding into Skia.
>
> TBR=reed@google.com
>
> BUG=skia:
>
> (Based on the work from ebrauer in https://codereview.chromium.org/1459473007)
> (Based on the work from adaubert in https://codereview.chromium.org/1494003003)
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1520403003
>
> Committed: https://skia.googlesource.com/skia/+/6bd8639f8c142eedf543f4e5f3b02d2bf11df308

TBR=scroggo@google.com,adaubert@google.com,yujieqin@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1635443002
2016-01-25 06:05:19 -08:00
yujieqin
6bd8639f8c Add RAW decoding into Skia.
TBR=reed@google.com

BUG=skia:

(Based on the work from ebrauer in https://codereview.chromium.org/1459473007)
(Based on the work from adaubert in https://codereview.chromium.org/1494003003)
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1520403003

Review URL: https://codereview.chromium.org/1520403003
2016-01-25 05:29:03 -08:00
msarett
b714fb0199 Add getYUV8Planes() API to SkCodec
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1549473003

Review URL: https://codereview.chromium.org/1549473003
2016-01-22 14:46:42 -08:00
reed
b2ce0b0735 demo tweaks, scale up perlin, add call to flush for fps
BUG=skia:
TBR=bsalomon

Review URL: https://codereview.chromium.org/1419983006
2015-11-09 13:10:30 -08:00