unload brush texture from main memory, preload brush on preview to free render thread
This commit is contained in:
@@ -487,10 +487,19 @@ void NodeStrokePreview::draw_stroke()
|
||||
auto node = s_queue.Get();
|
||||
if (node)
|
||||
{
|
||||
// if the brush is not already loaded, load it and then destroy it
|
||||
bool to_unload = (node->m_brush->m_tip_texture == nullptr);
|
||||
node->m_brush->preload();
|
||||
|
||||
node->async_start();
|
||||
gl_state gl;
|
||||
gl.save();
|
||||
|
||||
node->m_brush->load();
|
||||
node->draw_stroke_immediate();
|
||||
if (to_unload)
|
||||
node->m_brush->unload();
|
||||
|
||||
gl.restore();
|
||||
node->app_redraw();
|
||||
node->async_end();
|
||||
|
||||
Reference in New Issue
Block a user