Instead of plumbing the target value through bindImpl as an opaque
void*, store explicitly in builders.
More typesafe/elegant/flexible/etc.
TBR=
Change-Id: Ie28787072a6be3b0bfcd528b68431f9fb3fa3a71
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291576
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
This will guard against buffer overflows
for large text blobs.
Bug: chromium:1080481
Change-Id: I13a10869babfa149a70c2f4caebb3a1ae4452b77
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291456
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Reed <reed@google.com>
This mode is oftentimes faster than tessellation, and other times it
serves as a polyfill when tessellation just isn't supported.
Change-Id: I7b3d57fd0194c6869bfe28ee53ff0ff2e43df479
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291036
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
We were accidentally turning on MSAA via the "antialias" context attrib,
then feeding the render target into Ganesh and saying it was non-MSAA.
This will cause rendering artifacts in Ganesh if MSAA is unknowingly
enabled when we try to do coverage-based AA.
Also, the WebGL spec does not give us control over the exact sample
count or even guarantee that "antialias" means MSAA, so I think it's
best to leave that flag disabled by default. If a client wants MSAA,
they can create their own offscreen surface and blit it into the main
canvas.
Change-Id: I45f1596bfe9258963cff4b5d0a3921c5ba43145f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291029
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
breaks CPU-backed canvaskit build
This reverts commit 3d52abc846.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Wide color gamut support and working example.
>
> Color space arguments accepted at surface creation, paint, gradient, and other call sites.
> Works correctly only when chrome happens to be rendering itself in the same color space
> the canvaskit user has chosen, there's not yet end to end color management of
> canvases supported in browsers.
>
> readPixels not yet working due to possible chrome bug.
>
> Change-Id: I3dea5b16c60a3871cd2a54f86716f4a438a90135
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289733
> Commit-Queue: Nathaniel Nifong <nifong@google.com>
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
TBR=kjlubick@google.com,brianosman@google.com,nifong@google.com
Change-Id: I2e03155c2512eec6730ecccda19df78174146008
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291339
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Color space arguments accepted at surface creation, paint, gradient, and other call sites.
Works correctly only when chrome happens to be rendering itself in the same color space
the canvaskit user has chosen, there's not yet end to end color management of
canvases supported in browsers.
readPixels not yet working due to possible chrome bug.
Change-Id: I3dea5b16c60a3871cd2a54f86716f4a438a90135
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289733
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
This overload of drawImageRect() does not take a `constraint` argument.
The comment about constraints appears to have been mistakenly copy-
pasted from the overload above this one.
Change-Id: If0253eec5f21f73b1dffb4dbcd7567aa37e82320
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291200
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This is the first of many CLs that progressively refine the clipping,
scissoring, and clearing APIs.
The series of changes focus on simplifying the clear APIs, consolidating
clip intersection logic, and moving towards a more explicitly sized
render target context (where confusion between approx-fit and exact-fit
is handled externally, although I don't take it that far).
Next step will be to propagate the simpler calls up to GrRTC.
Bug:skia:10205
Change-Id: Idb0c58a63b7a3950a92604dd4c03536d668be7c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290123
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
This reverts commit c80ee456ad.
fix: update flutter's gn file to add guard
Change-Id: Iac5171c8475d9a862d06255dab1c6f38f10de2f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291361
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Change-Id: I01d0541bec6e5e28ea69fc4df8aaa467f16d42fd
Bug: skia:9935
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291177
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
This private method is never used.
Change-Id: Ibd71b76d9d76698a8b8d19e5275959df2cf45e45
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291320
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This makes it much clearer which code is actually adding to and removing
from the unresolved queue. This also makes fillGaps much more
performant since it no longer needs to make a full copy of the
unresolved blocks.
Change-Id: I62a5eb32118fec6745b7079f537ccbd07b018c12
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291318
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Changes are largely mechanical. Non-mechanical changes to support newer
versions of emscripten are enumerated below, in format ${EMSCRIPTEN_VERSION}:
${RELEVANT_CHANGE}.
- 1.39.9: TOTAL_MEMORY has been renamed INITIAL_MEMORY.
- 1.39.12: passing of linker flags to wasm-ld has changed in a way that requires
supplying `--no-entry` to avoid error message "wasm-ld: error: entry symbol
not defined (pass --no-entry to suppress): main".
- 1.39.16: The factory function created by using `MODULARIZE` build option now
returns a Promise instead of the module instance. As such, the ready.js
workaround is removed. Note this is a breaking API change for CanvasKit,
which now uses just `then()` and not `ready().then()`.
- 1.38.33: `emsdk install` hasn't required the `-64bit` suffix on version names
since `1.38.33`, so we remove them. E.g. `emsdk install sdk-1.39.6-64bit`
simply becomes `emsdk install sdk-1.39.16`.
cf. https://github.com/emscripten-core/emscripten/blob/master/ChangeLog.md
Bug: NONE
Change-Id: Iabec4bd5ad7db2e0715ad42c2e4cf7d67b192b4c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291182
Reviewed-by: Kevin Lubick <kjlubick@google.com>
These code paths are no longer used now that the GrBackendTexture code
uses the normal Ganesh code paths.
Change-Id: Idecf6876d96c7be587919f969d4736374d82c199
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289623
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
d45b30b5a5..e8b8b81645
2020-05-21 rafael.cintron@microsoft.com Eliminate Program::mLinkResolved boolean
2020-05-20 kbr@chromium.org Support OES_texture_{half_}float on ES 3.0 without these extensions.
2020-05-20 ianelliott@google.com Vulkan: Create a pre-rotation test for 400x300 windows
2020-05-20 jmadill@chromium.org Vulkan: Don't invalidate XFB buffers on FBO switch.
2020-05-20 timvp@google.com Rename ProgramState::getProgramExecutable() to getExecutable()
2020-05-20 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from 67eac5116ba3 to 4683991f7675 (4 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 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
Bug: None
Tbr: lovisolo@google.com
Change-Id: I25360d655d504f80a0fdb0047879d3631d0c8f83
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291257
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Otherwise, it is uninitialized when there is no init device.
Change-Id: I3594f6fb4cf6380b5ba74ff5e4955fab8f449146
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291236
Reviewed-by: Jim Graham <jimgraham@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Parse embedded fonts into SkCustomTypefaces, and pass down the text
animation pipeline. Things seem to mostly work for Latin examples.
Most existing Lottie files come with embedded fonts (the option is
enabled by default), so to minimize disruption only use the new
feature as a fallback for typefaces which cannot be resolved otherwise.
Also introduce a builder flag to prioritize embedded fonts over native
(kPreferEmbeddedFonts), and plumb in existing tools for testing.
Change-Id: Ia2a659f76e354fea6081b0f2e0dce1d8bdf63c52
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291180
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
Change-Id: Ifec54ef7948707f0d9811bc0b865223ad02822b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291181
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Similar to our stroker, I try to detect when to reverse the fill.
Change-Id: I3099f009dd78dc6e4ffd295e13183c85e0990761
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291179
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
This particular atlas is only used for small-area paths, which means
at least one dimension of every path is guaranteed to be quite small.
So we use a pow2 atlas and transpose tall paths. Transposing makes it
so every path has a small height, which lends very well to efficient
pow2 atlas packing.
Change-Id: I409283c392117d17937526ab512bbfa290a28577
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290956
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Bug: skia:10154
This will make it clear that these files are for Android use and
avoid compiling them for other clients.
Update testing tools to use android::skia::BitmapRegionDecoder, but
only if SK_ENABLE_ANDROID_UTILS is defined.
Take this opportunity to clean up the class:
- The base class, which was originally designed to allow switching
amongst different implementations, is no longer needed. Rename
SkBitmapRegionCodec to android::skia::BitmapRegionDecoder
(following the new convention and matching the Java API name).
Continue to inherit from SkBitmapRegionDecoder temporarily, to
allow Android to switch to the new API.
- Use std::unique_ptr instead of passing raw pointers.
Add a test to verify that we only create a BitmapRegionDecoder if
it is one of the supported types.
Change-Id: Ied13fc8acb105fde042553331846d95ae15d6b57
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287498
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Except for decorations and ellipsis (for now).
Change-Id: I4079ff609e456fc2e3a15f0374b0bca18a318158
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291079
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
* Rename SDFT3DVertex->Mask3DVertex
* Add ctor to ARGB to make construction interface the same
as Mask ctor.
Change-Id: I28560fce0423b11d7dac6e3a4c798ffd0f088794
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291076
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This is to allow reuse of a Vk render target in both stencil and non-stencil use cases.
Change-Id: Ic35285e66c173db7c0bf6440d95549cf1371ed43
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291077
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
The Radeon Pro 5000 series appears to be affected by the same RG8 bug as
the Radeon R9 M300 and Radeon Pro Vega GPUs. This workaround resolves a
DM failure in TransferPixelsTest.
Bug: skia:10256
Change-Id: Ic80aecdba7e2973ddcec78b1c8b665be219249e9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291048
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Clip the input src bounds to reduce the amount of rescaling work
Avoid creating redundant columns in the y-pass of two pass blur.
Change-Id: Ib1a07334dce8ca941cce0be74657eda150591b63
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290823
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
This CL also cleans up detection for existing GPUs slightly, by
verifying that GPU model numbers are composed of digits instead of
allowing arbitrary characters.
Bug: skia:10256
Change-Id: I1416a24ac34edbe56e317e75f416c80d001d4ba4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291046
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Change-Id: Iddced1112600bd2692e5004ff5ed07fb540331d7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290847
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Change-Id: Ice6676acc33cc245ee62bea587181c1459dbba33
Bug: skia:9935
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290829
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Some of these use the now-deprecated "command" feature.
Change-Id: I7e0bf0141821e2807146d9b0bb99a69da3a47fd2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291037
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
fabf74bda6..d45b30b5a5
2020-05-20 rafael.cintron@microsoft.com Enable allowClearForRobustResourceInit for AMD drivers
2020-05-20 m.maiya@samsung.com Vulkan: Acquire a new BufferHelper from the pool based on a threshold
2020-05-20 cclao@google.com Vulkan: Add workaround for nvidia to always merge barriers into one
2020-05-19 lexa.knyazev@gmail.com D3D11: Migrate to the new blend state tracking
2020-05-19 shrekshao@google.com Fix invalid enums for OES_draw_buffers_indexed
2020-05-19 jdarpinian@chromium.org Enable regenerateStructNames workaround on iOS
2020-05-19 amaiorano@google.com Reland "Add support for GL_CHROMIUM_texture_filtering"
2020-05-19 lexa.knyazev@gmail.com Add ClearTestES3.TextureArrayRGB8
2020-05-19 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-validation-layers/src 7f2b55ced2ce..67eac5116ba3 (14 commits)
2020-05-19 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-tools/src 7bcbfd304f8b..ca8958de1238 (1 commits)
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
Bug: chromium:1058744
Tbr: lovisolo@google.com
Change-Id: I929aee3cacf5f6aad1c11b0f05fa7c4a27323ea7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291016
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bug: skia:10257
Change-Id: I4e74ede711d42a55dbadc64d47a9d6e71e568002
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290880
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>