unload brush texture from main memory, preload brush on preview to free render thread
This commit is contained in:
@@ -121,7 +121,7 @@ bool NodePanelStroke::import_abr(const std::string& path)
|
||||
{
|
||||
auto presets = App::I.stroke->m_presets_popup;
|
||||
async_start();
|
||||
if (pr->load())
|
||||
if (pr->valid())
|
||||
{
|
||||
LOG("add preset %s", pr->m_name.c_str());
|
||||
presets->add_brush(pr);
|
||||
@@ -303,6 +303,7 @@ void NodePanelStroke::init_controls()
|
||||
auto old_color = Canvas::I->m_current_brush->m_tip_color;
|
||||
*Canvas::I->m_current_brush = *b;
|
||||
Canvas::I->m_current_brush->m_tip_color = old_color;
|
||||
Canvas::I->m_current_brush->load();
|
||||
m_preview->draw_stroke();
|
||||
m_brush_thumb->set_image(b->m_brush_thumb_path);
|
||||
m_dual_brush_thumb->set_image(b->m_dual_thumb_path);
|
||||
|
||||
Reference in New Issue
Block a user