Previously, we would emit nothing at all, but that is not actually
valid if the Block is a child statement (e.g. the body of a loop).
Now we emit braces for empty blocks, even if the block was unscoped.
Change-Id: I456a8d7d306a3e59d85e39f80b9f15fe3347ea19
Bug: skia:11218
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/359562
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
This reverts commit 1eea1ea8c1.
Reason for revert: fixed implicit copy cons
Original change's description:
> Revert "Write pixels goes through GrRenderTask system."
>
> This reverts commit 27efe6cb1e.
>
> Reason for revert: wasm compile
>
> Original change's description:
> > Write pixels goes through GrRenderTask system.
> >
> > The specific motivation is to remove some uses of GrResourceProvider
> > making textures with data in lazy callbacks. But it's a general
> > improvement that could allow use cases like writePixels in DDL
> > recordings.
> >
> > Bug: skia:11204
> >
> > Change-Id: Ic55c3f75976a1d3a7d93981e21be75a3053ef069
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356845
> > Reviewed-by: Adlai Holler <adlai@google.com>
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
>
> TBR=bsalomon@google.com,adlai@google.com
>
> Change-Id: I116caf1e4dd9015270b9d4f810bd26e0e30a6497
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:11204
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/359559
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,adlai@google.com
# Not skipping CQ checks because this is a reland.
Bug: skia:11204
Change-Id: I7d8f92415995f03301ffb147500d972e6bd17640
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/359561
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Adds a new op, GrPathStencilFillOp, that is a greatly simplified
rewrite of GrPathTessellateOp without inner fan triangulation. This op
is a very simple Redbook method built on tessellation. For now we
leave GrPathTessellateOp as-is. The next CL will change it to do inner
fan triangulation exclusively.
Bug: skia:10419
Change-Id: Ia67f4ab038a541e6454f5bf304ecd3c1d8805427
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/357138
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
and add a default implementation of onResetContext (which only the GL backend implements)
Change-Id: I20bb4cd2a60dba3200fc8ef4c9e4fd6a9f54ceef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/359497
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
It turns out previous builds may leave root-owned
files in the work cache, and sometimes those
contain '.fp' files, which touch will fail on, since
the recipe doesn't run as root.
Solution is to restrict 'touch fp files' to the src/ subdirectory.
Change-Id: Ic0d70a67548ec66dbd1d3905fd1cacfadde181f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/359496
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
While loops and do-while loops remain untested in dm, as they are not
supported in ES2 (and therefore not available in Runtime Effects).
Change-Id: I2f1bfccccd571cc4ced096bc18ebbb9ecc9f9b4a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/359556
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>
Change-Id: I4e771083e90f3c60b61f7ce7c8e6697e7bf7c7e1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/358518
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
In most cases, this works properly and a `;` is emitted, but in one
particular case (int x, y;) we get nothing.
Change-Id: If88d92502f6a533284dd4e0f78daedaf1481ff3d
Bug: skia:11218
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/359558
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>
This reverts commit 27efe6cb1e.
Reason for revert: wasm compile
Original change's description:
> Write pixels goes through GrRenderTask system.
>
> The specific motivation is to remove some uses of GrResourceProvider
> making textures with data in lazy callbacks. But it's a general
> improvement that could allow use cases like writePixels in DDL
> recordings.
>
> Bug: skia:11204
>
> Change-Id: Ic55c3f75976a1d3a7d93981e21be75a3053ef069
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356845
> Reviewed-by: Adlai Holler <adlai@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,adlai@google.com
Change-Id: I116caf1e4dd9015270b9d4f810bd26e0e30a6497
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11204
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/359559
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
The specific motivation is to remove some uses of GrResourceProvider
making textures with data in lazy callbacks. But it's a general
improvement that could allow use cases like writePixels in DDL
recordings.
Bug: skia:11204
Change-Id: Ic55c3f75976a1d3a7d93981e21be75a3053ef069
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356845
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Document why mask gamma, optical sizing, and contrast hacks are used and
where. In addition to documentation this also justifies where contrast
settings should be placed in the API.
Change-Id: I8c67d800a95e62360a88c815d3224e0c05ed65c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356305
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
In GLSL and SkSL, control statements don't require explicit braces
around single-statement children. That is, the `match = true` child
statement here doesn't need to be braced.
if (condition) match = true;
Because there are no braces, we never create a Block or a dedicated
SymbolTable here. This is normally not a problem, but the fuzzer
discovered that it can dump things into the symbol table inside a child
statement:
if (condition) int newSymbol;
This becomes problematic because the symbol name now outlives its block.
This means `newSymbol` can be referred to later, which should be illegal
(and can cause the optimizer to blow up since the structure is bogus).
There doesn't seem to be any reason to allow this code to compile; the
user can add an explicit scope here to make it reasonable, and it's
(almost) meaningless to declare a symbol that's instantly going to fall
out of scope. This code is now rejected with an error message.
Change-Id: I44778e5b59652d345b10eecd4c88efbf7d86a5e0
Bug: oss-fuzz:29849
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/358960
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Change-Id: I94094be7163a04bf48e86406230156a5433469b6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/359140
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>
Change-Id: I924ac75b5f8a397f7af7a06925ef0c9deba5c509
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/359141
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>
Change-Id: I8309940f8e40d0e84847ae272830896d010c39de
Bug: skia:11219
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/359138
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>
This reverts commit 233de6d8cd.
Reason for revert: Broken on Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-SafeStack
http://screen/jspPGaptrHtKkMp
/mnt/pd0/s/w/ir/build/dm: symbol lookup error: /mnt/pd0/s/w/ir/build/dm: undefined symbol: _ZNSt3__111__libcpp_db10__insert_cEPvPFPNS_8__c_nodeES1_S1_S3_E
Original change's description:
> Reland "Enable _LIBCPP_DEBUG in Clang for non-Xcode-based debug builds."
>
> This is a reland of 9eb89bac85
>
> Original change's description:
> > Enable _LIBCPP_DEBUG in Clang for non-Xcode-based debug builds.
> >
> > Unlike _GLIBCXX_DEBUG, this is meant to not break the ABI.
> > The libc++ bundled with Xcode does not contain debug symbols so we need
> > to disable these checks on Mac/iOS.
> >
> > Change-Id: Ie4f18e247db9c405b2ce45f388c41dcac8104815
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297874
> > Commit-Queue: John Stiles <johnstiles@google.com>
> > Auto-Submit: John Stiles <johnstiles@google.com>
> > Reviewed-by: Mike Klein <mtklein@google.com>
>
> Change-Id: I3583ae9d9b8e2e0ea88ff5be6b5b784e7e10c7e2
> Bug: skia:10410
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/359117
> Commit-Queue: John Stiles <johnstiles@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
TBR=mtklein@google.com,johnstiles@google.com
Change-Id: I95d03d70c5ebb04d940f1a8bd28da1b2ad9343ec
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10410
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/359416
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
The prior CL 358522 was reverted due to relying on
moving SkArenaAlloc which does not work.
This folds in cleanup CL 358156 also.
Bug: skia:10877
Change-Id: I0a29848f0fccb7d6a8f18d307b9f6b6a0311c83a
Cq-Include-Trybots: luci.skia.skia.primary:Build-Debian10-EMCC-wasm-Release-WasmGMTests
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/358527
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Enables use of text as a clip path.
Bug: skia:10840
Change-Id: I9de40e23696083e8cdd7e0b82221da3f3c36ac8b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/358533
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
This is a reland of 9eb89bac85
Original change's description:
> Enable _LIBCPP_DEBUG in Clang for non-Xcode-based debug builds.
>
> Unlike _GLIBCXX_DEBUG, this is meant to not break the ABI.
> The libc++ bundled with Xcode does not contain debug symbols so we need
> to disable these checks on Mac/iOS.
>
> Change-Id: Ie4f18e247db9c405b2ce45f388c41dcac8104815
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297874
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
Change-Id: I3583ae9d9b8e2e0ea88ff5be6b5b784e7e10c7e2
Bug: skia:10410
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/359117
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Splitting its name in half makes it difficult to find when searching the
codebase, for almost no benefit.
Change-Id: I6f1558558bfc6801c19a12116324c35f42111442
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/359136
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
3c3b82abcf..9bbcd86ae7
2021-01-25 jmadill@chromium.org Capture/Replay: Fix instanced array client data.
2021-01-25 syoussefi@chromium.org Vulkan: autogen for SPIR-V instruction build and parse
2021-01-25 amy.liu@arm.com Compression of the data from vkGetPipelineCacheData.
2021-01-25 jmadill@chromium.org Capture/Replay: Apply skips correctly on SwS.
2021-01-25 jmadill@chromium.org Trace Tests: Add xvfb command line option.
2021-01-25 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from a0047c0f6ec8 to dbc46e43978b (5 revisions)
2021-01-25 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 9441aea16221 to 413f7cb17c77 (2 revisions)
2021-01-25 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 318dff1807ef to 8378a463e1a2 (643 revisions)
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 nifong@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: nifong@google.com
Change-Id: I8757753578cd896aa0360c50214772a3f1d7be0e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/359240
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
The previous change caused varDeclarations() to sometimes return an
expression-statement. This only made sense in the context of being
called from Parser::statement(). Other places which called
varDeclarations() expect vardecls and nothing else.
Change-Id: I562657cadfa20dcd77b527f2dc43dca0c6bf389f
Bug: oss-fuzz:29845
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/358528
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
This reverts commit f619079545.
Reason for revert: Some bots unhappy.
Original change's description:
> Fix field access and indexing of complex expressions
>
> Evaluating either kind of expression now works like all other
> expressions - evaluate the inner part, then work with the resulting
> values. Added unit tests for both of these that previously failed.
>
> With this change, writeVariableExpression is only used for
> VariableReference expressions, so adjust that, too.
>
> Bug: skia:11178
> Change-Id: Ia595be473b55f4bb03ec25897f9929835177257c
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/358529
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
TBR=mtklein@google.com,brianosman@google.com,johnstiles@google.com
Change-Id: I56776139f9164b24b35a93307774e9b12c50054e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11178
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/358959
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Part of the larger work to remove drawImage from canvas (and in general
simplify our apis w.r.t. older patterns like skbitmap).
Change-Id: If208927e1d46256519036c42e68aec3d3c809a82
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/358836
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Comparing sqrt(5) against a variable containing sqrt(5) was not working
properly in some versions of Android running Vulkan.
Change-Id: I4f6bbff78a9ba56ec6e222f2037d66b13e3cd635
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/358530
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: I59821d748768d74b251d9339787f193c23e3d4dc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/358526
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
Evaluating either kind of expression now works like all other
expressions - evaluate the inner part, then work with the resulting
values. Added unit tests for both of these that previously failed.
With this change, writeVariableExpression is only used for
VariableReference expressions, so adjust that, too.
Bug: skia:11178
Change-Id: Ia595be473b55f4bb03ec25897f9929835177257c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/358529
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This is a reland of f5aed172c6
Original change's description:
> [infra] Use Mac10.15.7 and xcode12.3 for all builds.
>
> Bug: skia:11129
> Change-Id: I314d51988e4cafc9dfea60bc70a57f46faa8666a
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345396
> Reviewed-by: Eric Boren <borenet@google.com>
Bug: skia:11129
Change-Id: I00bca0407ff7522bafca3f4e4e0aa92c239043fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/353036
Reviewed-by: Eric Boren <borenet@google.com>
This is a reland of 4ecab92584
This reland folds in subsequent code cleanups and disables a test that
failed on Android + Vulkan.
Original change's description:
> Run unit tests to verify SkSL folding behavior.
>
> The unit test loads SkSL source files from `resources/sksl`, compiles
> the code, and uses SkRuntimeEffect to render a pixel using the effect.
> If solid green is rendered, the test passes.
>
> Change-Id: I2ccb427a907975ae84aee19d8e68d774b2cb638c
> Bug: skia:11009
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/355983
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
Bug: skia:11009
Change-Id: I09196c8ca3041e8957324a0cbb7f7d6963c6e4e7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/358523
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
There are SkColorTypes (e.g. kBGR_101010x) that don't have Gr equivs.
When a SkPixmap is converted to GrPixmap we will have a kUnknown color
type.
Bug: chromium:1164705
Change-Id: Iefa2c8363582433a531c5501aa251c571b5a6eab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/358521
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>