Commit Graph

51926 Commits

Author SHA1 Message Date
Michael Ludwig
466e7e88d3 Hide SkCanvas::AutoValidateClip in cpp file
Bug: skia:9283
Change-Id: I1f808ec9d004f228b17a139dff7a2f44676baf50
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335856
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-11-18 20:56:15 +00:00
Michael Ludwig
47d5ba9638 Fix SkRegion::setPath to respect inverse fills when path isn't finite
This maintains the status quo around clipping calls with non-finite
paths.

Bug: skia:9283, skia:10970
Change-Id: I99cda50a7117464c12ca7d3409ed6b4892863ec8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335826
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-11-18 20:47:20 +00:00
Michael Ludwig
5013d957f3 Rename fDeviceClipBounds to fQuickRejectBounds
This better differentiates it from device clip bounds, and the fact that
the stored bounds have been outset by 1 to account for AA, and are only
used for quick reject purposes.

Bug: skia:9283
Change-Id: I47420f23b74e47626596f978c78f01d7d97ae808
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335828
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-11-18 20:37:55 +00:00
Brian Salomon
94584f4574 Remove unused macros from GrGLConfig.h, GrGLConfig_chrome.h, and scripts
Change-Id: I5a9e7d490fd71f326ac37a72eb942fc64f557733
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335666
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-11-18 20:23:35 +00:00
Michael Ludwig
408959f24c Track AA-ness and rect-ness in SkConservativeClip
This is needed so that SkNoPixelsDevice can switch to using
SkConservativeClip and more fully implement the SkDevice API.

Tracking the AA-ness allows SkCanvas/SkDevice::isClipAA() to be more
accurate; previously for recording canvases, it always returns false.
Technically, it will still return false after this CL until
SkNoPixelsDevice is updated to use SkConservativClip's new AA tracking.

Tracking whether or not the clip shape remains an intersection of rects
is similarly meant so that SkDevice's getClipType and
SkCanvas::isClipRect are more accurate. Without this tracking,
SkNoPixelsDevice always claimed the clip was a rectangle. This is not
accurate, even if all it needs to otherwise track is the bounds of the
more complex shape. We got away with it because it doesn't seem to be
critically relied on during any recording steps of clients.

Bug: skia:9283
Change-Id: I3acde969aca9d7eb97a7e1c7ab8374e7230b04fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335825
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
2020-11-18 19:56:35 +00:00
Mike Klein
e08eb75bbe allow JIT on ARM Mac
`viewer --slide GM_runtimecolorfilter` improves 10->3ms.

Change-Id: Iab079ddbdc93fdc406372899b26dc7de223855fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335917
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-11-18 19:50:15 +00:00
John Stiles
57adba0959 Fix worklist files with skslc.
Previously, the worklists were being deleted as soon as they were
closed; by the time skslc executed, they were already gone.

Change-Id: I0d0be87525093a3ff37421cbff553fa481c8e1f5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335864
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-11-18 19:41:45 +00:00
Adlai Holler
f42994335f Remove GrDrawingManager::fActiveOpsTask ivar
This thing is just extra state tracking we don't need. Also
update a couple out-of-date comment blurbs around there.

Bug: skia:10877
Change-Id: Ibd41afd34d85d52a3d9ebb98e700f5ce9ed3fffb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335276
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2020-11-18 19:30:05 +00:00
Florin Malita
c743164d30 [skottie] More robust font style parsing
- both weight and slant are optional
  - handle arbitrary whitespace separators
  - case insensitive keys

Change-Id: Iadd3a43167cd71654d7578549bd331fde243c28f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335822
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2020-11-18 19:16:45 +00:00
Christopher Cameron
75ae8fcc31 Remove unexpected color conversion in GrSurfaceContext::readPixels
One of the branches of this function creates a temporary
GrSurfaceContext and (recursively) calls readPixels on that object.

In the case that canvas2DFastPath is true, this GrSurfaceContext is
given nullptr as its color space. This value historically mean to
do no color conversion, but now is interpreted as sRGB.

Consequently, if the content being copied is not sRGB, this will
introduce a conversion from sRGB to the content's color space, which
will result in incorrect pixel values being read.

Bug: skia:10965 chromium:1115317
Change-Id: I62b7edb728f0dbefa9a5a9c60905dee0cde6455a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335738
Commit-Queue: Christopher Cameron <ccameron@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-11-18 18:33:45 +00:00
Brian Osman
7b239054d9 Revert "Replace skslc worklist files with -- delimited command lines."
This reverts commit 3e1b771ce4.

