We also fix getReadSwizzle with this change.
Change-Id: I1989d8347dc97d7a4c75aa9094a0146419c6d8fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295819
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This new api will eventually replace the version that takes an
SkSurface::BackendAccess.
Change-Id: I48cd013725e14027f386b0b111223459944ac44a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295567
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
(This is a simple reland of
https://skia-review.googlesource.com/c/skia/+/293272
and is functionally unchanged, but needed to be reconstructed
manually because JavaInputStreamAdaptor.cpp was deleted.)
SK_ABORT was already using SkDebugf to print the error message to the
console, so all the moving parts were there. This CL just adds a
mechanism for the calling code to pass in arguments.
Added a use case to demonstrate usage--when an allocation fails, the
requested size is now shown in the error message.
Change-Id: If8600a9febad15b7c8b7a04479a1d92442521f21
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294705
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Bug: skia:10139
Change-Id: I11de91c243ac1eeb0ad1ea580670add6229dbe41
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296041
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Clang doesn't like it when operator| is applied to two different enum
types.
Additionally, fixed some nearby line wrapping.
Change-Id: I77190c9bc91b53ebc38d184d73a6a244b8f34ce9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295795
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Options used to rely on an external call to SanitizeOptions to
ensure they were correct. Now that defaults are set directly,
make sure that the values coming in make sense.
Change-Id: If6cfc027722b6a7717a920b482ec5be8f7526367
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296040
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This CL avoids the JNI complexity of reading the Java InputStream in
C++. Instead, the stream is read into memory (or mmap'd) in Java and
the resulting ByteBuffer is passed to the native code to be wrapped
in a SkData object.
Change-Id: Iba4e41999da03481188434ddfbbff2d7bd741edd
Bug: skia:10310
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295820
Commit-Queue: Ben Wagner <bungeman@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Stan Iliev <stani@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
This table is really hot during drawing and we saw a regression when
it was introduced. This change provides wins locally but I don't have
the regressed hardware handy.
Additionally, we change from SkGoodHash to the MixCheap function used by
some other small tables in the library.
Bug: skia:10372
Change-Id: Ic2dfbf41649515245e82cbcc9765cb29270eb5cf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295878
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Change-Id: I25e4626f55ce42aa505ae1760c3461a77e4a6ac0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296042
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Can't touch high pointer bits on some archs.
Bug: skia:10376
Change-Id: I7488c90f84165820ce285895e9ca6805adfcac82
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295883
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This updates an existing test and adds a new one to make
sure we don't regress.
Change-Id: If94eb3fb205852750d6fb9483e20c07d88b4da10
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295560
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Bug: skia:10139
Change-Id: I118308eab5f1b7bdd5be265f668185c912153102
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296036
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Change-Id: I93c986c29a6bf4adbc03c0715b89f809b4ad4ddc
Bug: chromium:1093902
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296039
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This is a reland of a25422faa4
Original change's description:
> Fetch clang-format automatically when compiling .fp files.
>
> On a freshly fetched repo, setting `skia_compile_processors = true` will
> fail to compile because clang-format is missing from the bin directory.
> This CL automatically runs fetch-clang-format for you when clang-format
> is absent.
>
> Change-Id: Ieeb359176072e92ca235316c820310333732f608
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295780
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
Change-Id: Ib397716771f742f192ebd6ed7ec0a9915b2400c5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295956
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Change-Id: I0e9fe683950ec4905a8bdaa2e965f7bc0287b91a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295918
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
db3ef87243..ff2ebce4b2
2020-06-12 syoussefi@chromium.org Vulkan: allow texture copies from one mip to another
2020-06-12 syoussefi@chromium.org Vulkan: Apply SPIR-V optimization to internal shaders
2020-06-12 syoussefi@chromium.org Move lod-sampling shaders to shader utils
2020-06-11 syoussefi@chromium.org Vulkan: Better handling of texture level redefinition
2020-06-11 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from c01f826bc67f to 458140aed907 (2 revisions)
2020-06-11 jmadill@chromium.org Run TracePerfTests in WGL configs.
2020-06-11 timvp@google.com Update State to check mExecutable
2020-06-11 etienneb@chromium.org Implement a WorkerPool delegate to execute background task (1/3)
2020-06-11 jmadill@chromium.org Minor cleanup to PostSubBuffer sample.
2020-06-11 angle-autoroll@skia-public.iam.gserviceaccount.com Roll glslang from 68b2e15ee016 to b919bc889e1d (3 revisions)
2020-06-11 cclao@google.com Vulkan: Initialize stencil ops with DontCare for color attachments
2020-06-11 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from 8b92af3fd83f to 5fab7f82a548 (5 revisions)
2020-06-11 timvp@google.com Add android:exported to AndroidManifest.xml
2020-06-11 syoussefi@chromium.org Vulkan: Reduce ConvertVertex.comp variations
2020-06-11 tobine@google.com Vulkan:Adding key perf trace markers
2020-06-11 shabbyx@gmail.com Vulkan: add autogen dependency to shader variations files
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 bungeman@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
Bug: chromium:1084580,chromium:1091259
Tbr: bungeman@google.com
Test: Test: CQTest: Test: end2end tests listed above
Change-Id: I5fa3b1ff5a64dd1877b47fecc0a8a708cad92f00
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295915
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
If GrClips know their dimensions then getConservativeBounds() does not
need any arguments and isRRect() can remove its rtBounds argument.
I also updated GrFixedClip to report the render target bounds as a
degenerate rrect in its isRRect implementation if it was wide open. Its
apply() function was also simplified to take advantage of the prior
GrScissorState work where the rectangle was always valid to access and
contained within the render target bounds.
Change-Id: I627b97976cb176b1c80627462027034b06ad2cb2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290957
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This CL is not fully comprehensive; for instance, it does not contain
fixes for backends that don't compile on Mac. But it does resolve the
vast majority of cases that trigger -Wimplicit-fallthrough.
A few minor bugs were found and fixed, but none that were likely to
affect normal operation.
Change-Id: I43487602b0d56200ce8b42702e04f66390d82f60
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295916
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This reverts commit fb5ede576d.
Reason for revert: major performance regression due to constant shader recompilation
Original change's description:
> fixed sample(..., matrix) with runtime effects
>
> Change-Id: Id5b7f1b5e992c587be000e112706bedfe00c90fd
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294697
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
TBR=bsalomon@google.com,brianosman@google.com,ethannicholas@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: Ica8322e0eab8f00bfc1d4f6d33778eb6493b278f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295835
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
The old factories (makeShader) will behave as before: they will inherit
the filter-quality from the paint.
The new factory takes an explicit filter setting, and will use that
regardless of the paint.
Big follow-ups:
- update callers to not rely on setting in SkPaint
- revise/enhance settings in imageshader
- settings for scaling up and down
- control over trilerp, etc.
- other: 4x4 kernels? trilerp bias?
- move mipmaps to always be explicit requests a SkImage factory time
Bug: skia:10344
Change-Id: If87b06d4fd6eafd8b9cdecda7c00d69897066ef8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295086
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
CCPR stroking is not enabled by default and will eventually be
removed. This CL is a step toward migrating it to an MSAA version.
Change-Id: I565bea1c91c51bcd1ea3766aee6e4702adf3b09e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295608
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This will also expose the Vulkan precompilation path to immutable samplers.
Change-Id: Ida31bd70455299fbcc8f4d728aa15179f7685311
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295799
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This reverts commit a25422faa4.
Reason for revert: breaks Windows build
Original change's description:
> Fetch clang-format automatically when compiling .fp files.
>
> On a freshly fetched repo, setting `skia_compile_processors = true` will
> fail to compile because clang-format is missing from the bin directory.
> This CL automatically runs fetch-clang-format for you when clang-format
> is absent.
>
> Change-Id: Ieeb359176072e92ca235316c820310333732f608
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295780
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
TBR=mtklein@google.com,johnstiles@google.com
Change-Id: If6412e74a16aa515c223d5d4f326780c8a69766f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295832
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Bug: skia:9935
Change-Id: I52c7819e8a2899f6fe3e1a1f6551e84ac8c8d60a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295784
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
This version computes X and Y in parallel and without branching.
Change-Id: I08dd7339f75c6cdd5b4130bf363cac1f527bf6ed
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295572
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This should make the YCbCr sampler helper usable in a GM (with a normal Vk context).
Change-Id: I75451f6ca934f7b59c48349c77234856d0946a12
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295766
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
It occurred to me that we try to guarantee this but don't test it.
Luckily this public_headers_warnings_check target is a perfect spot.
Change-Id: Ie06732706ee80da798a9c3bda215d5a65f02b5bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295856
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
When a fontmgr is included in the Skia build any headers it provides
(like through public) are also public Skia headers.
Change-Id: Ibf18819a956e626a925f83a4f8ebab90978ff9a9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295818
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
The GrTextContext::options would flow from the GrRecordingContext to
the GrDrawingManager to the GrTextContext, and finally to the
GrRenderTargetContext.
Just find them on the GrRecording context off the GrRenderTargetContext.
Change-Id: I902481d20072c2470905261ab81c2b6456f25343
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295559
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
The current implementation ignores return value from
`registerChildProcessor` and, surprisingly, assumes that a cloned FP
index will match the original FP index. This version honors the return
value.
(In practice, I have not seen any cases where the current implementation
has caused actual breakage.)
Updating common code-gen had large ripple effects in the SkSL unit
tests. While repairing the tests, I also took the opportunity to use
raw-strings to pass the source SkSL text, and annotated the `expectedH`
and `expectedCPP` blocks to make the tests easier to understand at a
glance.
Change-Id: I71be69d9e4620963b3ef49ad8e0dba3b40af7f4f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295452
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
When collapsing static switches down to a single statement, we detect
break statements and don't copy them. But the logic was broken; we
weren't copying the entire statement in which the break occurred, which
could be a block, causing some of the code to simply be omitted.
Change-Id: Ic5b59c11d12326c93d49080193a0a5297732bfb0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295776
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
The ar utility only adds symbols. As a result removed symbols are
sometimes still present in later builds, leading to great confusion.
Delete the .a file before recreating it with ar.
This is similar to what Chromium currently does in gcc_toolchain.gni.
However, we cannot always just use 'rm' because of the build for Android
on Windows, so this introduces 'rm.py' which is just like 'cp.py' but
without the copy part.
Bug: skia:10363
Change-Id: Icc0c3d18dab1e48ccfec47386662c7b4d2dc8811
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295569
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
On a freshly fetched repo, setting `skia_compile_processors = true` will
fail to compile because clang-format is missing from the bin directory.
This CL automatically runs fetch-clang-format for you when clang-format
is absent.
Change-Id: Ieeb359176072e92ca235316c820310333732f608
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295780
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This also adds a GM based on Jim's fiddle: https://fiddle.skia.org/c/781234e35c208ee03f79b90613117b91
I confirmed that it never flickers when animating in viewer.
Patchset 1 shows the GM being blank (with the computeFastBounds fix
disabled). Patchset 3 shows that with the fix enabled, the GM is not
blank.
Bug: skia:9282
Change-Id: I206f7150c395b0a35ecf0455e4905f72ae057e6b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295558
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Bug: skia:10362
Change-Id: I56d1f618dcdf96133f1932b7ac8d4602ddb93a59
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295575
Commit-Queue: Stephen White <senorblanco@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
TODO:
1. Accept a Color builder or a TypeArray from CanvasKit.Malloc
2. Apply the same treatment to all other gradient functions, MakeSkVertices, and drawAtlas
Change-Id: I94fa67a3c00d7b1ecdc004af4ffd3193404c1a30
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294707
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
The aim here is to unify VkTestHelper with the VkYcbcrSamplerHelper's context creation code. AFAICT they have a ~90% overlap.
Change-Id: Iba8d1482b8c1d7164682f90e19d2183d8cfe45d4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295583
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>