This is pulled out of the parameter reordering CL - which has become too large.
Change-Id: Id36875dd4a670611ab94a08a3a6df41c474e9022
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266217
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Since we just rely on SkBitmap to manage rowbytes, we don't need to
separately track it in the surface.
Bug: 1038304
Change-Id: Iea2d486019bf4c5bf4f2a87eabc5f00ad71949fc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266219
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This makes sure that when we are not using repeat mode the colorType of
the producer will match the colorType of the returned proxy.
Bug: chromium:1044862
Change-Id: I9627517c383ff7c3e9801da21ddafdacfb747871
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266218
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This reverts commit 40a1353126.
Reason for revert: layout tests need rebaseline
Original change's description:
> Increase precision of some quad AA calculations
>
> This stops using the low precision rsqrt and instead does a divide + sqrt.
> It also separates the single kTolerance value used in GrQuadUtils' math
> into a fairly fuzzy tolerance for edges/distances being close to zero
> (e.g. a degenerate quad), and a more precise tolerance for linear systems
> solutions.
>
> The smaller tolerance value used for denominators in these solutions prevents
> the solved-for coordinates from being mis-classified as "bad". The bad coord
> resolution works on the assumption that its correcting points that are
> co-located, but if the input coords were sufficiently large the linear
> equations would have small denominators that were less than the fuzzy tolerance
> and then the geometry would be improperly collapsed to a line.
>
> For the selected zoom level of GM_crbug_10141204, this change is sufficient
> to prevent the draw from being discarded. However, when animating the zoom
> level, the input shape is sometimes still considered a fullscreen clear when
> it shouldn't be. A follow up change will improve precision in CropToRect()
>
> Bug: skia:9779, chromium:10141204
> Change-Id: Id1518a908c03e7813868c4eff014d18388f8f62e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265976
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
TBR=robertphillips@google.com,michaelludwig@google.com
Change-Id: I44012a2728f75e235678f733c6da8870b84ae3ab
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9779, chromium:10141204
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266220
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This is looking pretty good.
Some egregious diffs, some invisible,
and a handful in-between I've investigated.
The egregious diffs look like bad shader caching. I need to fix that,
but its brokenness is simply helpfully exposed here, not made any worse.
To repo, run: lumafilter, srcmode.
These in-between diffs all fall within the existing variance:
crbug_938592 ok
analytic_gradients ok
gradients_dup_color_stops ok
Probably different geometry math, FMAs, reordering, etc.
I will follow up with radial etc,
and shallow gradients also demonstrate we're missing dither.
Change-Id: I5a046ee42accdf1faed50b3b65efb4a6787b5e04
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265821
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Change-Id: I44d6f67dcd3d042127ad20ebdaa332e94f1b0829
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266216
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
This reflects Dawn and Metal functionality.
Implement a FramebufferOnly flag on GrSurface and GrBackendRenderTarget.
Forward the state from GrBackendRenderTarget to GrSurface.
Check the GrSurface flag in GrGpu::readPixels() and GrGpu::writePixels()
and early-return.
Change-Id: I27d3c9c912b366791bfd0e1db49638d8925742f3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/262802
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
For quads with very large coordinates, the barycentric coordinate
calculations could be very inaccurate in 32 bit. This lead to
erroneously thinking the render target was contained within the
quad's triangles, instead of just intersecting it.
By scaling the coordinates to a more reasonable magnitude before
multiplying and subtracting the coordinate values, reasonable
accuracy is preserved w/o needing to do everything in 64 bit.
Because it produces coordinates relative to the triangle vertices,
the computed values remain the same as if the unscaled coordinates
were used with higher precision math.
This seems to prevent GM_crbug_10141204 from being misclassified as
a fullscreen clear when its large rect geometry just intersects
the device.
Bug: skia:9779, chromium:10141204
Change-Id: Ia97c2c4e288907ddbb7058d3e7ed97112143b7dc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265977
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Wrong edge used for left rect in y-pass.
Change-Id: I3040c5b45fcaaddb321aff3a8bc341b4baa67fd6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266198
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
This stops using the low precision rsqrt and instead does a divide + sqrt.
It also separates the single kTolerance value used in GrQuadUtils' math
into a fairly fuzzy tolerance for edges/distances being close to zero
(e.g. a degenerate quad), and a more precise tolerance for linear systems
solutions.
The smaller tolerance value used for denominators in these solutions prevents
the solved-for coordinates from being mis-classified as "bad". The bad coord
resolution works on the assumption that its correcting points that are
co-located, but if the input coords were sufficiently large the linear
equations would have small denominators that were less than the fuzzy tolerance
and then the geometry would be improperly collapsed to a line.
For the selected zoom level of GM_crbug_10141204, this change is sufficient
to prevent the draw from being discarded. However, when animating the zoom
level, the input shape is sometimes still considered a fullscreen clear when
it shouldn't be. A follow up change will improve precision in CropToRect()
Bug: skia:9779, chromium:10141204
Change-Id: Id1518a908c03e7813868c4eff014d18388f8f62e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265976
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This is a reland of 77e1f84a84
Original change's description:
> Specialize SkRectanzier to SkRectanizerSkyline
>
> It looks like the pow2 rectanizer has never been used. Remove
> the unneeded abstraction for rectanizer everywhere.
>
> Change-Id: Iba33f1c6faf37201d03928ce8409751c212480a0
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265983
> Commit-Queue: Herb Derby <herb@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
Change-Id: I09729ba2b0e4b8b1a229fef4b95e65195b33fdc7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266180
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Change-Id: I5b306b15070899d0091b974b09869ff50dcd9c7e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265980
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Bug: skia:9817
Change-Id: I0cee480888a6e2da06d70750dbce9f98c7303516
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266197
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Bug: skia:9779, chromium:10141204
Change-Id: If075e04373a141343ce368c1b28a494047a396f9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265876
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This reverts commit 77e1f84a84.
Reason for revert: breaking google3 roll?
Original change's description:
> Specialize SkRectanzier to SkRectanizerSkyline
>
> It looks like the pow2 rectanizer has never been used. Remove
> the unneeded abstraction for rectanizer everywhere.
>
> Change-Id: Iba33f1c6faf37201d03928ce8409751c212480a0
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265983
> Commit-Queue: Herb Derby <herb@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
TBR=mtklein@google.com,herb@google.com
Change-Id: I2573534f3ea95c98d089f9c19b027564e77015db
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266116
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
8c396a9cc4..135f8fcba8
git log 8c396a9cc4a8..135f8fcba837 --date=short --first-parent --format='%ad %ae %s'
2020-01-23 syoussefi@chromium.org Vulkan: Remove inactive uniforms in the translator
2020-01-23 spang@chromium.org Vulkan: Fix setupDraw when VK_EXT_transform_feedback is not enabled
2020-01-22 courtneygo@google.com Vulkan: Fix cast of float to unsigned int for ARM
2020-01-22 syoussefi@chromium.org Vulkan: Line raster emulation through specialization constant
2020-01-22 sugoi@google.com Enable GL_NV_fence with Vulkan backend
2020-01-22 syoussefi@chromium.org Manually roll spirv-headers
2020-01-22 syoussefi@chromium.org Add support for layout(early_fragment_tests) in;
2020-01-22 syoussefi@chromium.org Row-major test: Clarify std140's stride calculation
2020-01-22 syoussefi@chromium.org Add support for non-float mix
2020-01-22 courtneygo@google.com Update expectations after dEQP test fixes
2020-01-22 jmadill@chromium.org Vulkan: Fix naming in CommandGraphResource.
2020-01-22 aleino@nvidia.com Reduce fail expectations dEQP-GLES31.functional.program_interface_query.buffer_variable.*
2020-01-22 aleino@nvidia.com Reduce D3D11 skips in dEQP-GLES31.functional.program_interface_query.buffer_variable.*
2020-01-22 sugoi@google.com Extensions suffixes
2020-01-22 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader 11cb891a01a2..b766e5e7fbf4 (1 commits)
2020-01-22 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/spirv-tools/src 323a81fc5e30..ab7ac60f14ae (1 commits)
Created with:
gclient setdep -r third_party/externals/angle2@135f8fcba837
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/angle-skia-autoroll
Please CC benjaminwagner@google.com on the revert to ensure that a human
is aware of the problem.
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md
Cq-Include-Trybots: skia/skia.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Bug: None
Tbr: benjaminwagner@google.com
Change-Id: I2f7ec6488a43da161cbb2251b92b3a2eb201ac36
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266067
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
It looks like the pow2 rectanizer has never been used. Remove
the unneeded abstraction for rectanizer everywhere.
Change-Id: Iba33f1c6faf37201d03928ce8409751c212480a0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265983
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This is similar to the earlier change to createProxy but needs to be done
for all the lazy ones as well.
Bug: skia:6718
Change-Id: I3f5721541929e2e3fbfa746b5a2c4221b1af5b49
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265960
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This also requires us to compute a scratch key from backend format instead of config.
Bug: skia:6718
Change-Id: I6bf4c5ba8188e354ddc5307ebf2ca10080df27cd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265768
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Change-Id: I2643a949d21bdacc7263f30d3a8b2ff9000929fc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265878
Auto-Submit: Ben Wagner aka dogben <benjaminwagner@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This makes creation of a compressed textures better parallel creation of uncompressed textures
This CL is pulled out of the parameter reordering CL - which has become too large.
Change-Id: Iabdaced780af206c2398e55986d3e7698a083342
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265582
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Also avoids loading coordinates into SIMD for the simple 2D case. This
moved the 2d bounds benchmark from 3.2us to 2.2us on my Windows machine,
but there was no movement on my Linux workstation (stayed ~2.2us on it).
This will regress the 3d bounds benchmark because there is a fair bit
more work that happens when any w < 0 (about 1/10 of the executions in
the benchmark). While the math for w > 0 stays the same as the old
code in projectedBounds(), that case still has the overhead of checking.
The regression is necessary since the prior "fast" 3d code was incorrect.
This does not fix the panorama case described in 224618, because that test
still uses anti-aliasing. However, with this change applied and forcing
non-AA, it draws correct albeit not smoothed. Further work will be needed
to safely handle AA inset/outsetting when the coordinates have w < 0.
Bug: skia:9779, chromium:224618
Change-Id: I3b7b052b448850ed098b6c819d3acb578437d2b2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265767
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Existing code in create_descriptor() has hard-coded removal of certain
font traits because of issues in recent operating system versions. [1]
With the arrival of a newer version of macOS there is yet another quirk
to be dealt with. [2]
Modify create_descriptor() to avoid problematic traits based on the
version of CoreText in use.
This is a temporary workaround until typefaces can be serialized instead
of relying upon identical selection in different processes.
[1] https://skia-review.googlesource.com/c/skia/+/158443/
[2] https://crbug.com/1018581
Bug: chromium:1018581
Change-Id: I4c4c675e77f15a092f4b738c932edfb0876efa27
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260346
Commit-Queue: Alan Screen <awscreen@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Modeled on https://codepen.io/adamdupuis/pen/qLYzqB, this GM creates a
cube of rectangles with the camera at the center. It animates the FOV
since the original chrome issue was most visible when resizing the page
(which then updated the fov of the perspective css transform).
This draws correctly with the raster backend. There are two issues it
causes with Ganesh:
1. The input coordinates of some of the cube faces have 0 or negative ws.
- When negative, the current bounds code does not perform clipping and
just uses the mirrored point, which leads to misleading bounds.
- When 0, the current bounds code produces infinities, and then GrOpsTask
discards the op with non-finite bounds.
2. The anti-aliasing code also ignores w <= 0, and so all of its screen
space math is incorrect.
This causes a mix of completely discarded draws and distorted draws on the
GPU backend.
Bug: skia:9779, chromium:224618
Change-Id: Ib00b909f51cbf7aaba5b89ed830ddc720ad3c73d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265763
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Remember this bug where things would draw completely
right then wrong then right then wrong in vertical
stripes, that boiled down to an inappropriate call
to vzeroupper before some Mac-specific stack checks?
At the time we thought it was limited to only AVX
code, but of course it applies to AVX2 as well.
This removes pinstripes from many GMs when at -O0.
Bug: skia:9709
Change-Id: I51bc347529b4e3b6c00db37f9cfa18230a614345
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265900
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
This reverts commit f79aacba2b.
Fix: had transposed when converting from colormatrix to m44
Change-Id: I6bc81d0c50bb1bf8d771e4dfa0c25c39de265b1e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265765
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Split off most shape layer components into own CUs (naming convention
following AE), and convert to new DiscardableAdapter pattern.
TBR=
Change-Id: Iba7800cff1998d3d7cf81dfd89b4193d02b59559
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265147
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).
More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
recipe_engine:
https://crrev.com/d5f7fbd67a6fb31d0491b5ba3e7f4a46c6668a37 Add autosubmit to recipes.cfg nontrival roll options (agable@chromium.org)
TBR=borenet@google.com
Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: Idf95154833a2ee3ffddbf920327dd561137b91dd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265898
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
This extensions adds PBOs but not new enum values for <usage>. Only the
ES2 enum values of STREAM_DRAW, STATIC_DRAW, and DYNAMIC_DRAW are valid.
Also change TransferBufferType to enum class.
Bug: skia:1040643
Change-Id: Id36808267a86548a25ac6c92f9b753c11764742e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265577
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Assert that the hb_codepoint_t passed to skhb_glyph_extents is in range
using SkTo, which is obviously correct (and consistently used elsewhere)
instead of the incorrect '< 0xFFFF' since 0xFFFF is a valid glyph id.
While doing so, rename the hb_codepoint_t parameters which are actually
glyph ids to reflect that they are glyphs and not codepoints (HarfBuzz
uses hb_codepoint_t for both).
Change-Id: I0bf2b7f12183dfb8254856b12168b8bee867c430
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265769
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Bug: skia:9814
Change-Id: I6c78ac3fdf8c4b2abb111d68801779a01ed259d3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265766
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>