Reason for revert: Not working on Windows.

Original change's description:
> Replace skslc worklist files with -- delimited command lines.
>
> Command lines with delimiters are a simpler approach; they don't require
> a scratch file to be created and parsed. (I didn't consider this
> approach until after implementing worklists.)
>
> This also fixes a minor issue with result codes when processing multiple
> files at once; in particular, unit tests can ignore compile errors, but
> regular fragment processor compilation should treat compile errors as
> fatal and stop the build.
>
> Change-Id: I3f153e7670d757c6b021bf60a260a2cd3f2090aa
> Bug: skia:10919
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/334428
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>

TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: skia:10919
Change-Id: I0e4bae8a8e09c61eac4e79453fd38e5e81b29e89
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335858
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-11-18 18:02:25 +00:00
Herb Derby
c59e4486d5 use the DirectSubRun to size the arena
The alloc size calculation is over estimating the size needed.
It should be using DirectSubRun::DevicePosition, which is
4 bytes, instead of the size of the union of the different
sub run types which is 12 bytes.

The DirectSubRun is by for the most common case.

Bug: chromium:1147712

Change-Id: I972b5f4e716448fc72c64204c88fbaa373043392
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335669
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-11-18 17:54:25 +00:00
Kevin Lubick
ae0d3ffe6d [canvaskit] Document and tweak MakeImage API
Change-Id: I84b8bc8b84e0b79ea4a8a6b53bb3358e0ec9c138
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335665
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2020-11-18 17:43:56 +00:00
Herb Derby
90f211f46b calculate glyph offset using (0,0) mapping
This code has rotted a bit. The glyph off set is now calculated
by mapping (0,0) through the current matrix, and the initial
matrix, and taking the vector difference. Residual is no longer
needed and all the plumbing can be removed.

Change-Id: I20b56afc6749fd26fe283a7ff22f38951da0e6f5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335823
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-11-18 17:18:45 +00:00
John Stiles
108bbe2522 Optimize away swizzles on single-argument constructors.
The optimizer can now turn the expression `half4(1).xyz` into
`half3(1)`, or `half4(1).w` into `1`. This is actually a somewhat common
case when inlining chains of fragment processors, as inputs are often
overridden to `half4(1)` or `half4(0)`. This optimization also applies
to more complex cases, e.g.:

     `half2(anyFunc(sqrt(2))).yxyx` --> `half4(anyFunc(sqrt(2)))`

Since the interior of the constructor is always evaluated once in either
case, it does not actually matter what the constructor contains.

Change-Id: I8d5f358502eaa8e35d4968e74fbd6b0ce2ab6365
Bug: skia:10954
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335818
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-11-18 17:02:45 +00:00
Brian Osman
8dbcebac34 Remove (unused) SkSL::NodeArrayWrapper
Change-Id: Ibe3c3d27a112df8838bc86d6c2482277fdae62af
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335821
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2020-11-18 16:56:15 +00:00
Tyler Denniston
79832e3151 [svg] Parse "inherit" generically for SkSVGProperty
This generic parsing will allow us to later remove kInherit and
"inherit" parsing from all other specific SVG types.

Also convert "filter" presentation attribute to new-style parsing
for compatibility with the setter.

Change-Id: Id917e12d77cdefb1a8f1404cac1e0c4e486d8b53
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335660
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2020-11-18 16:51:55 +00:00
Brian Osman
fb964a40f1 SkSL: Preserve coerced types of literals during dehydration/rehydration
Fixes a bug with ternary expressions in the pre-includes.

Change-Id: Ib277ce7d9f6a50ab3ee02610746af2672208afde
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335820
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-11-18 16:27:25 +00:00
Brian Osman
0540efe78a Remove nullptr default Type from IntLiteral
This was slightly dangerous, and only used for tests. Fix the tests to
just put a Context on the stack.

Change-Id: Ifc3d600c3498e1dedeee8350f3284163f3195bec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335819
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-11-18 16:14:35 +00:00
Nathaniel Nifong
ffc7a21490 update externs for debugger_bindings.cpp
include minVersion function in externs

