lazy stroke preview rendering
This commit is contained in:
17
src/node.cpp
17
src/node.cpp
@@ -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)
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user