aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
Commit message (Collapse)AuthorAge
...
* Use device and key descriptorsGravatar Herb Derby2018-05-08
| | | | | | | Change-Id: I2ac13303376f3d1464dd1e259637374a9c5ef237 Reviewed-on: https://skia-review.googlesource.com/125823 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Khushal Sagar <khushalsagar@google.com>
* Fix a bug in SkGpuBlurUtils::GaussianBlur (take 3)Gravatar Robert Phillips2018-05-08
| | | | | | | | | | | | | This fixes the remaining imageblurclampmode bug and a preexisting un-reported error in the imageblurrepeatmode GM. This relies on https://chromium-review.googlesource.com/c/chromium/src/+/1044113 (Add a flag to disable a blur imagefilter bug fix in Skia) landing in Chrome first. Bug: skia:7765 Change-Id: I66e27384541002829b2bd4b42d9cbda837aa7c3d Reviewed-on: https://skia-review.googlesource.com/125961 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-on: https://skia-review.googlesource.com/126220
* text-blob: Fix OOM issues during blob deserialization.Gravatar Khushal2018-05-07
| | | | | | | | | | | | Limit the number of glyphs allowed during blob deserialization. Allocating for an arbitrary number can lead to OOM issues. Bug: 840096 Change-Id: I1673fd312438b99ff76dadcfdc9f9427acdca13b R=bsalomon@chromium.org Reviewed-on: https://skia-review.googlesource.com/126603 Commit-Queue: Khusal Sagar <khushalsagar@chromium.org> Reviewed-by: Florin Malita <fmalita@chromium.org>
* SkAdvancedTypefaceMetrics: simplify moreGravatar Hal Canary2018-05-07
| | | | | | | Change-Id: I80c28c50aa96c28181d2fef13daad4a80ec91a12 Reviewed-on: https://skia-review.googlesource.com/120160 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* make SkColorSpace::MakeICC strict as skcmsGravatar Mike Klein2018-05-07
| | | | | | | | | | | | | | | We do this somewhat trivially by calling skcms_Parse() and failing if it fails. This will help keep us sane while we work to remove SkColorSpace::MakeICC(). Change-Id: Icb1bc1a088083e181f46465dbb3a530f0e004193 Reviewed-on: https://skia-review.googlesource.com/126510 Commit-Queue: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com>
* Handle failure to create SkColorSpaceXform in SkConvertPixelsGravatar Brian Osman2018-05-07
| | | | | | | | | | | | For now, this will just fallback to the pipeline code. Eventually, we may need to support more color spaces in skcms, (or put in a simpler fallback that just does type conversion and ignores color space)? Bug: chromium:838115 Change-Id: Id71eec6a72202683957c884620ee3fe90df6c776 Reviewed-on: https://skia-review.googlesource.com/126201 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Make sure the ScalerContextRec is denseGravatar Herb Derby2018-05-07
| | | | | | | | | | | Make sure that the Rec structure is dense because the SkDescriptor code takes checksums of this structure. Change-Id: Id384ed49e17f4613647da538c810f09a066efd90 Reviewed-on: https://skia-review.googlesource.com/126503 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Remove android specific code - v2Gravatar Herb Derby2018-05-07
| | | | | | | Change-Id: I2010b168f1a1f3bc48b86a075b0398eaf46ea328 Reviewed-on: https://skia-review.googlesource.com/126480 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Reland "Avoid drawing BW clipped color glyphs many times."Gravatar Ben Wagner2018-05-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8a95244f626c2f7d4b66c8ca18266c2b0640bebb. Reason for revert: Didn't actually break anything. Original change's description: > Revert "Avoid drawing BW clipped color glyphs many times." > > This reverts commit bba38ee80e4140908ac0c351dc18a2f1224e5f0a. > > Reason for revert: possibly breaking chrome text > > Original change's description: > > Avoid drawing BW clipped color glyphs many times. > > > > Prior to this change if a color glyph is drawn through the raster device > > with an aliased clip the glyph is drawn once for each rectangular region > > in the aliased clip. In addition, even when the glyph was not a color > > glyph in this situation, the mask was checked for being a color glyph > > once for each rectangular region of the aliased clip. This change hoists > > the test for the color format out of the loop to ensure that the mask > > format is checked once and the mask is drawn once. > > > > This issue was discovered by rotating the coloremoji_blendmodes gm. > > > > Change-Id: I18b6b546356780e0b00948fff7b65783219f5c92 > > Reviewed-on: https://skia-review.googlesource.com/125868 > > Reviewed-by: Mike Reed <reed@google.com> > > Commit-Queue: Ben Wagner <bungeman@google.com> > > TBR=mtklein@google.com,bungeman@google.com,reed@google.com > > # Not skipping CQ checks because original CL landed > 1 day ago. > > Change-Id: Ife6d7255f9cb88b6f9d7a3c5800e88cc065e475b > Reviewed-on: https://skia-review.googlesource.com/126401 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,mtklein@google.com,bungeman@google.com,reed@google.com Change-Id: I7fc4c1f901bcee482f6b118b192caee14c112e43 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/126540 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Respect SkBitmapDeviceFilteredSurfaceProps in SkThreadedBMPDeviceGravatar Yuqian Li2018-05-07
| | | | | | | | | | | | Bug: skia:7909 Change-Id: I13ccfbdc883f764f60701383b90537d3175a8126 Reviewed-on: https://skia-review.googlesource.com/126100 Commit-Queue: Ben Wagner <bungeman@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com> Reviewed-by: Ben Wagner <bungeman@google.com> Auto-Submit: Yuqian Li <liyuqian@google.com> Reviewed-on: https://skia-review.googlesource.com/126463 Reviewed-by: Greg Daniel <egdaniel@google.com>
* track bounds of top-level control opsGravatar Mike Klein2018-05-07
| | | | | | | | | | | | | | | | We don't need an explicit save-restore block to determine the bounds of top-level control operations... the implicit save-restore that all picutres have should logically work the same way. The commented test failed before this and passes now. Bug: skia:7735 Change-Id: Ibd31a3a9b0b48042ab3869a6bb57bc8d8bb78c09 Reviewed-on: https://skia-review.googlesource.com/126460 Commit-Queue: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com>
* SkRecorder: templates are better than macrosGravatar Hal Canary2018-05-07
| | | | | | | Change-Id: I594da617a0fc8970a01c2165e41cdd803173ffc5 Reviewed-on: https://skia-review.googlesource.com/126420 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Revert "Avoid drawing BW clipped color glyphs many times."Gravatar Greg Daniel2018-05-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit bba38ee80e4140908ac0c351dc18a2f1224e5f0a. Reason for revert: possibly breaking chrome text Original change's description: > Avoid drawing BW clipped color glyphs many times. > > Prior to this change if a color glyph is drawn through the raster device > with an aliased clip the glyph is drawn once for each rectangular region > in the aliased clip. In addition, even when the glyph was not a color > glyph in this situation, the mask was checked for being a color glyph > once for each rectangular region of the aliased clip. This change hoists > the test for the color format out of the loop to ensure that the mask > format is checked once and the mask is drawn once. > > This issue was discovered by rotating the coloremoji_blendmodes gm. > > Change-Id: I18b6b546356780e0b00948fff7b65783219f5c92 > Reviewed-on: https://skia-review.googlesource.com/125868 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Ben Wagner <bungeman@google.com> TBR=mtklein@google.com,bungeman@google.com,reed@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: Ife6d7255f9cb88b6f9d7a3c5800e88cc065e475b Reviewed-on: https://skia-review.googlesource.com/126401 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Revert "Remove android specific code"Gravatar Greg Daniel2018-05-07
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 5570ea0c2549722f4069add1875743e6c44fc50b. Reason for revert: Possibly breaking chrome Original change's description: > Remove android specific code > > Change-Id: Ib9b1f936d1aee920ba7064a9eccffaca6696812f > Reviewed-on: https://skia-review.googlesource.com/125341 > Commit-Queue: Mike Reed <reed@google.com> > Reviewed-by: Mike Reed <reed@google.com> > Auto-Submit: Herb Derby <herb@google.com> TBR=herb@google.com,reed@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: I95578d720fc4d5924296245522f880dc15624be9 Reviewed-on: https://skia-review.googlesource.com/126360 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Revert "Respect SkBitmapDeviceFilteredSurfaceProps in SkThreadedBMPDevice"Gravatar Greg Daniel2018-05-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit b9a1e688fd9c3e64c50d9159481e72a812f978c1. Reason for revert: breaking msan Original change's description: > Respect SkBitmapDeviceFilteredSurfaceProps in SkThreadedBMPDevice > > Bug: skia:7909 > Change-Id: I3e480a57f16eec97706296137c8c1061555b9701 > Reviewed-on: https://skia-review.googlesource.com/126100 > Commit-Queue: Ben Wagner <bungeman@google.com> > Commit-Queue: Yuqian Li <liyuqian@google.com> > Reviewed-by: Ben Wagner <bungeman@google.com> > Auto-Submit: Yuqian Li <liyuqian@google.com> TBR=mtklein@google.com,bungeman@google.com,liyuqian@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: skia:7909 Change-Id: Iee605220721a8b9f74b652106d22b4516a87900a Reviewed-on: https://skia-review.googlesource.com/126320 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Revert "Restore old SkBitmapDeviceFilteredSurfaceProps"Gravatar Greg Daniel2018-05-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 3d5b83bf95333a0b31b08fb4a889fa7697c87c03. Reason for revert: Need to revert to revert previous change Original change's description: > Restore old SkBitmapDeviceFilteredSurfaceProps > > The old seemingly unnecessary assignment is needed, otherwise > skbug.com/7909 won't be fixed, and we will also introduce some > unexpected gold changes. > > Ben: did you remember why you originally have that additional > assignment? Probably related with SkTLazy? > > Bug: skia:7909 > TBR: bungeman@google.com > Change-Id: I20293b76bb448733d3ab4a90d40282b1420000d0 > Reviewed-on: https://skia-review.googlesource.com/126204 > Reviewed-by: Yuqian Li <liyuqian@google.com> > Commit-Queue: Yuqian Li <liyuqian@google.com> TBR=bungeman@google.com,liyuqian@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: skia:7909 Change-Id: I27841ba2040ad026e67402e3b11a2b0ba5a55cb9 Reviewed-on: https://skia-review.googlesource.com/126321 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Restore old SkBitmapDeviceFilteredSurfacePropsGravatar Yuqian Li2018-05-04
| | | | | | | | | | | | | | | | The old seemingly unnecessary assignment is needed, otherwise skbug.com/7909 won't be fixed, and we will also introduce some unexpected gold changes. Ben: did you remember why you originally have that additional assignment? Probably related with SkTLazy? Bug: skia:7909 TBR: bungeman@google.com Change-Id: I20293b76bb448733d3ab4a90d40282b1420000d0 Reviewed-on: https://skia-review.googlesource.com/126204 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* SkSinglyLinkedList: use unique_ptr to manage ownershipGravatar Hal Canary2018-05-04
| | | | | | | Change-Id: I7b0fe6bd601b9ae0e9042ff28aa5b4dec9a9639b Reviewed-on: https://skia-review.googlesource.com/126180 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Respect SkBitmapDeviceFilteredSurfaceProps in SkThreadedBMPDeviceGravatar Yuqian Li2018-05-04
| | | | | | | | | | Bug: skia:7909 Change-Id: I3e480a57f16eec97706296137c8c1061555b9701 Reviewed-on: https://skia-review.googlesource.com/126100 Commit-Queue: Ben Wagner <bungeman@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com> Reviewed-by: Ben Wagner <bungeman@google.com> Auto-Submit: Yuqian Li <liyuqian@google.com>
* Revert "Fix a bug in SkGpuBlurUtils::GaussianBlur (take 2)"Gravatar Robert Phillips2018-05-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 72de74504f09f5de17af281b363fbc114ece3e73. Reason for revert: We are missing some tests - Chrome images look different Original change's description: > Fix a bug in SkGpuBlurUtils::GaussianBlur (take 2) > > This fixes the remaining imageblurclampmode bug and a preexisting un-reported error in the imageblurrepeatmode GM. > > This relies on https://chromium-review.googlesource.com/c/chromium/src/+/1044113 (Add a flag to disable a blur imagefilter bug fix in Skia) landing in Chrome first. > > Bug: skia:7765 > Change-Id: I568d18c17bb95c9e270e4cfd304c8dc134a48a70 > Reviewed-on: https://skia-review.googlesource.com/125961 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> TBR=egdaniel@google.com,robertphillips@google.com Change-Id: Ia56b3cf3009a95b7baaa9af62e97be390d0868fa No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7765 Reviewed-on: https://skia-review.googlesource.com/126160 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Remove unused SK_DISABLE_ARC_TO_LINE_TO_CHECK build flagGravatar Brian Salomon2018-05-04
| | | | | | | Change-Id: Ibcdb8c53a95a135a8686b3fe22df5a9d32e939c7 Reviewed-on: https://skia-review.googlesource.com/126060 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Don't use getDeviceClipBounds() to bound pic ops.Gravatar Mike Klein2018-05-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The values returned by SkCanvas::getDeviceClipBounds() are in the right space, but have extra constraints on them that are not desirable for bounding the logical bounds of draw operations: - they are integral - they are non-negative We've been intersecting the bounds of each operation with these bounds, which means we're mixing these bogus constraints into the bounds of each recorded operation. This percolates up to the SkPicutre cull rect too. The most egregious way to see the problem is to record a draw op entirely in negative space... it'll come back with empty logical bounds rather than its correct (negative-space) bounds. I've added a test for this, and another test I also think should be passing but left making it so as a follow up. I've had to disable a couple tests asserting clips affect the bounds. :/ A possible follow-up might go back to using the clips to tighten the bounds of the ops, just so long as we take the original user bounds and map them with the CTM through to device space ourselves, rather than relying on the recording canvas' clip stack. I think this means we'd need to maintain our own stack of device-space float SkRect clip bounds while calculating these op bounds. Bug: skia:7735 Change-Id: I6bf15f6b2a9ba4329a4eeae7f9d57aa8729ec1bb Reviewed-on: https://skia-review.googlesource.com/126002 Commit-Queue: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com>
* Remove android specific codeGravatar Herb Derby2018-05-04
| | | | | | | | Change-Id: Ib9b1f936d1aee920ba7064a9eccffaca6696812f Reviewed-on: https://skia-review.googlesource.com/125341 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com> Auto-Submit: Herb Derby <herb@google.com>
* Avoid drawing BW clipped color glyphs many times.Gravatar Ben Wagner2018-05-04
| | | | | | | | | | | | | | | | | Prior to this change if a color glyph is drawn through the raster device with an aliased clip the glyph is drawn once for each rectangular region in the aliased clip. In addition, even when the glyph was not a color glyph in this situation, the mask was checked for being a color glyph once for each rectangular region of the aliased clip. This change hoists the test for the color format out of the loop to ensure that the mask format is checked once and the mask is drawn once. This issue was discovered by rotating the coloremoji_blendmodes gm. Change-Id: I18b6b546356780e0b00948fff7b65783219f5c92 Reviewed-on: https://skia-review.googlesource.com/125868 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Fix a bug in SkGpuBlurUtils::GaussianBlur (take 2)Gravatar Robert Phillips2018-05-04
| | | | | | | | | | | | This fixes the remaining imageblurclampmode bug and a preexisting un-reported error in the imageblurrepeatmode GM. This relies on https://chromium-review.googlesource.com/c/chromium/src/+/1044113 (Add a flag to disable a blur imagefilter bug fix in Skia) landing in Chrome first. Bug: skia:7765 Change-Id: I568d18c17bb95c9e270e4cfd304c8dc134a48a70 Reviewed-on: https://skia-review.googlesource.com/125961 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Make the src rects of truths in SkLatticeIter be integral.Gravatar Brian Salomon2018-05-04
| | | | | | | | | | | | | | | This will make the non-bleed gpu implementation more sane as we will know that the input src rects are at integers and if offset by +/-0.5 we will be at pixel centers. No change in behavior, since src rects really were integral all along. Bug: b/77917978 Change-Id: I7193ff0b38de5d10debc24a0121e643573c47cda Reviewed-on: https://skia-review.googlesource.com/125740 Commit-Queue: Leon Scroggins <scroggo@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
* SkExecutor: use SkLeanWindows.hGravatar Hal Canary2018-05-04
| | | | | | | Change-Id: Ib7e55f8049478e81034563e40da808e5c2c6fa92 Reviewed-on: https://skia-review.googlesource.com/125869 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Remove fCacheKeys from SkImageFilter.Gravatar Ben Wagner2018-05-04
| | | | | | | | | | | No public API changes. Bug: skia:7666, skia:7887 Change-Id: I8ac4ec37dd3d0fcc050bc977db41439a8e18895f Reviewed-on: https://skia-review.googlesource.com/125500 Commit-Queue: Ben Wagner <benjaminwagner@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Auto-Submit: Ben Wagner <benjaminwagner@google.com>
* Use MaskFilter to create SDFs for text.Gravatar Jim Van Verth2018-05-04
| | | | | | | | | | Easy way to store SDFs in the glyph cache. Change-Id: Ia67e5c8619862bdee6aa3b293e30507d029e3bf1 Bug: skia: Reviewed-on: https://skia-review.googlesource.com/123748 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Revert "Fix a bug in SkGpuBlurUtils::GaussianBlur"Gravatar Brian Osman2018-05-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 5d156ad01f1562b3ee9fde096b57ad1b2cbff20c. Reason for revert: Chrome roll failing on cc unit tests Original change's description: > Fix a bug in SkGpuBlurUtils::GaussianBlur > > This fixes the remaining imageblurclampmode bug and a preexisting un-reported error in the imageblurrepeatmode GM. > > Bug: skia:7765 > Change-Id: Ib7e8d21ea67e6b2d7088d5e57bec34e159a36fd2 > Reviewed-on: https://skia-review.googlesource.com/125383 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> TBR=egdaniel@google.com,robertphillips@google.com Change-Id: I23a164a8f653ef32d7a19462eed0638d91c958e8 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7765 Reviewed-on: https://skia-review.googlesource.com/125840 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* remove support code for serialized bitmapsGravatar Mike Reed2018-05-03
| | | | | | | | | | This ended ~2 years ago, when we switch to only serializing SkImage Bug: skia: Change-Id: I38a0bec990a2cc743f86e5ec831019f6bfb588a6 Reviewed-on: https://skia-review.googlesource.com/125750 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Remove legacy guard flagsGravatar Yuqian Li2018-05-03
| | | | | | | | | Bug: skia: Change-Id: I3b526f2caec6766faea72cdc89550f50e17c71d2 Reviewed-on: https://skia-review.googlesource.com/125746 Reviewed-by: Cary Clark <caryclark@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Yuqian Li <liyuqian@google.com>
* check index for valid before subtractingGravatar Mike Reed2018-05-03
| | | | | | | | | | | In particular, we can't blinding say index - 1 if we don't know what index is (e.g. what if index is 0x80000000?) Bug: oss-fuzz:6119 Change-Id: I31e7964709f9017018a51e29c306dbc48dc88f7d Reviewed-on: https://skia-review.googlesource.com/125346 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Fix a bug in SkGpuBlurUtils::GaussianBlurGravatar Robert Phillips2018-05-03
| | | | | | | | | | This fixes the remaining imageblurclampmode bug and a preexisting un-reported error in the imageblurrepeatmode GM. Bug: skia:7765 Change-Id: Ib7e8d21ea67e6b2d7088d5e57bec34e159a36fd2 Reviewed-on: https://skia-review.googlesource.com/125383 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* saturate your addsGravatar Mike Reed2018-05-03
| | | | | | | | Bug: oss-fuzz:6149 Change-Id: Ia9a7b1e4a0d3dbbdcfb4469a8c50ffa512574fd1 Reviewed-on: https://skia-review.googlesource.com/125461 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add move to quiet warningGravatar Herb Derby2018-05-03
| | | | | | | | | | Change-Id: I8d3200d42430901fa493b87c1e7275106f3abd32 Reviewed-on: https://skia-review.googlesource.com/125742 Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@google.com> Auto-Submit: Herb Derby <herb@google.com>
* fonts: Cleanup header guard and stray printfs.Gravatar Khushal2018-05-03
| | | | | | | | | | R=herb@google.com Change-Id: I9d2865438f61f8e246f3a5e3548c0befbf402bc1 Reviewed-on: https://skia-review.googlesource.com/125643 Auto-Submit: Khusal Sagar <khushalsagar@chromium.org> Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Herb Derby <herb@google.com>
* Update SkRandomScalerContext to handle mask filters.Gravatar Ben Wagner2018-05-03
| | | | | | | | | | | | | | | | SkRandomScalarContext would apply all path and mask filters twice, once on the proxy and once to itself. This also changes the SkScalerContext mask generation in anticipation of removing the mask format overrides. This also changes the textblobrandomfont test to fix the line spacing and emoji handling. Change-Id: Ib2a633d49ccb801a1849dd982185f44c1d2ea85f Reviewed-on: https://skia-review.googlesource.com/124644 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
* Simplify textToGlyphsGravatar Herb Derby2018-05-02
| | | | | | | | | Change-Id: I9f2ae8e669ab3c22b66f9b10bd2650b5f5ab0bd4 Reviewed-on: https://skia-review.googlesource.com/125345 Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Herb Derby <herb@google.com> Auto-Submit: Herb Derby <herb@google.com>
* Switch to skcms_MakeUsableAsDestinationGravatar Brian Osman2018-05-02
| | | | | | | | | | | | | | This is more similar to old behavior - trying to make an xformer that converts to an A2B color space will fail. It is slightly more strict than previous code, though - XYZ profiles with table-based TRC curves that can't be fit by our regression code will now be rejected as xform destinations. I don't think that's a use-case that anyone is hitting right now? Change-Id: I22c7091794ea65135a4607c30d0d1a8accab879b Reviewed-on: https://skia-review.googlesource.com/125290 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* check for bad xIntervals before multiplyGravatar Mike Reed2018-05-02
| | | | | | | | Bug: oss-fuzz:6120 Change-Id: Icbd464352ad8ef1d35d274da049bc3424ccfa4d4 Reviewed-on: https://skia-review.googlesource.com/125420 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* fonts: Reland push font remoting.Gravatar Khushal2018-05-02
| | | | | | | | | | | | | | | | | | | This relands the following changes: 1) https://skia-review.googlesource.com/c/skia/+/120283 2) https://skia-review.googlesource.com/c/skia/+/125029 3) https://skia-review.googlesource.com/c/skia/+/125140 The original changes had to be reverted due to a memory leak in SkBaseDevice from SkTextBlobCacheDiffCanvas. This has been addressed by https://skia-review.googlesource.com/c/skia/+/125160 TBR=herb@google.com Bug: skia:7515, 831354 Change-Id: I73f4fcb1c397f31bf01553ff48c71ed2d6dd0770 Reviewed-on: https://skia-review.googlesource.com/125326 Commit-Queue: Khusal Sagar <khushalsagar@chromium.org> Reviewed-by: Khusal Sagar <khushalsagar@chromium.org>
* check for finite verticesGravatar Mike Reed2018-05-02
| | | | | | | | Bug: oss-fuzz:6115 Change-Id: Ib971304141322cfcf62ed079ef10c2910a9e2bf1 Reviewed-on: https://skia-review.googlesource.com/125343 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* use SkLeftShift in case the first arg is negativeGravatar Mike Reed2018-05-02
| | | | | | | | Bug: oss-fuzz:6117 Change-Id: I08521aaf4372a63428a1f663f4da78e72dfdf225 Reviewed-on: https://skia-review.googlesource.com/125344 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Mike Reed <reed@google.com>
* check for 0x8000 before calling absGravatar Mike Reed2018-05-02
| | | | | | | | Bug: oss-fuzz:6124 Change-Id: I1897a4ce8f6e60bf93b9e6579725443763e8d287 Reviewed-on: https://skia-review.googlesource.com/125342 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Add the filter rec bypass to make canonical strike descriptorsGravatar Herb Derby2018-05-02
| | | | | | | | | | | | SkDescriptors used describe strikes need to have a standard form to pass them between on process and another. This change allows a canonical form. Change-Id: I451c74e4073b4e5d6de02f88cbd2ed5eb51cdad9 Reviewed-on: https://skia-review.googlesource.com/125340 Auto-Submit: Herb Derby <herb@google.com> Commit-Queue: Khusal Sagar <khushalsagar@chromium.org> Reviewed-by: Khusal Sagar <khushalsagar@chromium.org>
* Modify SkGpuBlurUtils::GaussianBlur's reexpand method and allow more approx ↵Gravatar Robert Phillips2018-05-02
| | | | | | | | | | | fit intermediates This CL didn't cause and gm or skp image diffs locally but, since the backing fit is being changed in some cases, it is likely to do so on some bot. Change-Id: I13decf44fb12e457951381bcc9c2c15103553a43 Reviewed-on: https://skia-review.googlesource.com/125225 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Reland "Remove devKerning"Gravatar Herb Derby2018-05-02
| | | | | | | | | | | | | | | | | | | | | | This is a reland of c86c5c0144b85d0bc8ec791f9609ee2d4e7d835a Original change's description: > Remove devKerning > > Dev kerning is not supported by any scalers. This is > mostly removed. The remaining fields fRsbDelta and > fLsbDelta are kept to keep Android compiling. > > Change-Id: If1a9ee9bb599d4e1bdf4b3751ac0c65246350809 > Reviewed-on: https://skia-review.googlesource.com/124921 > Reviewed-by: Ben Wagner <bungeman@google.com> > Commit-Queue: Herb Derby <herb@google.com> Change-Id: Ibf5fac5f1442c7e62392d5146ad460da27b10d5c Reviewed-on: https://skia-review.googlesource.com/125300 Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Take sk_sp<SkDevice> instead of SkDevice*Gravatar Herb Derby2018-05-02
| | | | | | | | | Change-Id: I0b296bf5b80adc19758a3dc99160be9d2ed05680 Reviewed-on: https://skia-review.googlesource.com/125160 Commit-Queue: Herb Derby <herb@google.com> Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com> Auto-Submit: Herb Derby <herb@google.com>
* Revert "fonts: Set up remote glyph caching to push fonts."Gravatar Mike Klein2018-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 101d56359a5a5dc3b8a2a4149ac171e25eb0bec0. Reason for revert: 5 of 5 Original change's description: > fonts: Set up remote glyph caching to push fonts. > > Currently the SkStrikeClient is designed to pull fonts from the server > on demand, and to pre-fetch a batched request by analyzing the ops using > a SkTextBlobCacheDiffCanvas. This change modifies the design to support > a push based model, where the server pushes fonts required by the client > and sets up the requisite SkGlyphCaches on the client prior to > rasterizing the ops. > > This model still relies on the SkTextBlobCacheDiffCanvas for analyzing > the glyphs required for rasterizing an op. The glyph caches required for > raster are locked and missing glyphs to be sent to the client are tracked > by the SkStrikeServer. The embedder can serialize this font data at any > point, but must ensure that this data is deserialized by the > SkStrikeClient at the remote end, before rasterizing any ops analyzed > prior to serialization. Any refs on the caches are released once the > font data is serialized by the server. > > The locking of glyph caches relies on the embedder providing discardable > handles. These handles can be created on the server and serialized to be > sent to the client, and map to an instance of SkGlyphCache. This allows > the server to control the lifetime of the caches on the client. > > Bug: skia:7515 > Change-Id: Id39f346b47b60899778404bbd0429ee811d0e53b > Reviewed-on: https://skia-review.googlesource.com/120283 > Commit-Queue: Khusal Sagar <khushalsagar@chromium.org> > Reviewed-by: Herb Derby <herb@google.com> TBR=mtklein@google.com,herb@google.com,khushalsagar@chromium.org Change-Id: If72caf968ddcbf70b8b9d71782a2339a118ed202 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7515 Reviewed-on: https://skia-review.googlesource.com/125264 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>