Change-Id: I4789240fb5f2dac701d948d8cacc997c7bcf444b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335640
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-11-18 16:09:14 +00:00
Brian Salomon
fcc4e85f3c Remove SkYUVAInfo::PlanarConfig
Bug: skia:10632
Change-Id: I72b4379c82fd7dc4c7169387014f8fffbb86e23f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/334161
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-11-18 14:26:14 +00:00
Robert Phillips
9ef7e206b9 Remove friending between GrRenderTask and GrDDLTask
Change-Id: Ic60753fbffab7cbe4dde6834f80bfd83bdaaa5c9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/333461
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-11-18 12:39:24 +00:00
Robert Phillips
a186c35574 Update the TopoSort test ...
... to ensure that, if the topological sort fails, all the nodes still appear in the result.

Change-Id: Ic4acaab2662c872662246b7c1f5471e17c5ba98e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335639
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-11-18 12:39:15 +00:00
Kevin Lubick
2efafe688d Fix debugger auto-deploy
Change-Id: If13899402363059ba2950c955b71077dfe3a2f60
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335656
Reviewed-by: Ravi Mistry <rmistry@google.com>
2020-11-18 12:26:40 +00:00
skia-autoroll
a1112b326a Roll Dawn from f2bc3b3edd6f to a0758a1aef12 (5 revisions)
https://dawn.googlesource.com/dawn.git/+log/f2bc3b3edd6f..a0758a1aef12

2020-11-18 jiawei.shao@intel.com D3D12: Only enable toggle 'use_dxc' when Dawn can load DXC DLLs
2020-11-17 cwallez@chromium.org Use hermetic XCode on Dawn standalone builders.
2020-11-17 cwallez@chromium.org Stop setting mac_xcode_version in DEPS
2020-11-17 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 4ad0019df0f0 to 90f32536458a (17 revisions)
2020-11-17 cwallez@chromium.org Use smart Refs for IOKit and CoreFoundation objects.

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dawn-skia-autoroll
Please CC kainino@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/+doc/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn
Bug: None
Tbr: kainino@google.com
Change-Id: I9a752c55d3314a6138cc2abdb17719a8bbb98b01
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335674
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-11-18 04:57:44 +00:00
skia-autoroll
ed771cb644 Roll ANGLE from 4f96bf19941b to 2ffff6d024c7 (21 revisions)
4f96bf1994..2ffff6d024

