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>
The reason we push Json updates for every frame is to support the
Android FPS meter - which happens to require the native FPS meter for
updates.
Instead of supporting two meters:
1) scale up the native FPS widget on Android (1.5x)
2) remove the Android widget
3) stop calling updateUIState() from onPaint()
Change-Id: Ica8109869035b2f885743a7e38b50688b69fa5e4
Reviewed-on: https://skia-review.googlesource.com/126621
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Bug: b/77917978
TBR=brianosman@google.com
Change-Id: Ib7ecb00dd0beac2444ca95106c2560c2b2940465
Reviewed-on: https://skia-review.googlesource.com/126509
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
https://swiftshader.googlesource.com/SwiftShader/+log/336cdd903180..d4e488eb6dfb
$ git log 336cdd903..d4e488eb6 --date=short --no-merges --format='%ad %ae %s'
2018-02-14 irogers Allocate executable memory backed by named mmaps on Linux.
Created with:
roll-dep third_party/externals/swiftshader
The AutoRoll server is located here: https://swiftshader-skia-roll.skia.org
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:Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-SwiftShader
TBR=egdaniel@google.com
Change-Id: I11f0a7a1978643fdce05c47de4de2bd20ee54bb1
Reviewed-on: https://skia-review.googlesource.com/126606
Reviewed-by: swiftshader-skia-autoroll <swiftshader-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Commit-Queue: swiftshader-skia-autoroll <swiftshader-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Don't run them on non-GCE bots either.
Bug: skia:
Change-Id: I15f9a1b7e74eb89a5d580d4e5f82be6e27335600
Reviewed-on: https://skia-review.googlesource.com/126501
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
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>
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 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>
Consolidate code for handling various image/bitmap and lattice/ninepatch flavors.
Makes refTextureForParams virtual on GrTextureProducer. Previously both subclasses had non-virtual flavors of this.
Bug: b/77917978
Change-Id: I14787faef33c4617ef359039e81453d683f33ff1
Reviewed-on: https://skia-review.googlesource.com/125520
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
983460e6cd..9f394f8cdf
$ git log 983460e6c..9f394f8cd --date=short --no-merges --format='%ad %ae %s'
2018-05-07 oetuaho Fix use-after-free in drawQuad with useVertexBuffer false
2018-05-07 cwallez ANGLETest: Reuse test windows per-renderer
2018-04-27 jiawei.shao Use ShaderMap in Caps - Part I
2018-05-03 geofflang Implement extensions exposing ETC2 compressed texture formats in ES2.
Created with:
roll-dep third_party/externals/angle2
The AutoRoll server is located here: https://angle-skia-roll.skia.org
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=egdaniel@google.com
Change-Id: I46c60ea2b0c7559a2c01b85977bc9cf3fc76e23c
Reviewed-on: https://skia-review.googlesource.com/126446
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 reverts commit 8a95244f62.
Reason for revert: Didn't actually break anything.
Original change's description:
> Revert "Avoid drawing BW clipped color glyphs many times."
>
> This reverts commit bba38ee80e.
>
> 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>
This is a stop-gap measure.
Bug: skia:7838#c20
Change-Id: Ib9af9aefa4327d24f66f95d9a82ee53c19733524
Reviewed-on: https://skia-review.googlesource.com/126461
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
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>
Rapidjson's array [] operator asserts the index is valid (instead of
returning a null value when out-of-range) -> we must check.
Bug: skia:7918
Change-Id: Ice4a6e6670a824da0d423da4a6f92414cd0dc252
Reviewed-on: https://skia-review.googlesource.com/126441
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Manual roll including GN fix for renamed file.
---
d7b56642c9..983460e6cd
$ git log d7b56642c..983460e6c --date=short --no-merges --format='%ad %ae %s'
2018-05-02 oetuaho Rewrite repeated assignments to swizzled vectors on NVIDIA
2018-04-28 jiawei.shao ES31: Add link validation on MAX_COMBINED_SHADER_OUTPUT_RESOURCES
2018-05-02 brandon1.jones Autogenerate libGLESv2.cpp and .def
Created with:
roll-dep third_party/externals/angle2
The AutoRoll server is located here: https://angle-skia-roll.skia.org
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
Change-Id: I41f4cace265952ae898a7c60b345b60510979fdd
Reviewed-on: https://skia-review.googlesource.com/126421
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
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>
This reverts commit bba38ee80e.
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>
This reverts commit 3d5b83bf95.
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>
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>
https://swiftshader.googlesource.com/SwiftShader/+log/e76163e3cae0..336cdd903180
$ git log e76163e3c..336cdd903 --date=short --no-merges --format='%ad %ae %s'
2018-05-04 capn Don't flag temporary registers as used samplers.
Created with:
roll-dep third_party/externals/swiftshader
The AutoRoll server is located here: https://swiftshader-skia-roll.skia.org
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:Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-SwiftShader
TBR=brianosman@google.com
Change-Id: If0cec57f06bd8c521518e1ca0faf3f5d336ebb83
Reviewed-on: https://skia-review.googlesource.com/126151
Commit-Queue: swiftshader-skia-autoroll <swiftshader-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Reviewed-by: swiftshader-skia-autoroll <swiftshader-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
No user-visible change.
Bug: skia:
Change-Id: Ib665e79c96f8fbbc4891595a95359ab085039950
Reviewed-on: https://skia-review.googlesource.com/126200
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
- pull latest RapidJSON under third_party/externals/rapidjson
(note: and older RS version is already pulled as part of angle2,
and it is also checked in G3)
- add a thin Json porting layer (SkottieJson) to isolate RS
idiosyncrasies
- convert Skottie to use the new helpers
- parse the DOM in-place (based on local experiments this is the
fastest method)
Ta-da: Skottie now parses JSON ~10x faster!
Change-Id: Ida9099638f88ed025fee83055c8cd8680ee27176
Reviewed-on: https://skia-review.googlesource.com/125744
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Change-Id: I106364cb3875640a637476998dc1d3936566f0ab
Reviewed-on: https://skia-review.googlesource.com/126120
Commit-Queue: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Bug: skia:7415, skia:7416
Change-Id: Ibdd391dce62ff16bfc7fa8d860c3cbcaddab7c4d
Reviewed-on: https://skia-review.googlesource.com/124340
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
It turns out the ImGui sliders don't use the format string just for
display but also to modify the potential values. Change the format
string for rotation to three decimal places to match zoom.
Change-Id: I5f8d675a18687d67c2f19b03aa4c19c3ae094415
Reviewed-on: https://skia-review.googlesource.com/125960
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Ben Wagner <bungeman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This reverts commit 72de74504f.
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>
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>
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>
Make Skottie truly optional (own flag), and disable in framework builds
(to unblock landing the RapidJson refactoring).
Change-Id: I4611f915e43fe11c1f6754ab4a9f63e45af2f8d3
Reviewed-on: https://skia-review.googlesource.com/125872
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
Each recipe now includes its own setup steps.
Bug: skia:6473
Change-Id: I97eab2cd63f5004c07408e844cbbed735aac355f
Reviewed-on: https://skia-review.googlesource.com/125660
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>