aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
Commit message (Collapse)AuthorAge
* Rename function in PathOpsExtendedTest which takes strings.Gravatar Ben Wagner2017-01-09
| | | | | | | | | | | | A few methods in PathOpsExtendedTest were changed to write to SkStrings instead of SkStreams. However, the names of these functions confusingly still have "Stream" in their names. This CL is just a static function rename and some small clean-up. Change-Id: Idf21b2aba28a2f984ef30cb5c18e26a43a9c7201 Reviewed-on: https://skia-review.googlesource.com/6819 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Specify bit depth and color space in SkImage::MakeFromPicture()Gravatar Matt Sarett2017-01-09
| | | | | | | | | BUG=skia: Change-Id: I1d2a2b1f97557fc3e7ca6c2bdad6329f7760dbd2 Reviewed-on: https://skia-review.googlesource.com/6685 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Revert "Revert "Removing ref counting from GrXPFactory.""Gravatar Brian Salomon2017-01-09
| | | | | | | | | This reverts commit 003312a211e65f35e402d6fe80a32e23d4c94ac4. Change-Id: Ib41065e5c356d1dd99e70fa10611ac6756c2b79d Reviewed-on: https://skia-review.googlesource.com/6803 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Removing ref counting from GrXPFactory."Gravatar Brian Salomon2017-01-09
| | | | | | | | | | | This reverts commit a8f80de2bc17672b4b6f26d3cf6b38123ac850c9. Reason for revert: nanobench failing on windows bots, possibly others Change-Id: Iacb8c650064a28654c165665be057377ffb02ba5 Reviewed-on: https://skia-review.googlesource.com/6802 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Removing ref counting from GrXPFactory.Gravatar Brian Salomon2017-01-09
| | | | | | | | | All GrXPFactory instances are static constexpr. Change-Id: If1086b08534166201e53b3fd9379104e361eb5e6 Reviewed-on: https://skia-review.googlesource.com/6701 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* make SkRBuffer always validateGravatar Mike Reed2017-01-08
| | | | | | | | | BUG=skia:6102 Change-Id: Ic9fb259b2e980d00e179340945c50492f1803a4f Reviewed-on: https://skia-review.googlesource.com/6736 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* fix to not assign uninitialized array to stringGravatar Mike Reed2017-01-08
| | | | | | | | | | | fixes https://skia-review.googlesource.com/c/6727/ BUG=skia: Change-Id: I8b8f79174ec32a1fa9d17dec4f5c812f70b83fbe Reviewed-on: https://skia-review.googlesource.com/6731 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* remove SkMemoryWStream -- unused externallyGravatar Mike Reed2017-01-08
| | | | | | | | | BUG=skia: Change-Id: Idbc9af4e703238871f56f623cd616fb7a5e686d3 Reviewed-on: https://skia-review.googlesource.com/6727 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Purge clip masks when they are no longer findable.Gravatar Brian Salomon2017-01-06
| | | | | | | | | | | This improves memory usage when the content contains frequently changing clips implemented as masks. BUG=chromium:676459 Change-Id: I06ea5f9fe1cff9564ea136bad9fe97f6ecd77ad9 Reviewed-on: https://skia-review.googlesource.com/6629 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add support for tagging GrUniqueKeys with a debug stringGravatar Brian Salomon2017-01-06
| | | | | | | Change-Id: Ie7d56214fdee7a19a1e8ca3869e5e4d5e72cedf8 Reviewed-on: https://skia-review.googlesource.com/6632 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* SkXbyak basicsGravatar Mike Klein2017-01-06
| | | | | | | | | | | | A little JIT proof of concept for SkRasterPipeline, using xbyak, which is a header-only assembler. It's x86-only, but supports x86 very thoroughly, and it's very user friendly (at least as far as assembler libraries go...). CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: Ie17e562b0f3fff5914041badfb2c1fe4f86efab8 Reviewed-on: https://skia-review.googlesource.com/5730 Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Heather Miller <hcm@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* simplify by removing _d stagesGravatar Mike Klein2017-01-06
| | | | | | | | | CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: I75e232faee6ad48f65bac5b119a461280b27bbc8 Reviewed-on: https://skia-review.googlesource.com/6661 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Revert "Explicitly fail read/writePixels in invalid color space scenarios"Gravatar Brian Osman2017-01-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit efcc41805b43347444b83c1705d3d60c8d0caa70. Reason for revert: Possible culprit for Chromium failures. Original change's description: > Explicitly fail read/writePixels in invalid color space scenarios > > It's not well defined what to do when moving from a nullptr color space to > a tagged destination (drawing, reading, writing, etc...). In these > scenarios, at least, we can choose to disallow the operation (rather than > produce an unexpected or inconsistent result). > > BUG=skia: > > Change-Id: I033b23c6f2bb00664efc8fdab1b3f52053d77695 > Reviewed-on: https://skia-review.googlesource.com/6600 > Commit-Queue: Brian Osman <brianosman@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > Reviewed-by: Matt Sarett <msarett@google.com> > TBR=mtklein@google.com,bsalomon@google.com,msarett@google.com,brianosman@google.com,reviews@skia.org BUG=skia: NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I17791f9285089ede42b7921324e0dc264865be1d Reviewed-on: https://skia-review.googlesource.com/6628 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Explicitly fail read/writePixels in invalid color space scenariosGravatar Brian Osman2017-01-05
| | | | | | | | | | | | | | | It's not well defined what to do when moving from a nullptr color space to a tagged destination (drawing, reading, writing, etc...). In these scenarios, at least, we can choose to disallow the operation (rather than produce an unexpected or inconsistent result). BUG=skia: Change-Id: I033b23c6f2bb00664efc8fdab1b3f52053d77695 Reviewed-on: https://skia-review.googlesource.com/6600 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* Add context markup to integer texture testGravatar Brian Osman2017-01-04
| | | | | | | | | | | | Trying to get better information about what's failing (and make this easier in the future). BUG=skia:6086 Change-Id: Iedb1269abb4527170b919bd90bce625a7f78f05a Reviewed-on: https://skia-review.googlesource.com/6584 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Removes tracking of whether color is ignored by XP.Gravatar Brian Salomon2017-01-04
| | | | | | | | | Removes the feedback to GrDrawOp via GrPipelineOptimizations. Change-Id: I3cb17cad41779af292a92385fcd5ac23ae5a1ffd Reviewed-on: https://skia-review.googlesource.com/6561 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Fix color space matrix hashing to avoid hashing the typemaskGravatar Matt Sarett2017-01-04
| | | | | | | | | | BUG=skia: Change-Id: I8d4594fcf0eeebf598871bfe9203ed52460c98ce Reviewed-on: https://skia-review.googlesource.com/6558 Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Removing tracking of whether GP/FP coverage calculations are used by XP.Gravatar Brian Salomon2017-01-04
| | | | | | | | | | | | | | | Remove readsCoverage from GrPipelineOptimizations Remove kNone from GrDefaultGeoProc::Coverage Remove kIgnoreCoverage from GrXferProcessor::OptFlags Remove GrPipeline::fIgnoresCoverage Change-Id: I8f0c9337ee98b9c77af1e9a8a184519ce63822d4 Reviewed-on: https://skia-review.googlesource.com/6552 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Improve detection of color space transfer fnsGravatar Matt Sarett2017-01-04
| | | | | | | | | BUG=skia: Change-Id: I744af0efd4d48a8932b834092ed2dbad13008c1d Reviewed-on: https://skia-review.googlesource.com/6556 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* fix skslc crash when ternary parameter types don't matchGravatar Ethan Nicholas2017-01-04
| | | | | | | | | BUG=skia:5968 Change-Id: I541c7925ac83e830bd53015961312810042046c5 Reviewed-on: https://skia-review.googlesource.com/6545 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Scale the result of TightBounds when path was inverse-scaledGravatar Fredrik Söderquist2017-01-04
| | | | | | | | | | | | | When the path was "large" (as defined by ScaleFactor(...)), the computed bounds would not be adjusted to the correct space. Make sure to scale the result in those cases. BUG=chromium:678162 Change-Id: Ia2eb94050c4620286e9abb69976dbc0202ecc307 Reviewed-on: https://skia-review.googlesource.com/6501 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* fixed a divide-by-zero bug in skslcGravatar Ethan Nicholas2017-01-03
| | | | | | | | | BUG=skia:5960 Change-Id: I8ace6efefd14b11c3bc2448a1ab4e3353a29075f Reviewed-on: https://skia-review.googlesource.com/6539 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* validate deserialized path verbsGravatar Mike Reed2017-01-03
| | | | | | | | | BUG=676755 Change-Id: Ie9bd70d3a130c53737756587f73c9dce4a6bcb6d Reviewed-on: https://skia-review.googlesource.com/6529 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Cary Clark <caryclark@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>
* Increase "large" image size in DeferredTextureImage.Gravatar Brian Salomon2017-01-03
| | | | | | | | | | | | Reenable test on GTX10700 bot. BUG=skia:6080 Change-Id: Ieb4292e88fc337c226dad7ac82c6da84879e9522 Reviewed-on: https://skia-review.googlesource.com/6523 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
* fix fuzzerGravatar Cary Clark2017-01-03
| | | | | | | | | | | | abort if incoming data is out of range TBR=reed@google.com BUG=676866 Change-Id: I7d4850611654a399e32ea2012b23ca369dc53e70 Reviewed-on: https://skia-review.googlesource.com/6525 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* remove debugging printf from resource cache test.Gravatar Brian Salomon2017-01-03
| | | | | | | Change-Id: Iec03961810c477d34e763ea4da3149b0788f4efd Reviewed-on: https://skia-review.googlesource.com/6522 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Remove ref counting from GrOp.Gravatar Brian Salomon2017-01-03
| | | | | | | | | Instead use std::unique_ptr to manage GrOp lifetime. Change-Id: Ic1dc1e0ffd7254c3994221f498677af5bbf66a71 Reviewed-on: https://skia-review.googlesource.com/6479 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* BUILD.gn: skia_enable_pdfGravatar Hal Canary2017-01-03
| | | | | | | | | BUG=skia: Change-Id: Icf616bec73e81aad97815b519566ff5b9db611e3 Reviewed-on: https://skia-review.googlesource.com/6495 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* remove unused ForceUnique option from makeImageSnapshotGravatar Mike Reed2016-12-29
| | | | | | | | | BUG=skia: Change-Id: I2555ceb86b597f7bb34c8fc48b3e07eb7115ea82 Reviewed-on: https://skia-review.googlesource.com/6481 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Misc batch->op cleanup Part 1 of 2Gravatar Brian Salomon2016-12-21
| | | | | | | Change-Id: I80f951976558a284e55386e0a368f08bd835d8ca Reviewed-on: https://skia-review.googlesource.com/6359 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* This renames methods and classes that relate to static analysis of ↵Gravatar Brian Salomon2016-12-21
| | | | | | | | | combinations of GrDrawOps and GrPipelines. Change-Id: I737b901a19d3c67d2ff7f95802fb4df35656beb2 Reviewed-on: https://skia-review.googlesource.com/6199 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Rename files, macros, types, and functions related to GrDrawOp testing.Gravatar Brian Salomon2016-12-20
| | | | | | | | | Make the test factories use sk_sp. Change-Id: Idba630b84deb2848f2203a80fd72e1efa5fc6acf Reviewed-on: https://skia-review.googlesource.com/6342 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Update libwebp to v0.5.2-rc2Gravatar Leon Scroggins III2016-12-20
| | | | | | | | | | | | | This matches the version used by Chromium (crbug.com/675306) and Android (https://android-review.googlesource.com/#/c/316352/). Update our test. In the new version, we successfully decode a subset from incomplete input that we previously did not. Change-Id: I3442bf59ffdf223a723d8aa75f5b9b816b9e9c3c Reviewed-on: https://skia-review.googlesource.com/6320 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Remove getDevice_just_for_deprecated_compatibility_test()Gravatar Robert Phillips2016-12-20
| | | | | | | | | BUG=skia:6067 Change-Id: I646e75f43bc77ea884b7fad7281bf0b684996bb9 Reviewed-on: https://skia-review.googlesource.com/6299 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Implement SkICC::WriteICC()Gravatar Matt Sarett2016-12-20
| | | | | | | | | BUG=skia: Change-Id: Idd950c3da2c517780b24e312a4e7cc16ee413c99 Reviewed-on: https://skia-review.googlesource.com/6270 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Fix swapped interpretation of c and e in SkColorSpace_ICCGravatar Matt Sarett2016-12-19
| | | | | | | | | | | | | | | | The ICC errata supports the opposite of what we do. http://www.color.org/icc_specs2.xalter TBR=reed@google.com BUG=skia: CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: I18ace7f312926b264e624c30d8cb983eff5c434b Reviewed-on: https://skia-review.googlesource.com/6277 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* "Fix" some ImageFilter fuzzer issuesGravatar Robert Phillips2016-12-19
| | | | | | | | | | | | | | | | SkClipOp.h & SkPictureFlat.h Invalid SkClipOps were getting through - the question here is where (for a class enum) is a good place to put the k*Mask definition. SkPath1DPathEffect NaNs were getting past. SkBlurMaskFilter Assert wasn't necessary since we whacked the flag on the next line. Change-Id: I87f95ad39f4760284f881d7c4500eb82fcdba282 Reviewed-on: https://skia-review.googlesource.com/6194 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Herb Derby <herb@google.com>
* GIF: Avoid copying/storing data when possibleGravatar Leon Scroggins III2016-12-19
| | | | | | | | | | | | | | | | | | | If the input SkStream has a length and position, do not copy and store LZW blocks or ColorMaps. Instead, mark the position and size, and read from the stream when necessary. This will save memory in Chromium's use case, which has already buffered all of its data. In the case where we *do* need to copy, store it on the SkStreamBuffer. This allows SkGifImageReader to have simpler code. Add tests. Change-Id: Ic65fa766328ae2e5974b2084bc2099e19aced731 Reviewed-on: https://skia-review.googlesource.com/6157 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Fix iOS buildGravatar Matt Sarett2016-12-18
| | | | | | | | | | | | TBR=rmistry@google.com BUG=skia: Change-Id: I5fc38227138d5433b2435d9dab13ec5ade9a26b8 Reviewed-on: https://skia-review.googlesource.com/6235 Reviewed-by: Matt Sarett <msarett@google.com> Reviewed-by: Ravi Mistry <rmistry@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Revert "Revert "WIP: Skia support library for ICC tasks""Gravatar Ravi Mistry2016-12-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit eb733fbf56538838a36814c75cd03f917462cb22. Reason for revert: Revert patch was automatically merged incorrectly? Original change's description: > Revert "WIP: Skia support library for ICC tasks" > > This reverts commit fc8dc3194acb959ee5980b41766660ca0644bcab. > > Reason for revert: Breaks Build-Mac-Clang-Arm7-{Debug,Release}-iOS builds. > Example tasks: > * https://chromium-swarm.appspot.com/task?id=3322f668620b9e10&refresh=10 > * https://chromium-swarm.appspot.com/task?id=332296146331e810&refresh=10 > > Original change's description: > > WIP: Skia support library for ICC tasks > > > > As a starting point, this would be mostly trivial to implement using > > SkColorSpace. > > > > This also would give us the flexibility to begin to move all of > > the ICC related code from SkColorSpace to SkICC. > > > > What are the advantages of moving this away from SkColorSpace? > > (1) A long term goal (once Chrome uses SkCodec), might be to > > move SkColorSpace::MakeICC() out of the public API. That way, > > we can guarantee that we can draw to/from *any* SkColorSpace. > > (2) Keeps SkColorSpace separate from ICC-specific representations > > like SkColorSpaceTransferFn etc. > > > > BUG=skia: > > > > Change-Id: Iddeb9903221fb57fbfc01218d8641c928b4a5165 > > Reviewed-on: https://skia-review.googlesource.com/5676 > > Commit-Queue: Matt Sarett <msarett@google.com> > > Reviewed-by: Brian Osman <brianosman@google.com> > > Reviewed-by: Mike Reed <reed@google.com> > > > > TBR=mtklein@google.com,msarett@google.com,brianosman@google.com,reed@google.com,reviews@skia.org > BUG=skia: > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Change-Id: Ibdf272fce25892402bd3e85595fb8814cdf59856 > Reviewed-on: https://skia-review.googlesource.com/6232 > Commit-Queue: Ravi Mistry <rmistry@google.com> > Reviewed-by: Ravi Mistry <rmistry@google.com> > TBR=mtklein@google.com,rmistry@google.com,msarett@google.com,reviews@skia.org,brianosman@google.com,reed@google.com BUG=skia: NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I68b1624cfab8adfe31b17e1193a7766507dec8b0 Reviewed-on: https://skia-review.googlesource.com/6233 Commit-Queue: Ravi Mistry <rmistry@google.com> Reviewed-by: Ravi Mistry <rmistry@google.com>
* Revert "WIP: Skia support library for ICC tasks"Gravatar Ravi Mistry2016-12-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit fc8dc3194acb959ee5980b41766660ca0644bcab. Reason for revert: Breaks Build-Mac-Clang-Arm7-{Debug,Release}-iOS builds. Example tasks: * https://chromium-swarm.appspot.com/task?id=3322f668620b9e10&refresh=10 * https://chromium-swarm.appspot.com/task?id=332296146331e810&refresh=10 Original change's description: > WIP: Skia support library for ICC tasks > > As a starting point, this would be mostly trivial to implement using > SkColorSpace. > > This also would give us the flexibility to begin to move all of > the ICC related code from SkColorSpace to SkICC. > > What are the advantages of moving this away from SkColorSpace? > (1) A long term goal (once Chrome uses SkCodec), might be to > move SkColorSpace::MakeICC() out of the public API. That way, > we can guarantee that we can draw to/from *any* SkColorSpace. > (2) Keeps SkColorSpace separate from ICC-specific representations > like SkColorSpaceTransferFn etc. > > BUG=skia: > > Change-Id: Iddeb9903221fb57fbfc01218d8641c928b4a5165 > Reviewed-on: https://skia-review.googlesource.com/5676 > Commit-Queue: Matt Sarett <msarett@google.com> > Reviewed-by: Brian Osman <brianosman@google.com> > Reviewed-by: Mike Reed <reed@google.com> > TBR=mtklein@google.com,msarett@google.com,brianosman@google.com,reed@google.com,reviews@skia.org BUG=skia: NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ibdf272fce25892402bd3e85595fb8814cdf59856 Reviewed-on: https://skia-review.googlesource.com/6232 Commit-Queue: Ravi Mistry <rmistry@google.com> Reviewed-by: Ravi Mistry <rmistry@google.com>
* rework xor to be more like windingGravatar Cary Clark2016-12-16
| | | | | | | | | | | | | | | | Pathops is very well exercised with winding paths, but less so with xor (even odd) paths. Rewrite the xor main loop to look like the winding one to take advantage of the latter's bug fixes. TBR=reed@google.com BUG=skia:6041 Change-Id: Ied8d522254a327b1817b54f0abbf4414f5fab7da Reviewed-on: https://skia-review.googlesource.com/6228 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* WIP: Skia support library for ICC tasksGravatar Matt Sarett2016-12-16
| | | | | | | | | | | | | | | | | | | | | | | As a starting point, this would be mostly trivial to implement using SkColorSpace. This also would give us the flexibility to begin to move all of the ICC related code from SkColorSpace to SkICC. What are the advantages of moving this away from SkColorSpace? (1) A long term goal (once Chrome uses SkCodec), might be to move SkColorSpace::MakeICC() out of the public API. That way, we can guarantee that we can draw to/from *any* SkColorSpace. (2) Keeps SkColorSpace separate from ICC-specific representations like SkColorSpaceTransferFn etc. BUG=skia: Change-Id: Iddeb9903221fb57fbfc01218d8641c928b4a5165 Reviewed-on: https://skia-review.googlesource.com/5676 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Mike Reed <reed@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>
* Remove SkDynamicMemoryWStream::getOffset.Gravatar Ben Wagner2016-12-16
| | | | | | | | | | This method does the same thing as ::bytesWritten but has a confusing name. It appears there are no external users, so remove it. Change-Id: I06aed269200c34c2dda36605092f8ea37fcec693 Reviewed-on: https://skia-review.googlesource.com/6188 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* dump path fill type with dataGravatar Cary Clark2016-12-16
| | | | | | | | | | | | | | | | | SkPath::dump() and SkPath::dumpHex() dump the fill type in addition to the data so that the original path can be faithfully reconstructed. This may be a small part of why some error cases aren't reproduced. R=reed@google.com BUG=skia:6041 Change-Id: Ice86bf08ea907a6b87ceef182a9316a3c979af0b Reviewed-on: https://skia-review.googlesource.com/6185 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* Add color space to picture image as a creation parameterGravatar Brian Osman2016-12-16
| | | | | | | | | | | | | This gives a picture image a preferred "native" color space, which facilitates caching and other things. BUG=skia: Change-Id: I95988c14d17f96d7d870b3d1c3b723c36e2c170d Reviewed-on: https://skia-review.googlesource.com/6158 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com>
* move src/gpu/batches -> src/gpu/opsGravatar Brian Salomon2016-12-16
| | | | | | | Change-Id: I6410eae41f051ce38bef6f38d670924c3483c325 Reviewed-on: https://skia-review.googlesource.com/6163 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@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>