2020-11-17 syoussefi@chromium.org Vulkan: Support image buffers
2020-11-17 cclao@google.com Vulkan: Experimental: forcing highp to mediump in fragment shader.
2020-11-17 syoussefi@chromium.org Default deqp to Vulkan on !Apple
2020-11-17 kainino@chromium.org Add TODOs for Apple DTK skips; update bug urls
2020-11-17 m.maiya@samsung.com Vulkan: Add EXT_external_buffer support
2020-11-17 kainino@chromium.org Disable more tests for Apple DTK (macOS ARM)
2020-11-17 m.maiya@samsung.com Vulkan: Add GL_EXT_separate_shader_objects support
2020-11-17 m.maiya@samsung.com Vulkan: Add EXT_separate_shader_objects entry points
2020-11-17 thakis@chromium.org Stop setting mac_xcode_version in DEPS
2020-11-17 syoussefi@chromium.org Vulkan: 270 degree prerotation deqp expectations
2020-11-17 syoussefi@chromium.org GL: Support OES_shader_image_atomic
2020-11-17 syoussefi@chromium.org Vulkan: Support texture buffers
2020-11-17 syoussefi@chromium.org Use 0 as special value for glTexBuffer instead of UINT_MAX
2020-11-17 angle-autoroll@skia-public.iam.gserviceaccount.com Roll VK-GL-CTS from 9e07e4424cd4 to 4fe17f3425ee (12 revisions)
2020-11-17 syoussefi@chromium.org Vulkan: Reuse GetBoundBufferAvailableSize in ProgramExecutableVk
2020-11-17 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from 9d3ef3258715 to 0cb8cc8cfcb2 (4 revisions)
2020-11-17 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from e4c1a25cc679 to 04515da400d5 (3 revisions)
2020-11-17 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 089f5a3ecbe4 to d8a3265375ff (384 revisions)
2020-11-17 syoussefi@chromium.org Vulkan: Make ImageViewHelper a Resource
2020-11-17 amy.liu@arm.com Fix flip info of colorBlit with pre-rotation.
2020-11-17 cclao@google.com Vulkan: Remove rotation related data from driver uniform

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 lovisolo@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/+doc/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-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
Tbr: lovisolo@google.com
Test: Test: ExternalBufferTestES31.*VulkanTest: Test: ProgramPipelineTest.GenerateProgramPipelineObjectEXT*
Change-Id: I2f539914f631b8655516fce6f4f73c9e16c7758f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335673
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-11-18 04:51:24 +00:00
skia-autoroll
77430e5598 Roll SwiftShader from 04515da400d5 to bb96f79d0e15 (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/04515da400d5..bb96f79d0e15

2020-11-17 capn@google.com Disable code generation optimization for MSan builds
2020-11-17 capn@google.com Switch Android to LLVM ORCv2 JIT and remove ORCv1 support

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/swiftshader-skia-autoroll
Please CC lovisolo@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/+doc/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: lovisolo@google.com
Change-Id: I1d22b300783e62106ba05128722d31770b1fd34d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335672
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-11-18 04:51:14 +00:00
Mike Reed
6aeb414df9 add staging flags
Change-Id: If3d9c2b9f490d89aaf49a971271059e95d784846
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335716
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-11-18 04:08:44 +00:00
Brian Salomon
8f46ecc84f Remove two YUV effect GMs: yuv_to_rgb_effect and yuv_nv12_to_rgb_effect.
These aren't testing anything that isn't tested more thoroughly in other
GMs. This avoids having to update them as SkYUVAInfo is used more broadly
in the GPU backend.

Bug: skia:10632
Change-Id: Id02604863f437666005b410213f5970426f1fa8e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335659
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-11-17 19:28:43 +00:00
Tyler Denniston
75c38f94ef [svg] Add SkSVGProperty class for presentation attributes
This CL adds a new SkSVGProperty<T,B> class and uses it instead of
SkTLazy for the presentation attributes. Ideally this will form the
foundation for improvements to our presentation attribute parsing
as well as correctness for inherited/non-inherited properties.

Change-Id: Ie1cdb3db9674c55376e127cc1a8b8cb303a1bd13
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/334837
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-11-17 18:11:24 +00:00
Brian Salomon
98e17bf01a Remove deprecated DDL promise texture image factories.
Bug: skia:10632
Change-Id: I218281256ea5ab4a5a5a7ea7bf209350082f8dc7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335038
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-11-17 17:28:23 +00:00
Ben Wagner
c634fc4a66 Remove FCLocker::Suspend.
It's a bad idea, difficult to reason about, and may be causing
deadlocks.

Change-Id: Id9749661f4f3f942ee983e9c1fdab2bd7f287edb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335242
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-11-17 17:11:03 +00:00
Herb Derby
5dfa02be69 tighten up device bounds for glyphs
Change-Id: I61655b9492bdaacc2c1d5c7631b2e67af2b46668
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335280
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-11-17 16:47:13 +00:00
John Stiles
e1bbd5c128 Disallow unsized array dimensions on size fields past the frontmost.
This was slightly complicated by the fact that this syntax indicates an
array with a known size:

    float[] x = float[](1, 2, 3, 4);

Of course, the size is 4; it's just never explicitly stated in the
code. (The SkSL parser never actually deduces the size, but it doesn't
apparently have a need to; we don't do much in the way of optimization
for arrays.) However, this prevents us from simply failing whenever we
parse "[]" in non-builtin code; we need to keep scanning and see if the
variable is initialized. We already check this in the
ArrayConstructors.sksl test file.

Change-Id: I5b86958e81bd9bf5edf28a617cecf95c1875583e
Bug: skia:10957
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335240
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-11-17 16:44:13 +00:00
John Stiles
08070f6f65 Report the correct line number when vardecls have an error.
Previously, the Type's fOffset was set to -1 during parsing, so any
errors related to the Type would be reported on line 1.

Change-Id: I9834f733bc763c5946b3ff81d8aef4807cdc13d1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335584
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-11-17 16:32:23 +00:00
Brian Osman
5035b8f92a Minor cleanup in the intrinsics GMs
- Renamed do_unary() to plot(). Originally intended to do higher
  dimension functions differently, but the 1D plot by varying some
  parameters is easier to look at and reason about, so all plots will
  follow this model.
- Added an optional label for the expressions that are getting really
  long. "smoothstep" was already overflowing, and the final wave of
  intrinsics (geometry and vector comparison) are going to all be long.

Bug: skia:10913
Change-Id: I69086152718c43e602755ddc9017b2a73fec5038
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335583
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-11-17 15:49:43 +00:00
John Stiles
1d75778cbf Disallow opaque types in structs and interface blocks.
This is a followup to http://review.skia.org/335196. This detects opaque
types (samplers and textures) at parsing or IR generation time and
reports an error regardless of backend. This check occurs before Metal
or SPIR-V would have a chance to detect the error, so it changes their
output to a slightly more focused error message. The Metal/SPIR-V fix in
the prior CL is still a nice broad catch-all for preventing spurious
ABORTs, though.

Change-Id: I4cce92a8767d72b5d3d7277a8afde8ce5ce86db2
Bug: skia:10956
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335217
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-11-17 15:25:43 +00:00
John Stiles
3b20936c50 Code cleanup: remove macros from AST node creation.
Perfect-forwarding can be used to implement CREATE_NODE as a templated
function instead of a macro. All the other macros were only necessary
because they were somehow entangled with CREATE_NODE.

(In the case of CREATE_EMPTY_CHILD I don't believe there was any
rationale for using a macro at all, other than maintaining parity with
CREATE_CHILD.)

Change-Id: Ic011e94d9712430cd4b82772dc449bc07e7f6bde
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335278
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-11-17 15:19:23 +00:00
Kevin Lubick
8c1cdeca9d Update Go Deps
Main impetus is to update Debugger autodeploy to be the lit-html version.

Ran the following commands from $SKIA_ROOT:
$ go get go.skia.org/infra@1e7e10cc95
$ make -C infra/bots train

Change-Id: I75f5d1d135530411e6a3068b18dde24bc61ee10a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335581
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
Auto-Submit: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
2020-11-17 15:16:53 +00:00
Adlai Holler
abe4518b4d Move GrOpsTask::addOp and addDrawOp out of header
Probably in here just as an accident of history. If the idea was
to make it inlineable – unlikely – then LTO can handle that.

Change-Id: I359eee153d36f1aa1bd5e01920393d882451c4f0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335579
Commit-Queue: Adlai Holler <adlai@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-11-17 15:13:24 +00:00
Adlai Holler
b1a6b97915 Remove bulk GrDrawingManager::appendTasks
This was removed in 334422 but got put back due to code
in that area dancing around and merging.

Change-Id: Ic9f51f8de92d3aa763ac6e3a8dc34397230260df
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335578
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2020-11-17 14:41:03 +00:00
Robert Phillips
88b2961e29 Connect DDL offsets in the testing harness to the new ddlTask
This connects these two CLs:

https://skia-review.googlesource.com/c/skia/+/333129 (Update DDL testing harness to support drawing DDL w/ integer offsets)
https://skia-review.googlesource.com/c/skia/+/334422 (Change UnrefDDLTask to just be the DDLTask (take 2))

It still doesn't work though bc it is missing backend support and flags on the tools to enable it.

Change-Id: I51e9c0d41689fce622222201280fb308f1679dcb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/333579
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-11-17 14:22:13 +00:00
Robert Phillips
fbbc3bbecf Move SkTTopoSort to src/gpu and rename it to GrTTopoSort
Change-Id: I76deff6bbb2d796cead0e9415c19daf5edceaa73
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335296
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-11-17 14:17:03 +00:00
Leon Scroggins
da3d8c2471 Reland "SkAnimatedImage: Use fSampleSize"
This is a reland of 4fdf9f9ce5

No change from the original, which was just reverted to be able to
cleanly revert its parent, which has now been relanded with a fix.

Original change's description:
> SkAnimatedImage: Use fSampleSize
>
> Bug: b/163595585
>
> This will allow using less memory when decoding an animated GIF by
> sampling at decode time. This is tested by the animated_image GMs.
>
> Change-Id: I748b2180827623e4ca1fc0fd4d6dd02733b3b5f2
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/333226
> Commit-Queue: Leon Scroggins <scroggo@google.com>
> Reviewed-by: Derek Sollenberger <djsollen@google.com>

Bug: b/163595585
Change-Id: I3249bd04b64750a50a4c5c787db3e80ac4d85e67
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335279
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2020-11-17 14:07:03 +00:00
skia-autoroll
abd73e2507 Roll SwiftShader from e4c1a25cc679 to 04515da400d5 (3 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/e4c1a25cc679..04515da400d5

2020-11-16 srisser@google.com Don't auto append value of stringified enums
2020-11-16 capn@google.com Work around LLVM ORCv2 issue affecting Cuttlefish
2020-11-16 capn@google.com Enable Reactor Print() in Debug/RelWithDebInfo builds

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/swiftshader-skia-autoroll
Please CC lovisolo@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/+doc/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: lovisolo@google.com
Change-Id: I11750145206292ca3cd2c807322650cef3a3b803
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335318
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-11-17 05:44:53 +00:00
skia-autoroll
610fadae06 Roll ANGLE from 60570b859f7c to 4f96bf19941b (15 revisions)
60570b859f..4f96bf1994

2020-11-17 m.maiya@samsung.com Remove duplicate entry of glProgramUniformMatrix4fvEXT in gl.xml
2020-11-16 syoussefi@chromium.org Vulkan: Optimize PBO copy from depth xor stencil src
2020-11-16 jdarpinian@chromium.org Remove trailing whitespace.
2020-11-16 geofflang@chromium.org GL: Implement EXT_YUV_target
2020-11-16 jmadill@chromium.org Vulkan: Fix serial handling for queries
2020-11-16 syoussefi@chromium.org Vulkan: prerotation deqp expectations
2020-11-16 syoussefi@chromium.org Optimize building prerotation deqp targets
2020-11-16 jmadill@chromium.org Vulkan: Remove RendererVk::getNextSubmitFence.
2020-11-16 syoussefi@chromium.org Vulkan: Expose OES_shader_image_atomic without VS/FS atomics
2020-11-16 jmadill@chromium.org Vulkan: Give CommandQueue an abstract interface.
2020-11-16 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Headers from 670ffea9d61b to 11c6670b4a4f (1 revision)
2020-11-16 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from 1cda495274bb to 1f2fcddd3963 (2 revisions)
2020-11-16 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from 128608f6da3a to 9d3ef3258715 (31 revisions)
2020-11-16 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 28c8eb1aa6b4 to 089f5a3ecbe4 (514 revisions)
2020-11-16 xiaoxuan.liu@arm.com Vulkan: Add support for headless surface

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 lovisolo@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/+doc/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-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
Tbr: lovisolo@google.com
Change-Id: I18859937deadc670842d5c0f7793075db43e4ffe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335456
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-11-17 05:04:13 +00:00
skia-autoroll
a0485315fc Roll Dawn from 575729e8dd25 to f2bc3b3edd6f (5 revisions)
https://dawn.googlesource.com/dawn.git/+log/575729e8dd25..f2bc3b3edd6f

2020-11-16 enga@chromium.org Print warning if errors occur and no error callback has been set
2020-11-16 cwallez@chromium.org Metal: Wrap NS classes and protocols in NSRef.
2020-11-16 enga@chromium.org Remove --skip-validation test flag from Dawn tests
2020-11-16 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from e5e961722054 to 4ad0019df0f0 (1 revision)
2020-11-16 rsesek@chromium.org Use the correct GN variable for the Mac deployment target.

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dawn-skia-autoroll
Please CC kainino@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/+doc/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn
Bug: None
Tbr: kainino@google.com
Change-Id: I0e4ea0fb23d75f2b3c191e20908557a38566ef85
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335457
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-11-17 04:54:23 +00:00
Nathaniel Nifong
1ce8964db1 Move SKP version extraction into JS
two reasons:
1. It prevents any crash during reading from prevening a version number being returned from wasm.
2. It lets me use a common solution for reading a version number from SKP files and MSKP files.

bug:skia:10832

Change-Id: Icad27690aac9d614d72140ea4b88b350faf21a4f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/334897
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-11-16 22:54:20 +00:00
Julia Lavrova
ee33a3a072 Added SK_PARAGRAPH_LIBTXT_SPACES_RESOLUTION to flutter_defines.gni
as a reminder that what we do here is not right and we only need it
temporary for Flutter.
Bug: skia:10715

Change-Id: I186edd3f761db72d2973c1128e0d95a78bd332f7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335220
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2020-11-16 22:11:20 +00:00
Herb Derby
396974683c clip more cases using the CPU allowing more op merges
In desk_gmail.skp, the clips are marked as AA, but are
actually integer bounds. Check for this case and clip
using the CPU. The big benefit for this is that during op
merging the applied clips are nullptr, which allows many more
cases to merge.

Change-Id: Idd000c325da60767b18e22a20cb4afa1c0dd798f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335052
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-11-16 20:19:38 +00:00