Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Skiko with Clang-CL #1020

Merged
merged 3 commits into from
Feb 12, 2025
Merged

Conversation

Alovchin91
Copy link
Contributor

@Alovchin91 Alovchin91 commented Feb 3, 2025

Official Skia documentation suggests that it's highly recommended to build Skia with Clang-CL on Windows, and that this dramatically improves Skia performance with Software rendering and in other areas. This corresponds with my experience, so here it is.

Related Skia-pack PR: JetBrains/skia-pack#64

Prerequisite: #1024

@Alovchin91 Alovchin91 marked this pull request as ready for review February 4, 2025 18:11
@Alovchin91
Copy link
Contributor Author

The CI is failing because this PR depends on a new Skia-pack release (-2).

@igordmn igordmn self-requested a review February 4, 2025 18:40
@igordmn
Copy link
Collaborator

igordmn commented Feb 7, 2025

Clang gives a big increase in performance (~ 16% FPS from 2 runs on average) on Windows x64 / DirectX. Testing to post more precise results with different conditions. Software rendering will be more faster.

@igordmn
Copy link
Collaborator

igordmn commented Feb 10, 2025

Benchmarks results

Binary size 27 % is smaller
DirectX rendering FPS is 17 % higher
Software rendering FPS is 73 % higher

Copy link
Collaborator

@Schahen Schahen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather have two separate PRs but don't have any strong objections apart of changing the logic behind build-with-local-skia.sh

skiko/build-with-local-skia.sh Outdated Show resolved Hide resolved
skiko/build-with-local-skia.sh Outdated Show resolved Hide resolved
skiko/buildSrc/src/main/kotlin/CompileSkikoCppTask.kt Outdated Show resolved Hide resolved
@Alovchin91
Copy link
Contributor Author

I'd rather have two separate PRs

I've split the BreakIterator part off into a separate PR: #1024

It would be a prerequisite for this one.

@Alovchin91 Alovchin91 force-pushed the alovchin/clang-cl branch 2 times, most recently from eed7433 to 9e3d428 Compare February 11, 2025 13:42
@Alovchin91 Alovchin91 requested a review from Schahen February 11, 2025 13:43
MatkovIvan pushed a commit that referenced this pull request Feb 11, 2025
This PR is split-off from and is a prerequisite of Clang-cl PR: #1020

BreakIterator.clone() is broken on JVM and seemingly leads to a
use-after-free behaviour. Clang-cl makes this issue more visible, likely
due to address sanitisation.

Explanation why it is deleted in an internal channel:
https://jetbrains.slack.com/archives/C02DDNREC77/p1738678000232729
* `breakIteratorCloneTest` is failing with an access violation in Debug
mode with additional checks, so using it wasn't safe
* it is not used anywhere

This is a breaking change and will require bumping Skiko version to
0.9.0.
Copy link
Collaborator

@Schahen Schahen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking care of it!

@igordmn igordmn merged commit 60f1df8 into JetBrains:master Feb 12, 2025
6 checks passed
@Alovchin91 Alovchin91 deleted the alovchin/clang-cl branch February 12, 2025 10:11
igordmn added a commit that referenced this pull request Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants