aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
Commit message (Collapse)AuthorAge
...
* Revert "Reduce read/write-SurfacePixels call sites"Gravatar Robert Phillips2017-04-14
| | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 74d5a1470378dc7dae9eec38d46f9f802fc5c249. Reason for revert: erg Original change's description: > Reduce read/write-SurfacePixels call sites > > Change-Id: I657c489c56b93765567be69076fb4c3d526e55a5 > Reviewed-on: https://skia-review.googlesource.com/13068 > Reviewed-by: Brian Osman <brianosman@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> > TBR=robertphillips@google.com,brianosman@google.com,egdaniel@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: If80f36ddae9d695ee2e5413f3eb49a1f5c32f8a4 Reviewed-on: https://skia-review.googlesource.com/13506 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Reduce read/write-SurfacePixels call sitesGravatar Robert Phillips2017-04-14
| | | | | | | Change-Id: I657c489c56b93765567be69076fb4c3d526e55a5 Reviewed-on: https://skia-review.googlesource.com/13068 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Improve accuracy of cubic classificationGravatar Chris Dalton2017-04-14
| | | | | | | | | | | | | | | | | | - Updates the logic to reflect the Loop-Blinn paper instead of the GPU gems website. - Removes the threshold for detecting local cusps. The serpentine codepath works for these cusps anyway, so what we really want to know is whether the discriminant is negative. - Makes sure to not scale the inflection function by 1/0. - Shifts the inflection function coefficients in d[] so they match the paper. - Stores the cubic discriminant in d[0]. Bug: skia: Change-Id: I909a522a0fd27c9c8dfbc27d968bc43eeb7a416f Reviewed-on: https://skia-review.googlesource.com/13304 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* fix pathops_unittest test stringsGravatar Cary Clark2017-04-14
| | | | | | | | | | | | | Using std::string is tons faster than SkString; multiple callers to std::string don't run into thread contention but SkString does. R=csmartdalton@google.com Change-Id: I0357c6a9c73856bfffbb76e65c275acdfe7d8159 Reviewed-on: https://skia-review.googlesource.com/13471 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* make picture-imagegenerator more robust on requested infosGravatar Mike Reed2017-04-13
| | | | | | | | | | This new unittest would assert before this fix. Bug: skia:6501 Change-Id: I351ad03f29bccc054f72bfcb838174830dbd008c Reviewed-on: https://skia-review.googlesource.com/13413 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* disable this test on NoGPU botsGravatar Mike Klein2017-04-13
| | | | | | | | | | It fails at line 336: REPORTER_ASSERT(reporter, configs[i]->getBackend().equals(expectedConfigs[i].backend)); Change-Id: Iab71162b9d7b5454d200cb373026992eac92adf8 Reviewed-on: https://skia-review.googlesource.com/13406 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* make ShadowUtils unit test pass on no-GPU buildsGravatar Mike Klein2017-04-13
| | | | | | | | | It thinks it should fail, but it doesn't. Change-Id: Ie97f57dd7a9040a817b59186b2f8fa704bdda3e9 Reviewed-on: https://skia-review.googlesource.com/13404 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* fix drawDRRect for fuzzerGravatar Cary Clark2017-04-12
| | | | | | | | | | make assert abort instead Bug: skia:6450 Change-Id: I23ff51124fa8f069f2c7e5260f800017d7475d46 Reviewed-on: https://skia-review.googlesource.com/13197 Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Hal Canary <halcanary@google.com>
* Add SkCodec methods for individual framesGravatar Leon Scroggins III2017-04-12
| | | | | | | | | | | | | | | | | | | | | Add a version of getFrameInfo that returns information about a single frame, allowing a client to skip creating the entire vector. Add getFrameCount, for determining the number of frames in the image. Reimplement std::vector<FrameInfo> getFrameInfo with the new methods. Updates to the test: - getFrameInfo(size_t, FrameInfo*) fails before parsing - Test both versions of getFrameInfo - Recreate the codec between tests, to test parsing Change-Id: I77c19087f2f8dcf2c536d80167b18ad1ca96ae94 Reviewed-on: https://skia-review.googlesource.com/13190 Reviewed-by: Matt Sarett <msarett@google.com> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Chris Blume <cblume@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Disable deferred proxies for Chrome branchGravatar Robert Phillips2017-04-12
| | | | | | | | | Chrome is branching again and Proxy instantiation is still occurring at a bad spot in Skia. Change-Id: I2f6bed7f1833737aa9bb7fd819ff108cffaeaf1d Reviewed-on: https://skia-review.googlesource.com/13133 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Revert "remove unused SkBitmap::copyPixelsTo""Gravatar Mike Reed2017-04-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 7bfdfda809e7273d7c962cc62ef9390b5007fb5a. Reason for revert: google3 has been updated Original change's description: > Revert "remove unused SkBitmap::copyPixelsTo" > > This reverts commit 0f3fdfacf32261f943dcac5cdfd14475011f40db. > > Reason for revert: Blink-headless in Google3 needs an update too. > > Original change's description: > > remove unused SkBitmap::copyPixelsTo > > > > Needs https://codereview.chromium.org/2812853002/ to land first > > > > Bug: skia:6465 > > Change-Id: I531e33b2848cd995f20844786ed1a8d34d63fb64 > > Reviewed-on: https://skia-review.googlesource.com/13171 > > Reviewed-by: Mike Reed <reed@google.com> > > Commit-Queue: Mike Reed <reed@google.com> > > > > TBR=reed@google.com,reviews@skia.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Change-Id: I5e7c4b0d05772e4948cb1dffdcc40e095fbdba41 > Reviewed-on: https://skia-review.googlesource.com/13185 > Reviewed-by: Mike Klein <mtklein@google.com> > Commit-Queue: Mike Klein <mtklein@google.com> > TBR=mtklein@google.com,reviews@skia.org,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Id441cec351fe580cbb00739ca9544aa5276cf16a Reviewed-on: https://skia-review.googlesource.com/13224 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* switch over to no lockPixels in pixelrefGravatar Mike Reed2017-04-12
| | | | | | | | | | Bug: skia:6481 Change-Id: I7c32d2e6dcd4c9cd8aa761ac5c4794c916eb650a Reviewed-on: https://skia-review.googlesource.com/13193 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Add perspective shadowsGravatar Jim Van Verth2017-04-11
| | | | | | | | Bug: skia: Change-Id: I1972f85f593828c982ea08143e1ed7eb70345eaa Reviewed-on: https://skia-review.googlesource.com/10296 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Remove discard from GrRenderTarget & force it to always go through a ↵Gravatar Robert Phillips2017-04-11
| | | | | | | | | | | | | | | RenderTargetContext This is a bit sloppy in that it ignores some instances where discards were being issued before. The creation of the temp RTContext in the RenderTarget's discard method was causing an extra split in the opLists. This is split out of: https://skia-review.googlesource.com/c/10284/ (Omnibus: Remove GrSurface-derived classes from ops) Change-Id: Ic366d303280635763b0fae238c4df37c04fb8503 Reviewed-on: https://skia-review.googlesource.com/11125 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* SkSize can be aggregate-initializedGravatar Hal Canary2017-04-11
| | | | | | | | | | | | Previosly, SkSize had a base class, which prevented it. Also removes unused SkISize::clampNegToZero() and SkSize::clampNegToZero(). Change-Id: I7b93b42f6f6381c66e294bbedee99ad53c6c3436 Reviewed-on: https://skia-review.googlesource.com/13187 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Change bitmapcache to not rely on lockpixels.Gravatar Mike Reed2017-04-11
| | | | | | | | | | | | | | | | | | | | The Rec in the cache is the owner of the pixel memory - discardable or - malloc Each external client has a pixelref that just points to those pixels, and whose destructor will notify the rec. This eliminates the dependency on lockPixels in pixelref, freeing us to remove that entirely from pixelref. Bug: skia: Change-Id: If45ed0ae202a1211336626364235215253e8aa7c Reviewed-on: https://skia-review.googlesource.com/10300 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Matt Sarett <msarett@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Revert "remove unused SkBitmap::copyPixelsTo"Gravatar Mike Klein2017-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0f3fdfacf32261f943dcac5cdfd14475011f40db. Reason for revert: Blink-headless in Google3 needs an update too. Original change's description: > remove unused SkBitmap::copyPixelsTo > > Needs https://codereview.chromium.org/2812853002/ to land first > > Bug: skia:6465 > Change-Id: I531e33b2848cd995f20844786ed1a8d34d63fb64 > Reviewed-on: https://skia-review.googlesource.com/13171 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I5e7c4b0d05772e4948cb1dffdcc40e095fbdba41 Reviewed-on: https://skia-review.googlesource.com/13185 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@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>
* remove unused SkBitmap::copyPixelsToGravatar Mike Reed2017-04-11
| | | | | | | | | | Needs https://codereview.chromium.org/2812853002/ to land first Bug: skia:6465 Change-Id: I531e33b2848cd995f20844786ed1a8d34d63fb64 Reviewed-on: https://skia-review.googlesource.com/13171 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* SkCanvas constructor with legacy flag for Android frameworkGravatar Matt Sarett2017-04-11
| | | | | | | | Bug: skia: Change-Id: I5b268ad03dde075f2710196d5ad2bd19249557f7 Reviewed-on: https://skia-review.googlesource.com/11788 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Revert "Rm makeRenderTargetContext in favor of deferred version"Gravatar Robert Phillips2017-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d83ec0441279b79551b4ecb4598696249ea55145. Reason for revert: various bot failures Original change's description: > Rm makeRenderTargetContext in favor of deferred version > > Change-Id: Ifdf67453607256ba7cdb0837263377bd83907212 > Reviewed-on: https://skia-review.googlesource.com/13001 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I4e67a20cbe658b24725dcf386ac8bfdd127647ea Reviewed-on: https://skia-review.googlesource.com/13131 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Rm makeRenderTargetContext in favor of deferred versionGravatar Robert Phillips2017-04-11
| | | | | | | Change-Id: Ifdf67453607256ba7cdb0837263377bd83907212 Reviewed-on: https://skia-review.googlesource.com/13001 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* remove kReturnNullForEmpty_FinishFlag featureGravatar Mike Klein2017-04-11
| | | | | | | | | | | | It's unused, and doesn't appear to be correct, returning nullptr too early when we should return a non-empty SkMiniPicture. The mini-recorder path will return a zero-allocation SkEmptyPicture anyway. Change-Id: I1be538049e731acfc2b0f8b4f30cafee434a91dc Reviewed-on: https://skia-review.googlesource.com/12626 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* constexprify GrBlend.h and GrPorterDuffXferProcessor.cppGravatar Brian Salomon2017-04-10
| | | | | | | | | | Also remove some unused functions from GrBlend.h and related unit test. Bug: skia: Change-Id: Id8ad0057a02f65a9e19dc75e4b88709a762f4139 Reviewed-on: https://skia-review.googlesource.com/12623 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Move ref counting out of GrProcessor and into subclasses.Gravatar Brian Salomon2017-04-10
| | | | | | | | | | | | | This will allow different subclasses to use different models for lifetime management. GrXferProcessor moves to simple ref counting since they don't own GrGpuResources. This also constifies GrXferProcessor factories. Change-Id: I6bea0ea8de718874063224232f9da50887868b16 Reviewed-on: https://skia-review.googlesource.com/11792 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Fix infinite loop in SkRTree::insert()Gravatar Mike Klein2017-04-10
| | | | | | | | | | | | When aspectRatio is not finite, insert() can fall into an infinite loop. This happens if you pass SkRect::MakeLargest() to the factory as bounds. BUG=skia:5974 Change-Id: Ibcc9e5c5943c718608d4c1448305f7b8f11413bc Reviewed-on: https://skia-review.googlesource.com/11784 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Revert "Revert "Create GrXferProcessor while doing GrProcessorSet analysis.""Gravatar Brian Salomon2017-04-08
| | | | | | | | | | This reverts commit 5dac9b3b5bf7e9c06c207cb92e257535c7d9ec95. Bug: skia: Change-Id: I3db2ec6776eb10c1f863b3992a2c8048c54b130f Reviewed-on: https://skia-review.googlesource.com/12620 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Create GrXferProcessor while doing GrProcessorSet analysis."Gravatar Brian Salomon2017-04-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0ae0e23696f2ef08503040f8c02765eb58b26ddf. Reason for revert: static assert failure on ios build Original change's description: > Create GrXferProcessor while doing GrProcessorSet analysis. > > > Bug: skia: > Change-Id: I62a628f9c0536ffb05c8f9d0c9ded5657f93b48e > Reviewed-on: https://skia-review.googlesource.com/11482 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> > TBR=egdaniel@google.com,bsalomon@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ifd57367b0326dd2b53c622705a868e246645d589 Reviewed-on: https://skia-review.googlesource.com/12104 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Create GrXferProcessor while doing GrProcessorSet analysis.Gravatar Brian Salomon2017-04-08
| | | | | | | | Bug: skia: Change-Id: I62a628f9c0536ffb05c8f9d0c9ded5657f93b48e Reviewed-on: https://skia-review.googlesource.com/11482 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* make SkAutoTMalloc self-move safeGravatar Mike Klein2017-04-07
| | | | | | | | | | | | | | | We were just combing through possible changes that might have affected the attached bug, this popped out as pretty obviously unsafe. This doesn't explain the Chrome bug... SkAutoTMalloc and SKAutoSTMalloc are separate types. :( The new test fails and crashes before, passes after. Change-Id: I033f488a7f644b7a70e612c8535fedfac35c76db Reviewed-on: https://skia-review.googlesource.com/11797 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
* Make GrCopySurfaceOp friendlier to GrSurfaceProxy (take 2)Gravatar Robert Phillips2017-04-07
| | | | | | | | | Reland of: https://skia-review.googlesource.com/c/11325/ (Make GrCopySurfaceOp friendlier to GrSurfaceProxy) Change-Id: Ibe7312cebe7793af5803353a1499fbe7874c558f Reviewed-on: https://skia-review.googlesource.com/11780 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Make GrCopySurfaceOp friendlier to GrSurfaceProxy"Gravatar Robert Phillips2017-04-06
| | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d7cda9a6f050c30e65b0744b3cfb45cecdc40834. Reason for revert: Tegra3!!!! Original change's description: > Make GrCopySurfaceOp friendlier to GrSurfaceProxy > > Change-Id: Iba8c068bd96ab154d466e485a9db31dd552138de > Reviewed-on: https://skia-review.googlesource.com/11325 > Commit-Queue: Robert Phillips <robertphillips@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Idc31d469d94e6e2772ee5714987b3a05bb902d88 Reviewed-on: https://skia-review.googlesource.com/11580 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Manual revert: Add support for writing ICC profiles to webp encoder"Gravatar Matt Sarett2017-04-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 4293a1e5f259cf12560d6e794c1a05ad4dbc0b32. Reason for revert: Relanding, libwebp updated in Android master Original change's description: > Manual revert: Add support for writing ICC profiles to webp encoder > > Bug: skia: > Change-Id: I4e70bee8c2ea8dbd5ae1e84aa097f5a7e2e62721 > Reviewed-on: https://skia-review.googlesource.com/11444 > Reviewed-by: Matt Sarett <msarett@google.com> > Reviewed-by: Leon Scroggins <scroggo@google.com> > Commit-Queue: Matt Sarett <msarett@google.com> > TBR=msarett@google.com,scroggo@google.com,reviews@skia.org,jzern@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I73aa9e8183241ada4ec6451567bce3d3d18995cc Reviewed-on: https://skia-review.googlesource.com/11523 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Make GrCopySurfaceOp friendlier to GrSurfaceProxyGravatar Robert Phillips2017-04-06
| | | | | | | Change-Id: Iba8c068bd96ab154d466e485a9db31dd552138de Reviewed-on: https://skia-review.googlesource.com/11325 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* make copyTo_with_allocator android onlyGravatar Mike Reed2017-04-06
| | | | | | | | | Bug: skia:6464 Change-Id: I3d95daae2ae854671e6231e62f200913ce3586d0 Reviewed-on: https://skia-review.googlesource.com/11486 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* handle odd-index-count in encode/decodeGravatar Mike Reed2017-04-06
| | | | | | | | Bug: skia: Change-Id: Iffb123001a77049c6581f63bbc69c62f241a87f8 Reviewed-on: https://skia-review.googlesource.com/11405 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Eric Boren <borenet@google.com>
* Manual revert: Add support for writing ICC profiles to webp encoderGravatar Matt Sarett2017-04-06
| | | | | | | | | Bug: skia: Change-Id: I4e70bee8c2ea8dbd5ae1e84aa097f5a7e2e62721 Reviewed-on: https://skia-review.googlesource.com/11444 Reviewed-by: Matt Sarett <msarett@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* add guard for obsolete (non-functioning) replayClipsGravatar Mike Reed2017-04-06
| | | | | | | | | | | | replayClips has been disabled (broken) for a while. This CL just attempts to hide the api (will remove once android's callsite is removed) Bug: skia: Change-Id: I35b412addfc0a08ea888a62609888b9b54dce2a6 Reviewed-on: https://skia-review.googlesource.com/11401 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Rm readPixels from GrSurface & move read/writeSurfacePixels to GrContextPriv ↵Gravatar Robert Phillips2017-04-06
| | | | | | | | | | | | | (take 3) This is in service of: https://skia-review.googlesource.com/c/11125/ (Add parallel proxyID to StencilOps & RenderTargetOpList) where I want a better choke point for texture creation to improve discard handling. This is a re-reland of: https://skia-review.googlesource.com/c/11200/ (Rm readPixels from GrSurface & move read/writeSurfacePixels to GrContextPriv) Change-Id: Icfb9dd223418dd460405efd2bfd9d1c356beed1a Reviewed-on: https://skia-review.googlesource.com/11412 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* SkImageEncoder: Be more lenient on inputsGravatar Matt Sarett2017-04-05
| | | | | | | | | | | | | | | | | | | | (1) Some clients want us to write ICC profiles, even though they have not opted into linear unpremultiplication. This CL allows that behavior. (2) We should not assert that the transfer function must be linear or srgb. Particularly in non-linear blending modes, skia is willing to support a larger set of transfer functions. (3) We still need to require linear or srgb when in kRespect transfer function mode. We have not yet implemented linear unpremultiplies for arbitrary transfer functions. Bug: skia: Change-Id: Idce9f07c3d36eca4d78ede5e2650b2cab412904c Reviewed-on: https://skia-review.googlesource.com/11349 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
* Revert "Revert "Add support for writing ICC profiles to webp encoder""Gravatar Matt Sarett2017-04-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e87d7781db75a7ec22a103eda0886c2ca8dc4d9d. Reason for revert: Not the cause of the crashes. Original change's description: > Revert "Add support for writing ICC profiles to webp encoder" > > This reverts commit 0c9d0b4e03b6c10778329e995b5dfdcb97954b28. > > Reason for revert: Looks like it's breaking a number of bots. > > Original change's description: > > Add support for writing ICC profiles to webp encoder > > > > Bug: skia: > > Change-Id: If0a8f84ed88da96924370b841f2283c0ff8e32ab > > Reviewed-on: https://skia-review.googlesource.com/10212 > > Commit-Queue: Matt Sarett <msarett@google.com> > > Reviewed-by: Leon Scroggins <scroggo@google.com> > > > > TBR=msarett@google.com,scroggo@google.com,reviews@skia.org,jzern@google.com > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Change-Id: Ic06ad9f19a4d743b34f8d3bd33f171b9d74badcb > Reviewed-on: https://skia-review.googlesource.com/11408 > Reviewed-by: Jim Van Verth <jvanverth@google.com> > Commit-Queue: Jim Van Verth <jvanverth@google.com> > TBR=jvanverth@google.com,msarett@google.com,scroggo@google.com,reviews@skia.org,jzern@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I42f6ddefaf87c87b155640950b52a456952130ec Reviewed-on: https://skia-review.googlesource.com/11410 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Fix MSAN error in testGravatar Matt Sarett2017-04-05
| | | | | | | | | Bug: skia: Change-Id: I27afd02b3383e259101a856630d04566fdf7a994 Reviewed-on: https://skia-review.googlesource.com/11407 Reviewed-by: Matt Sarett <msarett@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Revert "Add support for writing ICC profiles to webp encoder"Gravatar Jim Van Verth2017-04-05
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0c9d0b4e03b6c10778329e995b5dfdcb97954b28. Reason for revert: Looks like it's breaking a number of bots. Original change's description: > Add support for writing ICC profiles to webp encoder > > Bug: skia: > Change-Id: If0a8f84ed88da96924370b841f2283c0ff8e32ab > Reviewed-on: https://skia-review.googlesource.com/10212 > Commit-Queue: Matt Sarett <msarett@google.com> > Reviewed-by: Leon Scroggins <scroggo@google.com> > TBR=msarett@google.com,scroggo@google.com,reviews@skia.org,jzern@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ic06ad9f19a4d743b34f8d3bd33f171b9d74badcb Reviewed-on: https://skia-review.googlesource.com/11408 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Add support for writing ICC profiles to webp encoderGravatar Matt Sarett2017-04-05
| | | | | | | | Bug: skia: Change-Id: If0a8f84ed88da96924370b841f2283c0ff8e32ab Reviewed-on: https://skia-review.googlesource.com/10212 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
* Fix various SkBitmap::copyTo() bugsGravatar Matt Sarett2017-04-05
| | | | | | | | | | | | | | | | | | | | I believe that the best fix is to move this entire function into the framework and call SkPixmap::readPixels() from there. Given that, we have already branched, I think this is the simplest fix. (1) We never added F16 support. Enable F16. This involves assigning color spaces to src and dst pixmaps so that the conversion makes sense. (2) SkPixmap::readPixels() does not support parametric transfer functions. Fortunately, the framework never uses copyTo() to do color space conversions. We should at least support the case where the src color space matches the dst color space. Bug: skia: Change-Id: I129b7c02249eed34a9ec4aa0ca736aadccc19777 Reviewed-on: https://skia-review.googlesource.com/11387 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Revert "Rm readPixels from GrSurface & move read/writeSurfacePixels to ↵Gravatar Robert Phillips2017-04-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GrContextPriv (take 2)" This reverts commit aaee31f18c0845417103d84285e365575def3c40. Reason for revert: possible valgrind leak Original change's description: > Rm readPixels from GrSurface & move read/writeSurfacePixels to GrContextPriv (take 2) > > This is in service of: https://skia-review.googlesource.com/c/11125/ (Add parallel proxyID to StencilOps & RenderTargetOpList) where I want a better choke point for texture creation to improve discard handling. > > This is a reland of: https://skia-review.googlesource.com/c/11200/ (Rm readPixels from GrSurface & move read/writeSurfacePixels to GrContextPriv) > > Change-Id: Icd0a90d2beb483dc24ed87c3bace9c817019e148 > Reviewed-on: https://skia-review.googlesource.com/11326 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ia0b92bf6402cb5f9607310d356f43bff2e3e75eb Reviewed-on: https://skia-review.googlesource.com/11361 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Rm readPixels from GrSurface & move read/writeSurfacePixels to GrContextPriv ↵Gravatar Robert Phillips2017-04-05
| | | | | | | | | | | | | (take 2) This is in service of: https://skia-review.googlesource.com/c/11125/ (Add parallel proxyID to StencilOps & RenderTargetOpList) where I want a better choke point for texture creation to improve discard handling. This is a reland of: https://skia-review.googlesource.com/c/11200/ (Rm readPixels from GrSurface & move read/writeSurfacePixels to GrContextPriv) Change-Id: Icd0a90d2beb483dc24ed87c3bace9c817019e148 Reviewed-on: https://skia-review.googlesource.com/11326 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Add SkImage::makeColorSpace() to public APIGravatar Matt Sarett2017-04-05
| | | | | | | | | | | | | Gives Chrome the flexibility to xform and cache SkImages before they reach the SkColorSpaceXformCanvas. Bug: skia: Change-Id: I1f188f385b953b5a958c15578ea66deffb4dc6c5 Reviewed-on: https://skia-review.googlesource.com/11290 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Reed <reed@google.com>
* Revert "Rm readPixels from GrSurface & move read/writeSurfacePixels to ↵Gravatar Robert Phillips2017-04-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | GrContextPriv" This reverts commit fb0bd98a43fa11e09705837418167dd72bb4a361. Reason for revert: ANGLE failures Original change's description: > Rm readPixels from GrSurface & move read/writeSurfacePixels to GrContextPriv > > This is in service of: https://skia-review.googlesource.com/c/11125/ (Add parallel proxyID to StencilOps & RenderTargetOpList) where I want a better choke point for texture creation to improve discard handling. > > Change-Id: If57a7de47edc0853dae7bc61337d9acdc03d63b0 > Reviewed-on: https://skia-review.googlesource.com/11200 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I7241070dc1f9df47181061e07adab141f9857974 Reviewed-on: https://skia-review.googlesource.com/11324 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Rm readPixels from GrSurface & move read/writeSurfacePixels to GrContextPrivGravatar Robert Phillips2017-04-05
| | | | | | | | | This is in service of: https://skia-review.googlesource.com/c/11125/ (Add parallel proxyID to StencilOps & RenderTargetOpList) where I want a better choke point for texture creation to improve discard handling. Change-Id: If57a7de47edc0853dae7bc61337d9acdc03d63b0 Reviewed-on: https://skia-review.googlesource.com/11200 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>