aboutsummaryrefslogtreecommitdiffhomepage
path: root/resources
Commit message (Collapse)AuthorAge
* Make SkCodec more flexible about its required frameGravatar Leon Scroggins III2017-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SkCodec sets fRequiredFrame to be the earliest possible frame that a given frame can depend on. e.g. - Frame A fills the screen, Keep - Frame B does not cover A, Keep - Frame C covers B but not A, and is opaque Frame C can depend on either A or B. SkCodec already reports that C depends on A. This CL allows a client of SkCodec to use either A or B to create C. Also expose the DisposalMethod. Since any frame between A and C can be used to create C except for DisposePrevious frames, the client needs to be able to know the disposal method so they do not try to use such a frame to create C. Further, the disposal method can be used to give the client a better idea whether they will continue to need a frame. (e.g. if frame i is DisposePrevious and depends on i-1, the client may not want to steal i-1 to create i, since i+1 may also depend on i-1.) TODO: Share code for decoding prior frames between GIF and WEBP Change-Id: I91a5ae22ba3d8dfbe0bde833fa67ae3da0d81ed6 Reviewed-on: https://skia-review.googlesource.com/13722 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Chris Blume <cblume@chromium.org> Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Defend against ICOs with large BMPs embeddedGravatar Leon Scroggins III2017-06-05
| | | | | | | | | | | If the ICO reports that it has a large BMP file embedded, do not crash if we attempt to allocate too much memory. Bug: b/38116746 Change-Id: I70eb66f5e4ffc15587007b398bbe843665eae500 Reviewed-on: https://skia-review.googlesource.com/18447 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Better image for copyTo4444 testGravatar Matt Sarett2017-06-01
| | | | | | | | | | This one produces noticeable differences if we fail to dither. Bug:720105 Change-Id: I208d0c8147f4cca1b484f2f55edc09ce1bef2dcb Reviewed-on: https://skia-review.googlesource.com/18036 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Add ship.png for DrawShip sampleGravatar Jim Van Verth2017-05-23
| | | | | | | | Bug: skia:5526 Change-Id: I12bd44c7dabd72f215a34ce9e733bb7a29d3fc68 Reviewed-on: https://skia-review.googlesource.com/17763 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Add Material Design shadow reference sampleGravatar Jim Van Verth2017-05-23
| | | | | | | Change-Id: I889a3f508407178c457f675c321880d869caf9ea Reviewed-on: https://skia-review.googlesource.com/17717 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add animation support to SkWebpCodecGravatar Leon Scroggins III2017-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TBR=reed@google.com (No change to the public API, but changed a header file) SkWebpCodec: - Implement onGetFrameCount, onGetFrameInfo, and onGetRepetitionCount - Respect the alpha reported by libwebp. Although the spec states that it is only a hint, the libwebp encoder uses it properly. Respecting allows us to draw opaque images faster and decode them to 565. This also matches other SkCodecs (and Chromium). - onGetPixels: - Decode the frame requested, recursively decoding required frame if necessary - When blending with a prior frame, use SkRasterPipeline SkCodec: - Move check for negative index to getFrameInfo - Reset the colorXform if one is not needed SkCodecAnimation: - Add new blend enum, for WebP's (and APNG's) non-blending option SkFrameHolder: - New base classes for frames and the owner of the frames, allowing code sharing between SkWebpCodec and SkGifCodec (particularly for determining whether a frame has alpha and what frame it depends on) - When moving items from SkGIFFrameContext, use Skia conventions (i.e. int instead of unsigned) - Rename "delay time" to "duration", to match e.g. SkFrameInfo:: fDuration SkGifImageReader: - Move pieces to SkFrameHolder, and adapt to changes made in the process - Make setAlphaAndRequiredFrame (now on the base class SkFrameHolder) more general to support webp, and add support for frames that do not blend - Change SkGIFFrameContext from a struct to a class, to match how we use the distinction elsewhere (i.e. struct is a small object with public fields) - Rework hasTransparentPixel (now hasTransparency, since it returns true in some cases where there is not a transparent pixel) to better fit with the modified setAlphaAndRequiredFrame. Also be more consistent when there is no transparent pixel but no color map. - Simplify an if condition that was previously simplified in 2d61e717 but accidentally got reverted in a4db9be6 CodecAnimTest: - Test new animated webp files - Rearrange the test to more cleanly print alpha type mismatches for the first frame resources: - webp-animated.webp - animated webp from Chromium - blendBG.webp - new webp file using bits of webp-animated-semitransparent4.webp from Chromium - tests required frame and alpha when using the non-blending mode - frames have the following properties: - Frame 0: no alpha, fills screen - Frame 1: alpha, fills screen - Frame 2: no alpha, fills screen - Frame 3: alpha, fills screen, blendBG - Frame 4: no alpha, fills screen, blendBG - Frame 5: alpha, blendBG - Frame 6: covers 4, has alpha, blendBG - also used to test decoding to 565 if the new frame data has alpha but blends onto an opaque frame DM.cpp: - Test animated images to non-native 8888 and unpremul DMSrcSink.cpp: - Do not test non-native 8888 decodes to f16 dst - Test unpremul decodes to f16 - Copy a frame of an animated image prior to drawing, since in unpremul mode, the DM code will premultiply first. Bug: skia: 3315 Change-Id: I4e55ae2ee5bc095b37a743bdcfac644be603b980 Reviewed-on: https://skia-review.googlesource.com/16707 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* Add tool to create test images with interesting color profilesGravatar Matt Sarett2017-05-17
| | | | | | | | Bug: skia: Change-Id: Ia4f892368fceda4a99490f5bd29851837a7a6927 Reviewed-on: https://skia-review.googlesource.com/17212 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Add jpeg encoder alpha handling optionGravatar Matt Sarett2017-05-09
| | | | | | | | | | | | | | | | | This instructs us on how to encode jpegs when the src image has alpha. The original behavior is to ignore the alpha channel. This CL adds the option to blend the pixels onto opaque black. Note that kBlendOnBlack and kIgnore are identical unless the input alpha type is kUnpremul. Bug: 713862 Bug: skia:1501 Change-Id: I4891c70bb0ccd83f7974c359bd40a2143b5c49ac Reviewed-on: https://skia-review.googlesource.com/15817 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Avoid interpolating color lut with less than 2 pointsGravatar Matt Sarett2017-05-05
| | | | | | | | Bug: 717935 Change-Id: Ibf15b815891eef5a0239bc408bcbfe7c8b1507c5 Reviewed-on: https://skia-review.googlesource.com/15301 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* SkPngCodec: Do not return kInvalidConversion on corrupt pngGravatar Matt Sarett2017-04-26
| | | | | | | | | | | 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>
* Add a test for getFrameInfo on truncated dataGravatar Leon Scroggins III2017-04-17
| | | | | | | | | | | | | | Prior to e132e7be5f9108692254c37db592ea7611abbc15, 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>
* Correct GIF frame dependencies and track alphaGravatar Leon Scroggins III2017-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Set a limit on the size for BMP imagesGravatar Leon Scroggins III2017-02-24
| | | | | | | | | | | | | | | 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>
* Reland "Respect canvas size and frame offset in webp decoder"Gravatar Matt Sarett2017-02-07
| | | | | | | | | | | | | | 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>
* Revert "Reland "Respect canvas size and frame offset in webp decoder""Gravatar Matt Sarett2017-02-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 604971e39a20392fd4c74a56bcdc187311cf86dc. 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>
* Reland "Respect canvas size and frame offset in webp decoder"Gravatar Matt Sarett2017-02-06
| | | | | | | | | | | | | | 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>
* Revert "Respect canvas size and frame offset in webp decoder"Gravatar Robert Phillips2017-02-06
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0f33970c8d950a68b7d83cc626ac0500953d6b15. 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>
* Respect canvas size and frame offset in webp decoderGravatar Matt Sarett2017-02-03
| | | | | | | | | 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>
* Use fixed size buffer for RLE bmpsGravatar Leon Scroggins III2017-01-19
| | | | | | | | | | | | | | | | | | | | | | | 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>
* GIF: Better check for frame dependencyGravatar Leon Scroggins III2017-01-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Only attempt index8 if underlying GIF is index8Gravatar Leon Scroggins III2016-12-16
| | | | | | | | | | | | | | 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>
* Stop supporting kUnknown_BmpHeaderTypeGravatar Leon Scroggins III2016-12-15
| | | | | | | | | | | | | | | | | | | | | 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>
* SkGifCodec: intersect frameRect with image sizeGravatar Leon Scroggins III2016-12-13
| | | | | | | | | | | | | | | 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>
* Do not create an SkRawCodec with zero dimensionsGravatar Leon Scroggins III2016-12-02
| | | | | | | | | | | | 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>
* Fail jpeg decodes on too many progressive scansGravatar Matt Sarett2016-11-08
| | | | | | | | | | | 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>
* Report repetition count in SkCodecGravatar scroggo2016-11-01
| | | | | | | | | | | | | | | | | | | | | 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
* Use correct color table for prior GIF framesGravatar Leon Scroggins III2016-10-31
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Reject non-D50 matrices from ICC profilesGravatar Matt Sarett2016-10-31
| | | | | | | | | | | | 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>
* SkGifCodec: do not write off the end of memory when repeatCount > 1Gravatar Matt Sarett2016-10-26
| | | | | | | | | | | 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>
* Refactored SkColorSpace and added in a Lab PCS GMGravatar raftias2016-10-18
| | | | | | | | | | | | | | | | | | | | 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
* Avoid integer overflow in SkIcoCodec and SkImageInfoGravatar Matt Sarett2016-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Revert "Avoid integer overflow in SkIcoCodec"Gravatar Matt Sarett2016-10-17
| | | | | | | | | | | | | | | | | This reverts commit 20cba06a4bc9bde60b2dc37907d11ca81ba35ce8. 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>
* Avoid integer overflow in SkIcoCodecGravatar Matt Sarett2016-10-17
| | | | | | | | | | | | | | | | | | 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>
* GM: add test for type1 fontGravatar halcanary2016-09-20
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2350453002 Review-Url: https://codereview.chromium.org/2350453002
* BUG=skia:5602Gravatar hcm2016-09-02
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2302913002 Review-Url: https://codereview.chromium.org/2302913002
* Parse ICC profiles from webpsGravatar msarett2016-08-24
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2269333002 Review-Url: https://codereview.chromium.org/2269333002
* Revert of Add regression test (patchset #2 id:20001 of ↵Gravatar msarett2016-08-16
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add regression testGravatar msarett2016-08-15
| | | | | | | | | | 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
* Fix various SkColorSpace bugsGravatar msarett2016-07-29
| | | | | | | | | | (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
* Use hintgasp font when testing rendering.Gravatar bungeman2016-07-12
| | | | | | | | | | | | | | 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
* Add gm for various font rendering combinations.Gravatar bungeman2016-07-06
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2080453002 Review-Url: https://codereview.chromium.org/2080453002
* Add interesting features to visualize_color_gamutGravatar msarett2016-05-27
| | | | | | | | | | | | | | | (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
* Test color correction in DMGravatar msarett2016-05-23
| | | | | | | | | | | | | | | | | | | | | 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
* Simple program for visualizing gamutsGravatar msarett2016-05-13
| | | | | | | 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
* Add png for difficult but common blit cases.Gravatar herb2016-05-11
| | | | | | | 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
* compressed texture support has been broken/untested for a while, remove cruftGravatar reed2016-05-11
| | | | | | | 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
* Revert "Add tests and benches to support the sRGB blitter for SkOpts"Gravatar scroggo2016-05-11
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 554784cd85029c05d9ed04b1aeb71520d196153a and 1956b4ae1c9a47833b174f31c054d347ea04db09 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
* Add tests and benches to support the sRGB blitter for SkOptsGravatar herb2016-05-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Parse icc profiles and exif orientation from jpeg markersGravatar msarett2016-03-21
| | | | | | | | | | 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
* Set SkColorSpace object for PNGs and parse ICC profilesGravatar msarett2016-03-04
| | | | | | | | | | 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