mirror of https://github.com/KLayout/klayout.git
WIP: updated solution
* Reverted first solution partially because it lead to drawing errors. * Redraw thread will fire workers only for layers that really need to be drawn
This commit is contained in:
parent
46116f4828
commit
dc9267d61e
|
|
@ -510,7 +510,7 @@ bitmaps_to_image_rgb (const std::vector<lay::ViewOp> &view_ops_in,
|
|||
|
||||
if (pb != 0
|
||||
&& w > 0
|
||||
&& (pb->first_scanline () + w - 1 < y + slice && pb->last_scanline () > y + w - 1)
|
||||
&& ((pb->first_scanline () < y + slice && pb->last_scanline () > y) || w > 1)
|
||||
&& (vop.ormask () | ~vop.andmask ()) != 0) {
|
||||
|
||||
uint32_t non_empty_sl = 0;
|
||||
|
|
@ -748,7 +748,7 @@ bitmaps_to_image_mono (const std::vector<lay::ViewOp> &view_ops_in,
|
|||
|
||||
if (pb != 0
|
||||
&& w > 0
|
||||
&& (pb->first_scanline () + w - 1 < y + slice && pb->last_scanline () > y + w - 1)
|
||||
&& ((pb->first_scanline () < y + slice && pb->last_scanline () > y) || w > 1)
|
||||
&& (vop.ormask () | ~vop.andmask ()) != 0) {
|
||||
|
||||
uint32_t non_empty_sl = 0;
|
||||
|
|
|
|||
|
|
@ -74,9 +74,10 @@ struct RedrawLayerInfo
|
|||
/**
|
||||
* @brief The layer index
|
||||
*
|
||||
* The logical layer to draw. If this member is <0 and the cellview_index is <0, it is an invalid layer,
|
||||
* which is ignored. If the cellview_index is >=0, it denotes a "cell frame" pseudo
|
||||
* layer. It is set by the constructor.
|
||||
* The logical layer to draw. The layer index can be <0 which indicates a
|
||||
* layer with not layout source (cell_frame may be true to indicate a
|
||||
* pseudo layer then).
|
||||
* This attribute is set by the constructor.
|
||||
*/
|
||||
int layer_index;
|
||||
|
||||
|
|
@ -115,6 +116,14 @@ struct RedrawLayerInfo
|
|||
* This member is set by the constructor.
|
||||
*/
|
||||
bool inverse_prop_sel;
|
||||
|
||||
/**
|
||||
* @brief Returns true, if the layer needs to be drawn
|
||||
*/
|
||||
bool needs_drawing () const
|
||||
{
|
||||
return visible && enabled && (cell_frame || layer_index >= 0) && cellview_index >= 0;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -307,7 +307,7 @@ RedrawThread::do_start (bool clear, const db::Vector *shift_vector, const std::v
|
|||
}
|
||||
|
||||
for (int i = 0; i < m_nlayers; ++i) {
|
||||
if (m_layers [i].visible && m_layers [i].enabled) {
|
||||
if (m_layers [i].needs_drawing ()) {
|
||||
schedule (new RedrawThreadTask (i));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue