jvmMain.io.nacular.doodle.drawing.impl.DesktopRenderManagerImpl.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of desktop-jvm Show documentation
Show all versions of desktop-jvm Show documentation
A pure Kotlin, UI framework for the Web
package io.nacular.doodle.drawing.impl
import io.nacular.doodle.accessibility.AccessibilityManager
import io.nacular.doodle.core.Internal
import io.nacular.doodle.core.View
import io.nacular.doodle.core.impl.DisplayImpl
import io.nacular.doodle.scheduler.AnimationScheduler
import io.nacular.doodle.theme.InternalThemeManager
import java.util.concurrent.ConcurrentHashMap
import java.util.concurrent.ConcurrentSkipListSet
/** @suppress */
@Internal
internal class DesktopRenderManagerImpl(
display : DisplayImpl,
scheduler : AnimationScheduler,
themeManager : InternalThemeManager?,
accessibilityManager: AccessibilityManager?
): RenderManagerImpl(
display,
scheduler,
themeManager,
accessibilityManager,
display.device
) {
override val views : MutableSet = ConcurrentHashMap.newKeySet()
override val dirtyViews : MutableSet = ConcurrentHashMap.newKeySet()
override val displayTree : MutableMap = ConcurrentHashMap()
override val neverRendered : MutableSet = ConcurrentHashMap.newKeySet()
override val pendingLayout : MutableSet = ConcurrentSkipListSet(AncestorComparator)
override val pendingRender : MutableSet = ConcurrentHashMap.newKeySet() // FIXME: Sort by insertion order
override val pendingCleanup : MutableMap> = ConcurrentHashMap()
override val addedInvisible : MutableSet = ConcurrentHashMap.newKeySet()
override val visibilityChanged : MutableSet = ConcurrentHashMap.newKeySet()
override val pendingBoundsChange: MutableSet = ConcurrentHashMap.newKeySet()
override fun addToCleanupList(parent: View, child: View) {
pendingCleanup.getOrPut(parent) { ConcurrentHashMap.newKeySet() }.apply { add(child) }
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy