Only initialize a default font manager when needed.
Change-Id: I3473804d426f1f4981f3727d3539303fb670cdd1
Reviewed-on: https://skia-review.googlesource.com/150840
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
After discussing with bsalomon, we think QuadroP400 gives us good enough
coverage for NVIDIA Pascal.
No-Try: true
Change-Id: If50a80d872ae9dc2c5987b3e31804a8e16325888
Reviewed-on: https://skia-review.googlesource.com/150908
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
We weren't checking whether the new point in lineTo was backtracking or not.
Also:
Replace distance-to-line check with triangle area check. The previous check
was asymmetric. Given point sequence (a, b, c) it might make a different
decision than when given (c, b, a).
Compute normals late since we don't use them to detect colinear edges
anymore.
Rename SkPointPriv::SetOrhog -> SkPointPriv::MakeOrthog and return
computed value rather than take SkPoint* dst.
Bug: chromium:869172
Change-Id: I8da53edf1a2e6098f4199da57368ebb644866e4c
Reviewed-on: https://skia-review.googlesource.com/150682
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
See https://bugs.chromium.org/p/chromium/issues/detail?id=784662 for
more context. We need to distinguish between existing bots and the new
bots in order to have consistent performance measurements.
This is step 2 of 3:
1. Add rack:1 dimension to bots.cfg for current Skia QuadroP400 bots.
2. Add rack:1 dimension to our tasks to ensure they only run on the
current bots.
3. Add build{330..335}-a9 to bots.cfg with rack:2 dimension.
Bug: chromium:784662
Change-Id: I1e5ff0aa0ebd69e00f4933ca50eef6cef520bc66
Reviewed-on: https://skia-review.googlesource.com/150911
Auto-Submit: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
This reverts commit 8491dd80c8.
Reason for revert: BonusConfigs bot asserting on some color images.
Original change's description:
> Add support for gray + colorspace to SkCodec
>
> In both PNG and JPEG, support passing Gray8 directly to skcms, and
> remove assertions about gray never having a color xform.
>
> Remove SkImage_Lazy hacks to strip color spaces when decoding gray.
>
> Change-Id: I64c7b480c51a2b0c839e7eb8ed3a5fdea5aa4e41
> Reviewed-on: https://skia-review.googlesource.com/150909
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
TBR=mtklein@google.com,scroggo@google.com,brianosman@google.com
Change-Id: Iebdd4f60144380d4ef462225ff3cadb7b91eee84
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/150912
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Use macros from SkPreConfig.h where they exist and are appropriate.
Change-Id: If8e161ca2a105e75b76dfc75c75f91abfc5997ef
Reviewed-on: https://skia-review.googlesource.com/150963
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
The SkStrikeServer maintains a map of SkGlyphCacheState to track the
cache for a strike on the client. This entry is evicted only on a
failure to lock, which means that the map can potentially grow unbounded
if entries are not reused after eviction.
Make sure we check that they are deleted after some limit.
R=herb@google.com
Bug:878966
Change-Id: I4adb06c35661049328f6e0bde52fb1c774d0c29b
Reviewed-on: https://skia-review.googlesource.com/150443
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Khusal Sagar <khushalsagar@chromium.org>
In both PNG and JPEG, support passing Gray8 directly to skcms, and
remove assertions about gray never having a color xform.
Remove SkImage_Lazy hacks to strip color spaces when decoding gray.
Change-Id: I64c7b480c51a2b0c839e7eb8ed3a5fdea5aa4e41
Reviewed-on: https://skia-review.googlesource.com/150909
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This is a reland of 75d25c4c8f
Last time I screwed up by replacing defined(__AVX2__) with
defined(JUMPER_IS_HSW). When __AVX2__ is defined, we'll
be using AVX2, _or better_.
This time around I think I've got it all straight
translating the old __FOO__ into the equivalent JUMPER_IS_FOO.
Last time I also missed a defined(__SSE__), which has been
translated into JUMPER_IS_FOOs now too.
Original change's description:
> standardize macro checks in SkRasterPipeline_opts
>
> We mostly check JUMPER_IS_FOO macros, but in a few places we are
> checking the raw __FOO__ compiler macros instead. If only for clarity,
> switch to JUMPER_IS_FOO.
>
> This is also a step towards me being able to control the instruction
> set we choose without having to #define these protected __FOO__ macros.
>
> Change-Id: Ieea2090ff658399e27746e0bb8ce950b06f9efb8
> Reviewed-on: https://skia-review.googlesource.com/150961
> Commit-Queue: Brian Osman <brianosman@google.com>
> Auto-Submit: Mike Klein <mtklein@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: I656d89e3d3cd7fa23fd618c80e59908fd2b31329
Reviewed-on: https://skia-review.googlesource.com/150965
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This makes semaphores get handled correctly when GrContext is abandoned or
asked to free all its resources.
Change-Id: I0b935bb95cf99b9acf647472bcd0231bb2759db6
Reviewed-on: https://skia-review.googlesource.com/150364
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
This reverts commit 75d25c4c8f.
Reason for revert: subtly broken, going to give this a redo.
Original change's description:
> standardize macro checks in SkRasterPipeline_opts
>
> We mostly check JUMPER_IS_FOO macros, but in a few places we are
> checking the raw __FOO__ compiler macros instead. If only for clarity,
> switch to JUMPER_IS_FOO.
>
> This is also a step towards me being able to control the instruction
> set we choose without having to #define these protected __FOO__ macros.
>
> Change-Id: Ieea2090ff658399e27746e0bb8ce950b06f9efb8
> Reviewed-on: https://skia-review.googlesource.com/150961
> Commit-Queue: Brian Osman <brianosman@google.com>
> Auto-Submit: Mike Klein <mtklein@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
TBR=mtklein@google.com,brianosman@google.com
Change-Id: Ifbf5b6f51a29ad4e02e8ca311e449c13cc3ed19c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/150964
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Easily supports mapping ctypes to sksl types with templates that
specify how to send data to the GPU and how to track state changes.
The template logic and type mappings are defined in
SkSLCPPUniformCTypes.* while SkSLCPPCodeGenerator is updated to
utilize it.
It also updates the supported ctypes to properly generate code for
SkPoint, SkIPoint, SkIRect, and GrColor4f. The code generated for
'in uniforms' now also correctly supports conditional uniforms.
Bug: skia:
Change-Id: Ib7c0a873bdd68a966b6a00871f33102dfa2c432d
Reviewed-on: https://skia-review.googlesource.com/150129
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
SkTArray is not a good choice for tigh allocations:
- its minimum allocation count is 8
- reserve(sz) doesn't adjust capacity to the exact value, but padds
the same way as normal growth (max(sz, 8, 50%))
- no shrink_to_fit() function to trim unneeded capacity
Since keyframed properties with a small number of frames are quite
common in Lottie, this adds significant heap overhead.
Switch to std::vector(), reserve() to the estimated frame count and
shrink_to_fit() when done parsing.
Bug: skia:8340
Change-Id: Id575e2da2fd17537948c2b38485a8accdb9f7a8b
Reviewed-on: https://skia-review.googlesource.com/150905
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Change-Id: Ifc0b0ad39d9a35625691b3fb12e6e6c65166d760
Reviewed-on: https://skia-review.googlesource.com/150903
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
On the demo page, we use the skia-cdn bucket to hopefully
have better performance than unpkg.
Additionally, on the demo page, we default to using the
WASM version if supported by the browser.
Docs-Preview: https://skia.org/?cl=150904
Bug: skia:8216
Change-Id: I901016e95b8d66803053680691aac4d314821d18
Reviewed-on: https://skia-review.googlesource.com/150904
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
- add AVX-512 to SK_CPU_SSE_LEVEL
- remove unused SK_ARM_ARCH
- small formatting changes
- no need to check for __ARM_NEON__ and __ARM_NEON...
__ARM_NEON is defined anywhere we'll find NEON.
Change-Id: I6841097d62cf73ddb749f961261e583474470276
Reviewed-on: https://skia-review.googlesource.com/150960
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
We mostly check JUMPER_IS_FOO macros, but in a few places we are
checking the raw __FOO__ compiler macros instead. If only for clarity,
switch to JUMPER_IS_FOO.
This is also a step towards me being able to control the instruction
set we choose without having to #define these protected __FOO__ macros.
Change-Id: Ieea2090ff658399e27746e0bb8ce950b06f9efb8
Reviewed-on: https://skia-review.googlesource.com/150961
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This reverts commit 2f2757fa6b.
Reason for revert: issues with DDL
Original change's description:
> ccpr: Implement stroking with fine triangle strips
>
> Implements strokes by linearizing the curve into fine triangle strips
> and interpolating a coverage ramp for edge AA. Each triangle in the
> strip emits either positive or negative coverage, depending on its
> winding direction. Joins and caps are drawn with the existing CCPR
> shaders for triangles and conics.
>
> Conic strokes and non-rigid-body transforms are not yet supported.
>
> Bug: skia:
> Change-Id: I45a819abd64e91c2b62e992587eb85c703e09e77
> Reviewed-on: https://skia-review.googlesource.com/148243
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Allan MacKinnon <allanmac@google.com>
TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,caryclark@google.com,csmartdalton@google.com,reed@google.com,allanmac@google.com
Change-Id: I1980b09976df8275817eaffb6766dbd9fd3e59c7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/150980
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Bug: skia:
Change-Id: Ie4f620a96d1a6f7662819590d97073a694159f96
Reviewed-on: https://skia-review.googlesource.com/150483
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
This reverts commit cd72da268c.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> update SkPaint size sanity check
>
> I counted twice... there are 7 pointers and 8 4-byte things.
>
> Change-Id: I106a0f1c1bf9ee580e7b04afc763b2ec977fca3c
> Reviewed-on: https://skia-review.googlesource.com/150120
> Auto-Submit: Mike Klein <mtklein@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
TBR=mtklein@google.com,brianosman@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I579eab2f71bb1307c1e6c12da8678b787291411a
Reviewed-on: https://skia-review.googlesource.com/150845
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Implements strokes by linearizing the curve into fine triangle strips
and interpolating a coverage ramp for edge AA. Each triangle in the
strip emits either positive or negative coverage, depending on its
winding direction. Joins and caps are drawn with the existing CCPR
shaders for triangles and conics.
Conic strokes and non-rigid-body transforms are not yet supported.
Bug: skia:
Change-Id: I45a819abd64e91c2b62e992587eb85c703e09e77
Reviewed-on: https://skia-review.googlesource.com/148243
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Allan MacKinnon <allanmac@google.com>
It is dying with the error:
src/svg/SkSVGDevice.cpp:870:23: error: binding reference member 'fOrigin' to stack allocated parameter 'origin' [-Werror,-Wdangling-field]
: fOrigin(origin)
^~~~~~
src/svg/SkSVGDevice.cpp:941:21: note: reference member declared here
const SkPoint& fOrigin;
and was introduced in:
https://skia-review.googlesource.com/c/skia/+/150542 (Remove drawPosText from svg)
Change-Id: I7a2d1c2992100d0cfd2e50df6dd7195f62d053e6
Reviewed-on: https://skia-review.googlesource.com/150842
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
1bf963b629..fd1621076a
git log 1bf963b62929..fd1621076a74 --date=short --no-merges --format='%ad %ae %s'
2018-08-31 oetuaho@nvidia.com Support multisample arrays as framebuffer attachments
Created with:
gclient setdep -r third_party/externals/angle2@fd1621076a74
The AutoRoll server is located here: https://autoroll.skia.org/r/angle-skia-autoroll
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md
If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.
CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia.primary:Perf-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE
TBR=stephana@google.com
Change-Id: Iec35eb80a4ee372865b7211519ec8e529c5a7010
Reviewed-on: https://skia-review.googlesource.com/150801
Reviewed-by: <angle-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Commit-Queue: <angle-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
44b2c0b1d3..1bf963b629
git log 44b2c0b1d349..1bf963b62929 --date=short --no-merges --format='%ad %ae %s'
2018-08-30 tobine@google.com Clean up PlatformMethods attribute enum
Created with:
gclient setdep -r third_party/externals/angle2@1bf963b62929
The AutoRoll server is located here: https://autoroll.skia.org/r/angle-skia-autoroll
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md
If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.
CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia.primary:Perf-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE
TBR=stephana@google.com
Change-Id: I2fb504adb6930d701fafbc36c62bc9e22077f706
Reviewed-on: https://skia-review.googlesource.com/150760
Reviewed-by: <angle-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Commit-Queue: <angle-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
This commit rebased the source paths in the .gni
file from ANGLE's src/ directory to its project root.
The update to third_party/angle2/BUILD.gn does the same.
CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia.primary:Perf-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE
Change-Id: Id814f67bed2dfab11f878544989054e38987a939
Reviewed-on: https://skia-review.googlesource.com/150485
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Stephan Altmueller <stephana@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Stephan Altmueller <stephana@google.com>
It appears that the way to check a glyph doesn't have a path is to load
the glyph with the FT_LOAD_NO_BITMAP load flag and then check if the glyph
format is FT_GLYPH_FORMAT_BITMAP, meaning that no outline was available.
Change-Id: Ie19fc7005115f4c4f6072a7be0e93576f8db5877
Bug: skia:7878
Reviewed-on: https://skia-review.googlesource.com/150467
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
--
This expands sksl's capabilities with .fp files. Previously, it was possible to declare "in fragmentProcessor foo" and emit it automatically when "process(foo);" was called. This adds a variant of process that takes a second argument, which must be a half4 expression. This argument specifies the value, or dynamic expression calculated earlier in the parent shader, to use as sk_InColor by the child.
The CL is longer than anticipated because of properly handling dependencies between previous sksl statements and the input to the child. The original writeEmitCode() collected all extra emission code (the calls to build->emitChild) and put them before any call to codeAppendf. This makes it impossible to use a parent's variable, or the output of another child, as the input for process.
To solve this, there is now a flushEmittedCode() function that takes over the logic of outputting the extra emission code and the necessary codeAppendf calls. When invoked, it (by default) only appends completed sksl statements, and places any current expression back at the beginning of the output stream. It now updates fFormatArgs and fExtraEmitCodeCode as it consumes their contents. This allows writeFunctionCall() for a call to "process" to flush all previous statements before it adds its emit child code.
Bug: skia:
Change-Id: I63c41af6f3e0620aa890d10d14436ee6244f0051
Reviewed-on: https://skia-review.googlesource.com/148395
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
The texture strip atlas code path has been disabled without performance
regressions since 8/3/18, so this deletes it completely from the code
base since it is complex and difficult to manage.
GrTextureStripAtlas, GrDynamicTextureStripAtlas, and
GrDDLTextureStripAtlas completely deleted, everything else is cleaning
up references/dead code using the atlas.
Bug: skia:
Change-Id: Ieb967b6e291a1d76da62fce9fa384acbda8c51c0
Reviewed-on: https://skia-review.googlesource.com/150472
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>