aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
Commit message (Collapse)AuthorAge
* Revert "Add color fonts."Gravatar Ben Wagner2018-03-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d3b933f3e03d5c22e9e7c56d2110469e41509720. Reason for revert: we're not mirroring experimental/ everywhere. Original change's description: > Add color fonts. > > BUG=skia:7624 > > Change-Id: I1d0974282adce2fd7b13a003309e63593b6e1a9c > Reviewed-on: https://skia-review.googlesource.com/109521 > Commit-Queue: Ben Wagner <bungeman@google.com> > Reviewed-by: Mike Klein <mtklein@google.com> > Reviewed-by: Herb Derby <herb@google.com> > Reviewed-on: https://skia-review.googlesource.com/116541 TBR=mtklein@google.com,bungeman@google.com,herb@google.com Change-Id: Ic2d763244cbce663a23eb53321ac45201c466501 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7624 Reviewed-on: https://skia-review.googlesource.com/116680 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Add color fonts.Gravatar Ben Wagner2018-03-27
| | | | | | | | | | | BUG=skia:7624 Change-Id: I1d0974282adce2fd7b13a003309e63593b6e1a9c Reviewed-on: https://skia-review.googlesource.com/109521 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Herb Derby <herb@google.com> Reviewed-on: https://skia-review.googlesource.com/116541
* cache SkMatrix44 type in makeColorSpin()Gravatar Mike Klein2018-03-27
| | | | | | | | | | | This helps prevent races on getType() later, e.g. https://luci-milo.appspot.com/swarming/task/3c80715df637a810/steps/symbolized_dm/0/stdout Change-Id: I3dbc9f6bf2fddff9ca416b0001bfd5da123e6b25 Reviewed-on: https://skia-review.googlesource.com/116466 Commit-Queue: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* ccpr: Various cleanupsGravatar Chris Dalton2018-03-27
| | | | | | | | | | | | | Renames GrCCCoverageProcessor::RenderPass to PrimitiveType and handles corners as subpasses instead. Various touchups to coverage processors now that the overhaul is complete. This change should be strictly a refactor. Bug: skia: Change-Id: I52852463330d5ec71fae7e19fadccd9ede8b2c16 Reviewed-on: https://skia-review.googlesource.com/116169 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Pin color type when a cross-context image is constructedGravatar Brian Osman2018-03-27
| | | | | | | | | | Fixes issues with gray images that may be incorrectly re-interpreted as alpha when re-wrapped. (https://github.com/flutter/flutter/issues/15600) Change-Id: I4a78466073e14d212108d168eed0b2df1bc92ffe Reviewed-on: https://skia-review.googlesource.com/116484 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Fix TSAN race in SkPaintToGrPaintNoShaderGravatar Robert Phillips2018-03-27
| | | | | | | Change-Id: Id906e139db80e0c3b426a0e2318e77477989cf8d Reviewed-on: https://skia-review.googlesource.com/116545 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Add SkColorSpaceXform_skcmsGravatar Brian Osman2018-03-27
| | | | | | | | | | | Currently only enabled in Skia dev builds. Has some diffs in GMs and images, but (hopefully) nothing major. Bug: skia: Change-Id: Ifdf5d2804e59f555a3dc84f657e438dd589a2751 Reviewed-on: https://skia-review.googlesource.com/116520 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Reland "Use DAA for small cubics and non-convex paths that fit into a mask"Gravatar Yuqian Li2018-03-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 107d53971dab5245e88885f095aef52fd52942d3. Reason for revert: Ready to rebaseline Original change's description: > Revert "Use DAA for small cubics and non-convex paths that fit into a mask" > > This reverts commit 1875e053845c4d377a0f64f7233bdb9dc00bdce1. > > Reason for revert: > > I don't think there's anything wrong with this, but it looks like Yuqian is out today and there is a large number of GM, SKP, and SVG images to triage from this. This is just a triage-by-revert... should be fine to reland when you're ready to triage. > > Original change's description: > > Use DAA for small cubics and non-convex paths that fit into a mask > > > > I forgot to benchmark svgs and it turns out that DAA is specifically > > good for the small cubics and small non-convex paths in svgs. This > > should make our svg performance fast again: > > > > 2.84% faster in svgparse_Florida-StateSeal.svg_1 > > 2.90% faster in svgparse_NewYork-StateSeal.svg_1 > > 2.95% faster in svgparse_Seal_of_Texas.svg_1 > > 3.05% faster in car.svg_1 > > 3.53% faster in svgparse_Vermont_state_seal.svg_1 > > 3.68% faster in svgparse_Wyoming-StateSeal.svg_1 > > 4.88% faster in svgparse_Minnesota-StateSeal.svg_1 > > 5.22% faster in svgparse_NewMexico-StateSeal.svg_1 > > 6.49% faster in svgparse_fsm.svg_1 > > > > > > Bug: skia: > > Change-Id: Ia149944443d72c12c3dda178cb5ebc89d6d0bf18 > > Reviewed-on: https://skia-review.googlesource.com/116185 > > Reviewed-by: Cary Clark <caryclark@google.com> > > Commit-Queue: Yuqian Li <liyuqian@google.com> > > TBR=caryclark@google.com,liyuqian@google.com,reed@google.com,caryclark@skia.org > > # Not skipping CQ checks because original CL landed > 1 day ago. > > Bug: skia: > Change-Id: I232f34dcea1cdabef768879a261fe6796f3e4a79 > Reviewed-on: https://skia-review.googlesource.com/116400 > Reviewed-by: Mike Klein <mtklein@google.com> > Commit-Queue: Mike Klein <mtklein@google.com> TBR=mtklein@google.com,caryclark@google.com,liyuqian@google.com,reed@google.com,caryclark@skia.org Change-Id: I6a413e3a2f1ce9182f9e209f6e2654a602170378 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/116620 Commit-Queue: Yuqian Li <liyuqian@google.com> Reviewed-by: Yuqian Li <liyuqian@google.com>
* Remove SkAutoGlyphCacheGravatar Herb Derby2018-03-27
| | | | | | | Change-Id: Ia485ce5acd70730d461ce81104595a6b961f5ca6 Reviewed-on: https://skia-review.googlesource.com/116183 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Herb Derby <herb@google.com>
* ccpr: Use Manhattan distance for curve AAGravatar Chris Dalton2018-03-26
| | | | | | | | | | | | | | | Manhattan distance has the nice property that every pixel crossed anywhere by the curve gets a fractional coverage value, whereas pixels not touched by the curve will have zero coverage. This arguably looks better on its own merits, but it also helps the curves blend more seamlessly with their adjoining edges, which are already using Manhattan distance. Bug: skia: Change-Id: I31cf28171d0b74512c74dca1088e50f0f442b924 Reviewed-on: https://skia-review.googlesource.com/115781 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
* Move cache difference code into remote cache filesGravatar Herb Derby2018-03-26
| | | | | | | | | BUG=skia:7515 Change-Id: I59e75d460b4ed4d0a737c833520b2335808a4ce4 Reviewed-on: https://skia-review.googlesource.com/115706 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Cleanup SkAutoGlyphCache in SkXPSDevice.Gravatar Herb Derby2018-03-26
| | | | | | | Change-Id: Iadd405fa527a8d3746d9f0b9ff803caaf1e582cf Reviewed-on: https://skia-review.googlesource.com/116524 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Herb Derby <herb@google.com>
* ccpr: Replace curve corner MSAA with analytic attenuationGravatar Chris Dalton2018-03-26
| | | | | | | | | | | | | Begins using the new triangle corner algorithm on curves as well. Updates the vertex backend to render curves in a single pass. Simplifies the cubic and quadratic shaders. Removes all code related to sample locations. Bug: skia: Change-Id: I96c6c401be765e96a8fe087deb7f84760e68dcf0 Reviewed-on: https://skia-review.googlesource.com/115746 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* added frexp support to SkSLGravatar Ethan Nicholas2018-03-26
| | | | | | | | | | | | | | | | | This includes an optimizer fix for the situation: int i; float f = frexp(foo, i); If we don't read the variable i, it is considered dead and eliminated - which then causes an error when we try to write the expression frexmp(foo, i). Bug: skia: Change-Id: Iac385e38e215455346fab62e1f4ec46fa65b3c21 Reviewed-on: https://skia-review.googlesource.com/116521 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Remove copy of TableColorFilter data when GPU renderingGravatar Robert Phillips2018-03-26
| | | | | | | Change-Id: I8cb6059a175e0ef6bd766e3ad2254c893c11bed3 Reviewed-on: https://skia-review.googlesource.com/116522 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* specialize arm64 allTrue()/anyTrue()Gravatar Mike Klein2018-03-26
| | | | | | | | | | | | | | | | | aarch64 added vector-wise add/mul/min/max instructions. We can use min and max to implement allTrue() and anyTrue(), respectively. (This CL is mostly so I don't forget these intrinsics exist.) In assembly, these actually compile to two instructions, the folding operation into a vector register, then a move from the vector register to a general purpose register. Change-Id: Ia6a999ac250740de765e871094e911979a8711c7 Reviewed-on: https://skia-review.googlesource.com/116482 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* detect ASIMDHP on ARM64Gravatar Mike Klein2018-03-26
| | | | | | | | | | | | | | (ASIMDHP == "advanced SIMD half-precision" == NEON half-float compute.) Testing: printed features after detection Pixel 1: 0x08 Galaxy S9: 0x18 (All as expected.) Change-Id: I3c6987d9ad50b0eb244c2be4354c1c13fdd24815 Reviewed-on: https://skia-review.googlesource.com/116480 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Revert "Use DAA for small cubics and non-convex paths that fit into a mask"Gravatar Mike Klein2018-03-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 1875e053845c4d377a0f64f7233bdb9dc00bdce1. Reason for revert: I don't think there's anything wrong with this, but it looks like Yuqian is out today and there is a large number of GM, SKP, and SVG images to triage from this. This is just a triage-by-revert... should be fine to reland when you're ready to triage. Original change's description: > Use DAA for small cubics and non-convex paths that fit into a mask > > I forgot to benchmark svgs and it turns out that DAA is specifically > good for the small cubics and small non-convex paths in svgs. This > should make our svg performance fast again: > > 2.84% faster in svgparse_Florida-StateSeal.svg_1 > 2.90% faster in svgparse_NewYork-StateSeal.svg_1 > 2.95% faster in svgparse_Seal_of_Texas.svg_1 > 3.05% faster in car.svg_1 > 3.53% faster in svgparse_Vermont_state_seal.svg_1 > 3.68% faster in svgparse_Wyoming-StateSeal.svg_1 > 4.88% faster in svgparse_Minnesota-StateSeal.svg_1 > 5.22% faster in svgparse_NewMexico-StateSeal.svg_1 > 6.49% faster in svgparse_fsm.svg_1 > > > Bug: skia: > Change-Id: Ia149944443d72c12c3dda178cb5ebc89d6d0bf18 > Reviewed-on: https://skia-review.googlesource.com/116185 > Reviewed-by: Cary Clark <caryclark@google.com> > Commit-Queue: Yuqian Li <liyuqian@google.com> TBR=caryclark@google.com,liyuqian@google.com,reed@google.com,caryclark@skia.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: skia: Change-Id: I232f34dcea1cdabef768879a261fe6796f3e4a79 Reviewed-on: https://skia-review.googlesource.com/116400 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Hide GrBackendTexture/RenderTarget constructors that take a GrPixelConfigGravatar Brian Salomon2018-03-23
| | | | | | | | | | Make GrGLTexture use the version that takes GrMipMapped. Bug: skia:6718 Change-Id: Id3e801bcb5e781938e610bdea75bd92498117935 Reviewed-on: https://skia-review.googlesource.com/116221 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "Implement Sk2f::Store2"Gravatar Chris Dalton2018-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8a8a8e9dd5c47f3fc930064bd030790f98af27af. Reason for revert: Needs non-SIMD impl Original change's description: > Implement Sk2f::Store2 > > Bug: skia: > Change-Id: Ieedd05ced376a7604936e9d2729fc20a8669496e > Reviewed-on: https://skia-review.googlesource.com/115531 > Commit-Queue: Chris Dalton <csmartdalton@google.com> > Reviewed-by: Mike Klein <mtklein@google.com> TBR=mtklein@google.com,csmartdalton@google.com Change-Id: I8dfbd87c5871b041a4fc6ef3816f121c72083a20 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/116240 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Remove legacy GrContext factories function and supporting code/types.Gravatar Brian Salomon2018-03-23
| | | | | | | Change-Id: I437a4a0a58bf70ea1b8b0659b099a2af2bfa64fe Reviewed-on: https://skia-review.googlesource.com/116197 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Move GrPixelConfig to GrTypesPrivGravatar Brian Salomon2018-03-23
| | | | | | | | | BUG= skia:6718 Change-Id: I254a5d289c1216e580b8f7fe613236c090d0e901 Reviewed-on: https://skia-review.googlesource.com/116196 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Remove legacy SkSurface::MakeFromBackendRenderTarget that does not take ↵Gravatar Brian Salomon2018-03-23
| | | | | | | | | | SkColorType Bug: skia:6718 Change-Id: Iefec5be49bf7450426c5ddb668f5525876f8ec2d Reviewed-on: https://skia-review.googlesource.com/116194 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Move a bunch of internal types from GrTypes to GrTypesPrivGravatar Brian Salomon2018-03-23
| | | | | | | Change-Id: I9fe1297ae7d185957c76681305bcf22cc972e53b Reviewed-on: https://skia-review.googlesource.com/116189 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Get @constructor feature of SKSL workingGravatar Robert Phillips2018-03-23
| | | | | | | | | | This is probably the only portion of https://skia-review.googlesource.com/c/skia/+/115900 that we want to keep TBR=ethannicholas@google.com Change-Id: Ife4d7bfbe454f705e93fb051b0bcf8e2b0a052b5 Reviewed-on: https://skia-review.googlesource.com/116192 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Implement Sk2f::Store2Gravatar Chris Dalton2018-03-23
| | | | | | | | Bug: skia: Change-Id: Ieedd05ced376a7604936e9d2729fc20a8669496e Reviewed-on: https://skia-review.googlesource.com/115531 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Use DAA for small cubics and non-convex paths that fit into a maskGravatar Yuqian Li2018-03-23
| | | | | | | | | | | | | | | | | | | | | | | I forgot to benchmark svgs and it turns out that DAA is specifically good for the small cubics and small non-convex paths in svgs. This should make our svg performance fast again: 2.84% faster in svgparse_Florida-StateSeal.svg_1 2.90% faster in svgparse_NewYork-StateSeal.svg_1 2.95% faster in svgparse_Seal_of_Texas.svg_1 3.05% faster in car.svg_1 3.53% faster in svgparse_Vermont_state_seal.svg_1 3.68% faster in svgparse_Wyoming-StateSeal.svg_1 4.88% faster in svgparse_Minnesota-StateSeal.svg_1 5.22% faster in svgparse_NewMexico-StateSeal.svg_1 6.49% faster in svgparse_fsm.svg_1 Bug: skia: Change-Id: Ia149944443d72c12c3dda178cb5ebc89d6d0bf18 Reviewed-on: https://skia-review.googlesource.com/116185 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Disable DDL assert to unblock ChromeGravatar Robert Phillips2018-03-23
| | | | | | | | | | Chrome is replaying DDLs into FBO 0 which impacts several rendering capabilities. FBO 0-ness of the final destination currently isn't part of SkSurfaceCharacterization so the surface flags aren't being set appropriately for the expected capabilities. Bug: skia:7748 Change-Id: I0d2bf3f689f8f75990443a0d5959f016d16f5d97 Reviewed-on: https://skia-review.googlesource.com/116188 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Add error return, upon mask creation failure, in sw_draw_with_mask_filterGravatar Robert Phillips2018-03-23
| | | | | | | | | Bug: 822680 Change-Id: I7296c5be4faf1f706ad1cc05198559771e324841 Reviewed-on: https://skia-review.googlesource.com/116180 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Add color fonts."Gravatar Jim Van Verth2018-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c912d6133c66df7cde3d64adc76941856a12da64. Reason for revert: Causing TSAN issues. Original change's description: > Add color fonts. > > BUG=skia:7624 > > Change-Id: Id2b7449048591892ff802484d5e3745a7e1402bb > Reviewed-on: https://skia-review.googlesource.com/109521 > Commit-Queue: Ben Wagner <bungeman@google.com> > Reviewed-by: Mike Klein <mtklein@google.com> > Reviewed-by: Herb Derby <herb@google.com> TBR=mtklein@google.com,bungeman@google.com,herb@google.com Change-Id: I2ccd1f00e91bb92b7059323c95da0dd3de954164 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7624 Reviewed-on: https://skia-review.googlesource.com/116141 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Revert "Remove std::move from GrSimpleTextureEffect"Gravatar Robert Phillips2018-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0a4b13cdea208946a59c612e0743f28533124166. Reason for revert: incorrect change Original change's description: > Remove std::move from GrSimpleTextureEffect > > Bug:822680 > Change-Id: I4780ce12a6ce244a2165bfb7b293adb06ae577c5 > Reviewed-on: https://skia-review.googlesource.com/115900 > Reviewed-by: Ethan Nicholas <ethannicholas@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> TBR=bsalomon@google.com,robertphillips@google.com,ethannicholas@google.com Change-Id: Ib4123d50b02eeac3f5112bf2702b12fc080f0d1c No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 822680 Reviewed-on: https://skia-review.googlesource.com/116140 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Remove SkAutoGlyphCache decls that happen to workGravatar Herb Derby2018-03-22
| | | | | | | | | | ...and fix sample code. Change-Id: I673770125064f8451e3d88ec4929a68409935ad1 Reviewed-on: https://skia-review.googlesource.com/115995 Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Add color fonts.Gravatar Ben Wagner2018-03-22
| | | | | | | | | | BUG=skia:7624 Change-Id: Id2b7449048591892ff802484d5e3745a7e1402bb Reviewed-on: https://skia-review.googlesource.com/109521 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Herb Derby <herb@google.com>
* Remove std::move from GrSimpleTextureEffectGravatar Robert Phillips2018-03-22
| | | | | | | | | Bug:822680 Change-Id: I4780ce12a6ce244a2165bfb7b293adb06ae577c5 Reviewed-on: https://skia-review.googlesource.com/115900 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Always validate GrBackendTextures passed to YUV image factoriesGravatar Brian Salomon2018-03-22
| | | | | | | Change-Id: I73a301fcdf13fceb82c94b0c68ac9386aa38e16d Reviewed-on: https://skia-review.googlesource.com/115126 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* GrGLES Interface: GL_OES_vertex_array_object extGravatar Hal Canary2018-03-22
| | | | | | | Change-Id: I712ec637b5699587a77ab4a6cd48784df075d8c5 Reviewed-on: https://skia-review.googlesource.com/115933 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* lock before using fCacheKeys in ~SkImageFilter()Gravatar Mike Klein2018-03-22
| | | | | | | | | | | | | | | | | | No other code can be using an SkImageFilter() while it's being destroyed, so there's not a chance of a race per-se here. But, because we have not acquired fMutex, there is technically a possibility that the destructor sees an outdated version of fCacheKeys, not necessarily reflecting the last change(s) made while another core held the mutex. This is an unlikely case, but it's worth fixing by locking in the destructor. This will always be uncontended, and so very cheap. Bug: skia:7666 Change-Id: I9f705bc6e8e99162b90d59b30b8dd51c4f238970 Reviewed-on: https://skia-review.googlesource.com/115929 Reviewed-by: Ben Wagner <benjaminwagner@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Remove the last uses of auto glyph cache.Gravatar Herb Derby2018-03-22
| | | | | | | Change-Id: I15fdc5bbe29aaa969fe6ec57010919b52249fd7f Reviewed-on: https://skia-review.googlesource.com/115886 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Better decisions about choosing AAA versus DAAGravatar Yuqian Li2018-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Chrome perf regressions (817942, 819185) are caused by the bad choices to use DAA instead of AAA for stroking simple curves. (BTW, in my tests, DAA is still faster than SAA so it's not too much of a regression.) We previously only considered the number of line segments, but not the length of each segment. That leads to our wrong judgement of the path complexity (the number of intersections per scan line) when there are many short line segments. The change will bring the following performance change to our nanobench: 8.45% slower in clip_strategy_path_10 8.39% slower in draw_stroke_bezier_quad_square_bevel_10 3.91% slower in chart_aa 3.76% faster in lines 6.29% faster in path_stroke_big_oval 22.81% faster in path_stroke_big_circle 24.44% faster in giantdashline_vert_2 The two slower cases, clip_strategy_path_10 and draw_stroke_bezier_quad_square_bevel_10 are caused by choosing AAA over DAA. Those two tests do seem to be simple strokes. I'll later investigate why AAA is slower than DAA for those two cases. For now, I think that this change is sufficient to address those chromium perf regresssions. Bug: chromium:817942 chromium:819185 Change-Id: I1d13c968b17f257b4ede4c70e552db5016baf1ab Reviewed-on: https://skia-review.googlesource.com/115583 Commit-Queue: Yuqian Li <liyuqian@google.com> Reviewed-by: Cary Clark <caryclark@google.com>
* Reland "Remove legacy precision boundary"Gravatar Yuqian Li2018-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit dab15f7a02ddaa2a6977a14d5d04955bd39350ab. Reason for revert: the Android roll is broken by something else: b/76126268 Original change's description: > Revert "Remove legacy precision boundary" > > This reverts commit a2513c14c4e143984b2eec07f5263b5cdc6c84bb. > > Reason for revert: This is breaking the Android roll. > > Original change's description: > > Remove legacy precision boundary > > > > Bug: skia:7731 > > Change-Id: I86a87b960541c2bc7b099ca9f609342cb0bbf563 > > Reviewed-on: https://skia-review.googlesource.com/115652 > > Reviewed-by: Cary Clark <caryclark@google.com> > > Commit-Queue: Yuqian Li <liyuqian@google.com> > > TBR=caryclark@google.com,fmalita@chromium.org,liyuqian@google.com,reed@google.com > > Change-Id: I45b14f5a84e97cc1022b99c414f90126d368f598 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia:7731 > Reviewed-on: https://skia-review.googlesource.com/115840 > Reviewed-by: Derek Sollenberger <djsollen@google.com> > Commit-Queue: Derek Sollenberger <djsollen@google.com> TBR=djsollen@google.com,caryclark@google.com,fmalita@chromium.org,liyuqian@google.com,reed@google.com Change-Id: I5d957cb7be9cc578672079e98ab5e131ad249f70 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7731 Reviewed-on: https://skia-review.googlesource.com/115940 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Support GL_RGB textures and render targets.Gravatar Brian Salomon2018-03-22
| | | | | | | | | Bug= skia:7533 Change-Id: Iba30e90dbf2574368b773bb5cf2ebd5219559717 Reviewed-on: https://skia-review.googlesource.com/108188 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* switched SPIR-V vertexid to vertexindexGravatar Ethan Nicholas2018-03-22
| | | | | | | | Bug: skia: Change-Id: I32c10e2874feea63d7fa048057ef57e27d5874bc Reviewed-on: https://skia-review.googlesource.com/115880 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Revert "Remove legacy precision boundary"Gravatar Derek Sollenberger2018-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a2513c14c4e143984b2eec07f5263b5cdc6c84bb. Reason for revert: This is breaking the Android roll. Original change's description: > Remove legacy precision boundary > > Bug: skia:7731 > Change-Id: I86a87b960541c2bc7b099ca9f609342cb0bbf563 > Reviewed-on: https://skia-review.googlesource.com/115652 > Reviewed-by: Cary Clark <caryclark@google.com> > Commit-Queue: Yuqian Li <liyuqian@google.com> TBR=caryclark@google.com,fmalita@chromium.org,liyuqian@google.com,reed@google.com Change-Id: I45b14f5a84e97cc1022b99c414f90126d368f598 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7731 Reviewed-on: https://skia-review.googlesource.com/115840 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Derek Sollenberger <djsollen@google.com>
* limit discrete path effect iterationsGravatar Cary Clark2018-03-21
| | | | | | | | | R=fmalita@google.com, reed@google.com Bug: skia:7737 Change-Id: I339548f7a39618d7559182487e8969d591953b89 Reviewed-on: https://skia-review.googlesource.com/115659 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Cary Clark <caryclark@skia.org>
* small ABI + narrow/wide code updatesGravatar Mike Klein2018-03-21
| | | | | | | | | | | | | | | | | | | | The only tangible effect this CL should have is to use __vectorcall on all Windows builds, including scalar ones. The code generation is a little better there with __vectorcall than not, so might as well. This is a baby step towards vector stages with MSVC, but a very baby step indeed. Mostly this refactors and regroups a bunch of logic to reflect my current thoughts. The BUILD.gn changes are essentially no-ops, but they simplify things and make our flags more similar to how those targets are built in Chromium. (And I cleaned up other /arch: uses so this works.) Change-Id: I73dd39d15cdc7b3d268231a707952bbbfd91496e Reviewed-on: https://skia-review.googlesource.com/115644 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Remove deprecated version of SkImage::MakeFromAdoptedTexture that does not ↵Gravatar Brian Salomon2018-03-21
| | | | | | | | | | take SkColorType Bug: skia:6718 Change-Id: Ia2762855078bcbad8faf2f538f0afc64913e5e9b Reviewed-on: https://skia-review.googlesource.com/115364 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Remove legacy precision boundaryGravatar Yuqian Li2018-03-21
| | | | | | | | Bug: skia:7731 Change-Id: I86a87b960541c2bc7b099ca9f609342cb0bbf563 Reviewed-on: https://skia-review.googlesource.com/115652 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* ccpr: Use a more stable formula to find quadratic coordinatesGravatar Chris Dalton2018-03-21
| | | | | | | | | | | | | | | The 3x3 inverse grew unstable on small curves with large coordinates, not to mention being inefficient. This fixes many bad pixels on the chalkboard. Also begins scaling curve gradients by the AA bloat, in order to match triangle edges more closely and visualize curve AA in the ccpr sample. Bug: skia: Change-Id: I0f7da2e7599d4d5c458b3dd307185679dc78bb50 Reviewed-on: https://skia-review.googlesource.com/115527 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* change canvas-state to just record clip boundsGravatar Mike Reed2018-03-21
| | | | | | | | | | | | This reflects the long-standing restrictions in our clients (webview) and the reality of the gpu target which just uses scissors. It also removes one of the few callers of canvas::clipRegion, which we'd like to remove. Bug: skia: Change-Id: Ie3b3c6e8752f82cddef256f753000f9da4bdbdee Reviewed-on: https://skia-review.googlesource.com/113260 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Mike Reed <reed@google.com>
* GrGLExtensions: remove unneded unique_ptrGravatar Hal Canary2018-03-21
| | | | | | | Change-Id: Ic949b186fbb4f503d2edbea7033ad242c12ad101 Reviewed-on: https://skia-review.googlesource.com/115640 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Hal Canary <halcanary@google.com>