-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use new Swing rendering pipeline by default (#126)
- Loading branch information
Showing
3 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
core/src/main/kotlin/org/jetbrains/jewel/foundation/Compatibility.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package org.jetbrains.jewel.foundation | ||
|
||
import org.jetbrains.jewel.ExperimentalJewelApi | ||
|
||
/** | ||
* Enables the new compositing strategy for rendering directly into Swing | ||
* Graphics. This fixes z-order problems and artifacts on resizing, but | ||
* has a performance penalty when using infinitely repeating animations. | ||
* | ||
* We assume the majority of our users will want this flag to be on, so | ||
* this convenience function is provided to that end. Make sure you call | ||
* it **before** you initialize any Compose content. The function is | ||
* idempotent and extremely cheap, so you can call it on any entry point. | ||
*/ | ||
@ExperimentalJewelApi | ||
fun enableNewSwingCompositing() { | ||
System.setProperty("compose.swing.render.on.graphics", "true") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters