lazy stroke preview rendering

This commit is contained in:
2019-04-23 12:17:46 +02:00
parent 042ad503d2
commit b4a9061cc4
7 changed files with 71 additions and 34 deletions

View File

@@ -63,7 +63,7 @@ void Node::watch(std::function<bool(Node*)> observer)
{
for (auto& c : m_children)
{
if (!glm::any(glm::lessThanEqual(zw(c->m_clip), { 0, 0 })))
//if (!glm::any(glm::lessThanEqual(zw(c->m_clip), { 0, 0 })))
c->watch(observer);
}
}
@@ -268,6 +268,21 @@ void Node::handle_resize(glm::vec2 old_size, glm::vec2 new_size)
}
void Node::handle_on_screen(bool old_visibility, bool new_visibility)
{
if (new_visibility == false)
{
for (auto& c : m_children)
{
if (c->m_on_screen)
{
c->handle_on_screen(true, false);
c->m_on_screen = false;
}
}
}
}
void Node::handle_parent_resize(glm::vec2 old_size, glm::vec2 new_size)
{