• Igor Demin's avatar
    Schedule redraw on resize and initialization · 9b9bea5f
    Igor Demin authored
    We probably shouldn't perform frame rendering in init/setBounds.
    Because in onRender we can call window.setBounds.
    It will cause drawing onRender inside another onRender.
    
    After the fix there is no increase in artifacts on start or resize.
    
    "True" fix would be to call "repaint" instead of manual scheduling redrawing with "invokeLater", because paint events have higher priority than usual events.
    
    But "repaint" doesn't work with Canvas. It is only works with Swing components.
    We can extend JLayeredPane instead of HardwareLayer (and just add HardwareLayer to JLayeredPane).
    But there are too much changes.
    
    Anyway, system draws Window independently of AWT, so we probably can't get rid of artifacts if we use only AWT.
    9b9bea5f
Name
Last commit
Last update
.run Loading commit data...
gradle/wrapper Loading commit data...
samples/SkijaInjectSample Loading commit data...
skiko Loading commit data...
third_party Loading commit data...
.gitignore Loading commit data...
LICENSE Loading commit data...
README.md Loading commit data...
gradlew Loading commit data...
gradlew.bat Loading commit data...
settings.gradle Loading commit data...