aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkDraw.cpp
Commit message (Collapse)AuthorAge
* Move path leaf loop to drawerGravatar Herb Derby2018-07-31
| | | | | | | | | | | This CL makes GPU and Raster use the same path drawing interface. When I get the main body of regenerate over into the glyph run system, I I can refactor a lot of annoyingly similar code away. Change-Id: I6bd2e6119570062695d6943565749d85555b03fa Reviewed-on: https://skia-review.googlesource.com/144350 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Move one leaf loop from GPU to glyph drawerGravatar Herb Derby2018-07-31
| | | | | | | | | | | | Encapsulate the bitmap inner loop of regenerate in the SkGlyphRunListDrawer. This changed required placing an SkGlyphRunListDrawer in the two TextTargets. Change-Id: I7ef7a2d0074fe898fce4da82d26ea1f47e1f7a98 Reviewed-on: https://skia-review.googlesource.com/144302 Reviewed-by: Jim Van Verth <jvanverth@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Herb Derby <herb@google.com>
* const all the thingsGravatar Herb Derby2018-07-27
| | | | | | | | | | | Having the glyph run list be const as it passes through the stack means that future change can't be introduced in the device code that changes behavior. Try to force all text changes into the SkGylphRun system. Change-Id: I9412bc094c7adb8554887c725a6264af306e1d42 Reviewed-on: https://skia-review.googlesource.com/143702 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* Centralize bitmap glyph positioningGravatar Herb Derby2018-07-26
| | | | | | | | | | | | | | | Centralize all text drawing for bitmap devices into SkGlyphRunListDrawer. All drawing decisions are encapsulated in this class, and its behavior only depends on contant properties of the device. The method drawForBitmap will probably have to be converted to a template based in preliminary performance numbers. Change-Id: Id21567c1511eee9d2e9e20c7ae93544530cfdb81 Reviewed-on: https://skia-review.googlesource.com/143106 Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>
* remove SkThreadedBMPDevice and friendsGravatar Mike Klein2018-07-25
| | | | | | | | | | | It is unused, is becoming a maintainence burden and source of bugs, and takes up a lot of time on the *SAN bots. Change-Id: If383eb6e4838ca23140f9e16d518b1bfc655fa12 Reviewed-on: https://skia-review.googlesource.com/143307 Auto-Submit: Mike Klein <mtklein@google.com> Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Herb Derby <herb@google.com>
* SkUtils: remove some versions of UTF routines.Gravatar Hal Canary2018-07-25
| | | | | | | Change-Id: Ib1f776ae472117c23d2145253adf25fceb412b32 Reviewed-on: https://skia-review.googlesource.com/143111 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Clean up bitmap pathGravatar Herb Derby2018-07-24
| | | | | | | Change-Id: If149194fd86f14bea289ad68262ea99cbbc398b6 Reviewed-on: https://skia-review.googlesource.com/142817 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Replace isGammaCorrect with isLinearlyBlendedGravatar Brian Osman2018-07-03
| | | | | | | | | | | | | | | | | | | | We were using isGammaCorrect (presence of a color space) to trigger rendering effects that should only apply when doing linear blending. Rename and redefine that function to fix many of those issues. In a few places, we really do care about the color space. The big win here is text rendering, which is now the same on legacy gl and glsrgb configs. Also left some comments about our desire to do something smarter for text in the future. Bug: skia: Change-Id: I94106e95f5f81aaa0a28dbaccd65f5d94cf0de67 Reviewed-on: https://skia-review.googlesource.com/139109 Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: Brian Osman <brianosman@google.com> Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Stop using SkTSwap.Gravatar Ben Wagner2018-06-19
| | | | | | | | | | | | | Use std::swap instead. It does not appear that any external user specializes SkTSwap, but some may still use it. This removes all use in Skia so that SkTSwap can later be removed in a smaller CL. After that the <utility> include can be removed from SkTypes.h. Change-Id: If03d4ee07dbecda961aa9f0dc34d171ef5168753 Reviewed-on: https://skia-review.googlesource.com/135578 Reviewed-by: Hal Canary <halcanary@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Remove unused drawText codeGravatar Herb Derby2018-06-19
| | | | | | | Change-Id: I3fc236be67b6a3d822d5508de1daa411d00fd5a4 Reviewed-on: https://skia-review.googlesource.com/135574 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Herb Derby <herb@google.com>
* remove SkTCastGravatar Mike Klein2018-06-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | SkTCast is functionally equivalent to reinterpret_cast. The comment about SkTCast helping to avoid strict alising issues is not true. Dereferencing a pointer cast to a pointer of an unrelated type is always undefined, even if smuggled through a union like in SkTCast. To really avoid aliasing issues, you need to make a union[1] of the two value types, or better, memcpy between values. I've had to fix MatrixText.cpp where switching to reinterpret_cast actually let Clang notice and warn that we're exploiting undefined behavior, and GrSwizzle.h and SkCamera.cpp caught by GCC. I've switched SkTLList over to use SkAlignedSTStorage, which seems to help convince some GCC versions that fObj is used in a sound way. [1] The union punning trick is non-standard in C++, but GCC and MSVC both explicitly support it. I believe Clang does not officially explicitly support it, but probably does quietly for GCC compatibility. Change-Id: I71822e82c962f9aaac8be24d3c0f39f4f8b05026 Reviewed-on: https://skia-review.googlesource.com/134947 Commit-Queue: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Salomon <bsalomon@google.com> Auto-Submit: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Work around signed-unsigned comparison warning.Gravatar Ben Wagner2018-06-15
| | | | | | | Change-Id: I35d2c3430dbf071dcbbb73e408115d9204e5908b Reviewed-on: https://skia-review.googlesource.com/135327 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* Revert "Revert "SkTypes: extract SkTo""Gravatar Hal Canary2018-06-14
| | | | | | | | | | | | | | | | This reverts commit fdcfb8b7c23fbf18f872d2c31d27978235033876. > Original change's description: > > SkTypes: extract SkTo > > > > Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 > > Reviewed-on: https://skia-review.googlesource.com/133620 > > Reviewed-by: Mike Klein <mtklein@google.com> Change-Id: Ida74fbc5c21248a724a5edbf9fae18a33bcb23aa Reviewed-on: https://skia-review.googlesource.com/134506 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Revert "SkTypes: extract SkTo"Gravatar Hal Canary2018-06-13
| | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2a2f67592602b18527bc3fd449132d420cd5b62e. Reason for revert: this appears to be what is holding up the Chrome roll. Original change's description: > SkTypes: extract SkTo > > Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 > Reviewed-on: https://skia-review.googlesource.com/133620 > Reviewed-by: Mike Klein <mtklein@google.com> TBR=mtklein@google.com,halcanary@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: Iafd738aedfb679a23c061a51afe4b98a8d4cdfae Reviewed-on: https://skia-review.googlesource.com/134504 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* SkTypes: more into SkMacrosGravatar Hal Canary2018-06-12
| | | | | | | | Change-Id: I4c9a2d81a1bc4ccebc78eea56c0de116b98d415e Reviewed-on: https://skia-review.googlesource.com/134330 Commit-Queue: Hal Canary <halcanary@google.com> Auto-Submit: Hal Canary <halcanary@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* SkTypes: extract SkToGravatar Hal Canary2018-06-12
| | | | | | Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 Reviewed-on: https://skia-review.googlesource.com/133620 Reviewed-by: Mike Klein <mtklein@google.com>
* Reland "Have draw(Text|PosText|PosTextH) use a single entry on the device"Gravatar Herb Derby2018-06-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 74b390d6b136a60f1df15ac5ecd19bd8ad5a394b. Reason for revert: reverting to add patch for valgrind Original change's description: > Revert "Have draw(Text|PosText|PosTextH) use a single entry on the device" > > This reverts commit 4225b3220ef4bf50f0d9403f812ea94d50c4ee59. > > Reason for revert: made valgrind unhappy. > > Original change's description: > > Have draw(Text|PosText|PosTextH) use a single entry on the device > > > > Handle the positioning of drawText at the canvas layer. Simplify > > the code by removing similar implementations. > > > > Change-Id: I8b711783435072f560e29fca1dd934fa2e345ed2 > > Reviewed-on: https://skia-review.googlesource.com/127131 > > Reviewed-by: Ben Wagner <bungeman@google.com> > > Commit-Queue: Herb Derby <herb@google.com> > > TBR=jvanverth@google.com,bungeman@google.com,herb@google.com > > Change-Id: I65c9d30ae6ecb1f87e8660e56d8f8ce5daab7551 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/132403 > Reviewed-by: Hal Canary <halcanary@google.com> > Commit-Queue: Hal Canary <halcanary@google.com> TBR=jvanverth@google.com,halcanary@google.com,bungeman@google.com,herb@google.com Change-Id: I9bbb73aac447b51eb8215ac42331759fa4c9fa45 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/132580 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Revert "Have draw(Text|PosText|PosTextH) use a single entry on the device"Gravatar Hal Canary2018-06-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 4225b3220ef4bf50f0d9403f812ea94d50c4ee59. Reason for revert: made valgrind unhappy. Original change's description: > Have draw(Text|PosText|PosTextH) use a single entry on the device > > Handle the positioning of drawText at the canvas layer. Simplify > the code by removing similar implementations. > > Change-Id: I8b711783435072f560e29fca1dd934fa2e345ed2 > Reviewed-on: https://skia-review.googlesource.com/127131 > Reviewed-by: Ben Wagner <bungeman@google.com> > Commit-Queue: Herb Derby <herb@google.com> TBR=jvanverth@google.com,bungeman@google.com,herb@google.com Change-Id: I65c9d30ae6ecb1f87e8660e56d8f8ce5daab7551 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/132403 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Have draw(Text|PosText|PosTextH) use a single entry on the deviceGravatar Herb Derby2018-06-05
| | | | | | | | | | Handle the positioning of drawText at the canvas layer. Simplify the code by removing similar implementations. Change-Id: I8b711783435072f560e29fca1dd934fa2e345ed2 Reviewed-on: https://skia-review.googlesource.com/127131 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Herb Derby <herb@google.com>
* drawPosText no longer obeys paint alignmentGravatar Herb Derby2018-05-21
| | | | | | | Change-Id: Iac498b54dea4aa1b203d2b9c58e15bb5f2147f82 Reviewed-on: https://skia-review.googlesource.com/129462 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* check for too-big rects, as we do for pathsGravatar Mike Reed2018-05-16
| | | | | | | | Bug: oss-fuzz:8334 Change-Id: Ibeeb8adfbfa543406da4b42aa742a6290bd65509 Reviewed-on: https://skia-review.googlesource.com/128541 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Revert "reject large paths to avoid potential float overflows""Gravatar Mike Reed2018-05-11
| | | | | | | | | | | | | This reverts commit b8f0709aac43cfdefdbf3a307f8c2ecfc0c55d27. Attempted fix: update the iData before we return. Bug: oss-fuzz:8131 Change-Id: If60b8b45df4dcb1deecc18f58cb09644aaa3231d Reviewed-on: https://skia-review.googlesource.com/127501 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "reject large paths to avoid potential float overflows"Gravatar Mike Reed2018-05-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit b35002d323134e2a441ce2f912a305cd9b3bd321. Reason for revert: crashing in threadedraster, may need to clean up the initonce payload if I early exit Original change's description: > reject large paths to avoid potential float overflows > > I think this change can catch a host of potential fuzzer issues up-front, > rather than adding finite tests in lots and lots of places down-stream. > > Bug: oss-fuzz:8131 > Change-Id: I421aa72c6ca3df57b40dd32b805d6c847d8e8d29 > Reviewed-on: https://skia-review.googlesource.com/127388 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Reed <reed@google.com> TBR=mtklein@google.com,jvanverth@google.com,bsalomon@google.com,caryclark@google.com,csmartdalton@google.com,fmalita@chromium.org,liyuqian@google.com,reed@google.com Change-Id: I12ff8664113ba5a36ee91cbe2000d7d445d4bc7e No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: oss-fuzz:8131 Reviewed-on: https://skia-review.googlesource.com/127580 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* reject large paths to avoid potential float overflowsGravatar Mike Reed2018-05-11
| | | | | | | | | | | I think this change can catch a host of potential fuzzer issues up-front, rather than adding finite tests in lots and lots of places down-stream. Bug: oss-fuzz:8131 Change-Id: I421aa72c6ca3df57b40dd32b805d6c847d8e8d29 Reviewed-on: https://skia-review.googlesource.com/127388 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@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>
* 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>
* 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>
* 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>
* Revert "Remove devKerning"Gravatar Mike Klein2018-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c86c5c0144b85d0bc8ec791f9609ee2d4e7d835a. Reason for revert: 4 of 5 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> TBR=bungeman@google.com,herb@google.com,reed@google.com Change-Id: If865f702868192a1b72cd811baa996dd1282bbce No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/125263 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Remove devKerningGravatar Herb Derby2018-05-01
| | | | | | | | | | | 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>
* Reland "Reland "Reland "Exercise the threaded backend in test bots"""Gravatar Yuqian Li2018-04-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 47f2b7b089c688503b12caff9c8a84fb185d01c5. Reason for revert: try to fix the issue by reducing the set of bots Original change's description: > Revert "Reland "Reland "Exercise the threaded backend in test bots""" > > This reverts commit 7ddad479e464a3d481d106415c9c1b8cc8496848. > > Reason for revert: bots failure > > Original change's description: > > Reland "Reland "Exercise the threaded backend in test bots"" > > > > This reverts commit 0f5972604ce4439fd33118d6be1e4f24fe6c267f. > > > > Reason for revert: ASAN/MSAN should have been fixed > > > > Original change's description: > > > Revert "Reland "Exercise the threaded backend in test bots"" > > > > > > This reverts commit 654ca8a340700ca8089abb7828adc2c229c6241e. > > > > > > Reason for revert: ASAN,MSAN failures > > > > > > Original change's description: > > > > Reland "Exercise the threaded backend in test bots" > > > > > > > > This reverts commit ea51393ba918f75c1b40d521081789eeb3b42d6f. > > > > > > > > Reason for revert: try again after many fixes of the threaded backend > > > > > > > > Original change's description: > > > > > Revert "Exercise the threaded backend in test bots" > > > > > > > > > > This reverts commit a39991ebd70f4aaf1290dd516467d729811e45ee. > > > > > > > > > > Reason for revert: Random bots timeout > > > > > > > > > > Original change's description: > > > > > > Exercise the threaded backend in test bots > > > > > > > > > > > > We can't draw everything correctly now, but it's at least not crashing. > > > > > > > > > > > > The draw_to_canvas is modified by adding flush because now the raster > > > > > > canvas also needs flush like GPU canvases because of the threaded > > > > > > backend. (Previously, AndroidCodecSrc vetoed GPU (non-raster) sink > > > > > > and that's why it was not crashing.) > > > > > > > > > > > > > > > > > > Bug: skia: > > > > > > Change-Id: I222d706c33e15326e1b97d6bef6c46b8c35cebfd > > > > > > Reviewed-on: https://skia-review.googlesource.com/118886 > > > > > > Reviewed-by: Kevin Lubick <kjlubick@google.com> > > > > > > Commit-Queue: Yuqian Li <liyuqian@google.com> > > > > > > > > > > TBR=kjlubick@google.com,stephana@google.com,liyuqian@google.com > > > > > > > > > > Change-Id: Ib1089d937b6e25cc39d90ad4de35b3a4c406f6b1 > > > > > No-Presubmit: true > > > > > No-Tree-Checks: true > > > > > No-Try: true > > > > > Bug: skia: > > > > > Reviewed-on: https://skia-review.googlesource.com/119100 > > > > > Reviewed-by: Yuqian Li <liyuqian@google.com> > > > > > Commit-Queue: Yuqian Li <liyuqian@google.com> > > > > > > > > TBR=kjlubick@google.com,stephana@google.com,liyuqian@google.com > > > > > > > > # Not skipping CQ checks because original CL landed > 1 day ago. > > > > > > > > Bug: skia:7838 > > > > Change-Id: I1405212204bf694b2f31dfc38154759e1d3e363f > > > > Reviewed-on: https://skia-review.googlesource.com/121680 > > > > Commit-Queue: Yuqian Li <liyuqian@google.com> > > > > Reviewed-by: Yuqian Li <liyuqian@google.com> > > > > > > TBR=kjlubick@google.com,stephana@google.com,liyuqian@google.com > > > > > > Change-Id: Id1b273e22a1d0cbc15a2155252909f576b401fa4 > > > No-Presubmit: true > > > No-Tree-Checks: true > > > No-Try: true > > > Bug: skia:7838 > > > Reviewed-on: https://skia-review.googlesource.com/123360 > > > Reviewed-by: Mike Klein <mtklein@google.com> > > > Commit-Queue: Mike Klein <mtklein@google.com> > > > > TBR=mtklein@google.com,kjlubick@google.com,stephana@google.com,liyuqian@google.com > > > > # Not skipping CQ checks because original CL landed > 1 day ago. > > > > Bug: skia:7838 > > Change-Id: I205d579f2959ea726b447993314c1326b731730e > > Reviewed-on: https://skia-review.googlesource.com/123660 > > Commit-Queue: Yuqian Li <liyuqian@google.com> > > Reviewed-by: Yuqian Li <liyuqian@google.com> > > TBR=mtklein@google.com,kjlubick@google.com,stephana@google.com,liyuqian@google.com > > Change-Id: I1d3986cc2af12836dd7acbcbba713081a88301a6 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia:7838 > Reviewed-on: https://skia-review.googlesource.com/124200 > Reviewed-by: Yuqian Li <liyuqian@google.com> > Commit-Queue: Yuqian Li <liyuqian@google.com> TBR=mtklein@google.com,kjlubick@google.com,stephana@google.com,liyuqian@google.com Change-Id: I2d4d0c172849a86b37c60b32938a7a2b828258fa No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7838 Reviewed-on: https://skia-review.googlesource.com/124201 Commit-Queue: Yuqian Li <liyuqian@google.com> Reviewed-by: Yuqian Li <liyuqian@google.com>
* Experiment to track coverage in a layerGravatar Mike Reed2018-04-25
| | | | | | | | Bug: skia: Change-Id: I5ed334f63e64991944394dc8103092a2c6280546 Reviewed-on: https://skia-review.googlesource.com/122000 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Move strike cache Find*() to strike cacheGravatar Herb Derby2018-04-18
| | | | | | | | | BUG=skia:7515 Change-Id: Ic1580d4752d51a62df5427a28f843bc7b3181797 Reviewed-on: https://skia-review.googlesource.com/122020 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* SkBlitter is not thread safe; make one for each thread.Gravatar Yuqian Li2018-04-16
| | | | | | | | | | | | | | | Otherwise, GM fancy_gradients would be drawn incorrectly and TSAN will issue alerts as SkARGB32_Shader_Blitter has its own memory that may be written during blitting. As we make one blitter for each thread, we also don't need to send in a thread-alloc for blitCoverageDeltas Bug: skia: Change-Id: Ie4ee0886b88c797ab57c65674b0b7527501b164f Reviewed-on: https://skia-review.googlesource.com/120641 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Reland "Add private fIsBadForDAA bit to SkPath"Gravatar Yuqian Li2018-04-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ed5e069dbb0b2ef49e22b9d17af3875e3682cd61. Reason for revert: add the guard flag Original change's description: > Revert "Add private fIsBadForDAA bit to SkPath" > > This reverts commit 54aefc74103a5c1810a7cc074746915c78ab3132. > > Reason for revert: Forget the guard flag. Pixel tests would fail. > > Original change's description: > > Add private fIsBadForDAA bit to SkPath > > > > Bug: chromium:821353 > > Change-Id: Ic6585e76df692bb1853d0990d75f0e8d1dee22f4 > > Reviewed-on: https://skia-review.googlesource.com/120201 > > Commit-Queue: Yuqian Li <liyuqian@google.com> > > Reviewed-by: Mike Reed <reed@google.com> > > TBR=caryclark@google.com,liyuqian@google.com,reed@google.com > > Change-Id: I2fe7cfcc3a80a51415f72d656da95a894a3240a4 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: chromium:821353 > Reviewed-on: https://skia-review.googlesource.com/120505 > Reviewed-by: Yuqian Li <liyuqian@google.com> > Commit-Queue: Yuqian Li <liyuqian@google.com> TBR=caryclark@google.com,liyuqian@google.com,reed@google.com Change-Id: Iebf7caf9ca74f305dec25b1b6512e93cb41cc8ec No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:821353 Reviewed-on: https://skia-review.googlesource.com/120620 Commit-Queue: Yuqian Li <liyuqian@google.com> Reviewed-by: Yuqian Li <liyuqian@google.com>
* Remove obsolete commentGravatar Yuqian Li2018-04-12
| | | | | | | | | Bug: skia: Change-Id: I4a290e643275c4e41e7f42496ffc14a9a1abca82 TBR: reed@google.com, mtklein@google.com, herb@google.com Reviewed-on: https://skia-review.googlesource.com/120560 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Revert "Add private fIsBadForDAA bit to SkPath"Gravatar Yuqian Li2018-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 54aefc74103a5c1810a7cc074746915c78ab3132. Reason for revert: Forget the guard flag. Pixel tests would fail. Original change's description: > Add private fIsBadForDAA bit to SkPath > > Bug: chromium:821353 > Change-Id: Ic6585e76df692bb1853d0990d75f0e8d1dee22f4 > Reviewed-on: https://skia-review.googlesource.com/120201 > Commit-Queue: Yuqian Li <liyuqian@google.com> > Reviewed-by: Mike Reed <reed@google.com> TBR=caryclark@google.com,liyuqian@google.com,reed@google.com Change-Id: I2fe7cfcc3a80a51415f72d656da95a894a3240a4 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:821353 Reviewed-on: https://skia-review.googlesource.com/120505 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Add private fIsBadForDAA bit to SkPathGravatar Yuqian Li2018-04-11
| | | | | | | | Bug: chromium:821353 Change-Id: Ic6585e76df692bb1853d0990d75f0e8d1dee22f4 Reviewed-on: https://skia-review.googlesource.com/120201 Commit-Queue: Yuqian Li <liyuqian@google.com> Reviewed-by: Mike Reed <reed@google.com>
* detect non-finite ptsGravatar Mike Reed2018-03-15
| | | | | | | | Bug: oss-fuzz:6638 Change-Id: I72dab6783099facbe8d658ec1bc4b175a383e174 Reviewed-on: https://skia-review.googlesource.com/114565 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* SkAutoGlyphCache change some sites to Find*.Gravatar Herb Derby2018-03-15
| | | | | | | Change-Id: Iec3a0c60106017394fcdd981052713b6e42fa595 Reviewed-on: https://skia-review.googlesource.com/114506 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* Revert "Revert "add tiler for SkDraw""Gravatar Mike Reed2018-03-07
| | | | | | | | | | | | This reverts commit 461ef7af88cc966007c464130a971ec86c803f1d. Prev CL to SkScan_Hairline.cpp fixed the bug that caused the earlier revert. Bug: skia: Change-Id: Ifd9a364c7546175be292f726e19465b72196b45e Reviewed-on: https://skia-review.googlesource.com/112723 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "add tiler for SkDraw"Gravatar Florin Malita2018-03-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit be1b3971806e3d80aa9673a36e2b35d0145198ac. Reason for revert: Unexpected layout test diffs: https://test-results.appspot.com/data/layout_results/linux_trusty_blink_rel/24989/layout-test-results/results.html Original change's description: > add tiler for SkDraw > > Bug: skia:2122 > Change-Id: I276de2064939151eef5fa14c53188e8b5728b7c9 > Reviewed-on: https://skia-review.googlesource.com/110840 > Commit-Queue: Mike Reed <reed@google.com> > Reviewed-by: Yuqian Li <liyuqian@google.com> TBR=liyuqian@google.com,reed@google.com Change-Id: Ia598c0d7c4ac6cfcdb905b847040c250fa366402 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:2122 Reviewed-on: https://skia-review.googlesource.com/112740 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* add tiler for SkDrawGravatar Mike Reed2018-03-06
| | | | | | | | Bug: skia:2122 Change-Id: I276de2064939151eef5fa14c53188e8b5728b7c9 Reviewed-on: https://skia-review.googlesource.com/110840 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Yuqian Li <liyuqian@google.com>
* keep points as floats until after clippingGravatar Mike Reed2018-02-27
| | | | | | | | Bug: oss-fuzz:6539 Change-Id: Ia91dee2a023c9b17d06948c455b8ea6a1b213e0d Reviewed-on: https://skia-review.googlesource.com/110501 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Set empty drawFn when init-once returns earlyGravatar Yuqian Li2018-02-25
| | | | | | | | Bug: skia: Change-Id: I01def2c2c9651585555740e5ab86f8eac38be6fc Reviewed-on: https://skia-review.googlesource.com/109721 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Enable DAA in the init-once phase of threaded backendsGravatar Yuqian Li2018-02-21
| | | | | | | | Bug: skia: Change-Id: Idb856fe12f0f9fa1014e7d15ef40bd7b456634d6 Reviewed-on: https://skia-review.googlesource.com/107540 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Add init-once to threaded backendGravatar Yuqian Li2018-02-12
| | | | | | | | | | | | For the simplicity of this CL, I haven't enabled DAA for init-once yet. The current init-once is only enabled for draw path, and it simply generates the dev path in the init-once phase. Bug: skia: Change-Id: Ie9a9ef9fc453acbdeb48b06b93d578c626961e3f Reviewed-on: https://skia-review.googlesource.com/87784 Commit-Queue: Yuqian Li <liyuqian@google.com> Reviewed-by: Herb Derby <herb@google.com>
* Can't correctly call computeFastBounds on maskfilter w/ device geoGravatar Mike Reed2018-02-06
| | | | | | | | | | | | | maskfilter's computeFastBounds assumes the passed-in geometry bounds is in src space, but in drawDevPath the bounds is in device space, so this call can return meaningless answers. Skip this whole block of code, since filterPath itself performs culling. Bug: skia: Change-Id: Ia668d8b692ce77332fa16908e9b0cf774c189e11 Reviewed-on: https://skia-review.googlesource.com/104520 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* move the guts of SkMaskFilter.h into SkMaskFilterBase.hGravatar Mike Reed2018-01-23
| | | | | | | | | Bug: skia: Change-Id: I29ad0960156562867429542d3cfbf3d639529cab Reviewed-on: https://skia-review.googlesource.com/98802 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Clean up SkScalerContext descriptor creationGravatar Herb Derby2018-01-23
| | | | | | | | | | | | | | | | Allow a descriptor creation using just a rec and effects. This is the most complex part of the change. Cleanup SkScalerContextFlags to be a real thing. This has spread everywhere. BUG=skia:7515 Change-Id: I67189c9aeb51f1777a1c60145216524d440cb890 Reviewed-on: https://skia-review.googlesource.com/98320 Commit-Queue: Herb Derby <herb@google.com> Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com>