Removed VIEW_LAYER.isDirty flag.
This commit is contained in:
parent
42860b5d02
commit
e00c8e92cb
|
@ -80,7 +80,6 @@ void VIEW::AddLayer( int aLayer, bool aDisplayOnly )
|
||||||
m_layers[aLayer].items = new VIEW_RTREE();
|
m_layers[aLayer].items = new VIEW_RTREE();
|
||||||
m_layers[aLayer].renderingOrder = aLayer;
|
m_layers[aLayer].renderingOrder = aLayer;
|
||||||
m_layers[aLayer].enabled = true;
|
m_layers[aLayer].enabled = true;
|
||||||
m_layers[aLayer].isDirty = false;
|
|
||||||
m_layers[aLayer].displayOnly = aDisplayOnly;
|
m_layers[aLayer].displayOnly = aDisplayOnly;
|
||||||
m_layers[aLayer].target = TARGET_CACHED;
|
m_layers[aLayer].target = TARGET_CACHED;
|
||||||
}
|
}
|
||||||
|
@ -100,7 +99,7 @@ void VIEW::Add( VIEW_ITEM* aItem )
|
||||||
{
|
{
|
||||||
VIEW_LAYER& l = m_layers[layers[i]];
|
VIEW_LAYER& l = m_layers[layers[i]];
|
||||||
l.items->Insert( aItem );
|
l.items->Insert( aItem );
|
||||||
l.isDirty = true;
|
MarkTargetDirty( l.target );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( m_dynamic )
|
if( m_dynamic )
|
||||||
|
@ -120,7 +119,6 @@ void VIEW::Remove( VIEW_ITEM* aItem )
|
||||||
{
|
{
|
||||||
VIEW_LAYER& l = m_layers[layers[i]];
|
VIEW_LAYER& l = m_layers[layers[i]];
|
||||||
l.items->Remove( aItem );
|
l.items->Remove( aItem );
|
||||||
l.isDirty = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -568,8 +566,6 @@ void VIEW::redrawRect( const BOX2I& aRect )
|
||||||
m_gal->SetLayerDepth( l->renderingOrder );
|
m_gal->SetLayerDepth( l->renderingOrder );
|
||||||
l->items->Query( aRect, drawFunc );
|
l->items->Query( aRect, drawFunc );
|
||||||
}
|
}
|
||||||
|
|
||||||
l->isDirty = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -815,8 +811,7 @@ void VIEW::invalidateItem( VIEW_ITEM* aItem, int aUpdateFlags )
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mark those layers as dirty, so the VIEW will be refreshed
|
// Mark those layers as dirty, so the VIEW will be refreshed
|
||||||
m_layers[layerId].isDirty = true;
|
MarkTargetDirty( m_layers[layerId].target );
|
||||||
MarkTargetDirty( m_layers[layerId].target ); // TODO remove?
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -876,7 +871,7 @@ void VIEW::updateBbox( VIEW_ITEM* aItem )
|
||||||
VIEW_LAYER& l = m_layers[layers[i]];
|
VIEW_LAYER& l = m_layers[layers[i]];
|
||||||
l.items->Remove( aItem );
|
l.items->Remove( aItem );
|
||||||
l.items->Insert( aItem );
|
l.items->Insert( aItem );
|
||||||
l.isDirty = true;
|
MarkTargetDirty( l.target );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -920,7 +915,7 @@ void VIEW::RecacheAllItems( bool aImmediately )
|
||||||
m_gal->SetLayerDepth( l->renderingOrder );
|
m_gal->SetLayerDepth( l->renderingOrder );
|
||||||
recacheLayer visitor( this, m_gal, l->id, aImmediately );
|
recacheLayer visitor( this, m_gal, l->id, aImmediately );
|
||||||
l->items->Query( r, visitor );
|
l->items->Query( r, visitor );
|
||||||
l->isDirty = true;
|
MarkTargetDirty( l->target );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -941,12 +936,5 @@ bool VIEW::IsTargetDirty( int aTarget ) const
|
||||||
if( m_dirtyTargets[aTarget] )
|
if( m_dirtyTargets[aTarget] )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Check if any of layers belonging to the target is dirty
|
|
||||||
BOOST_FOREACH( VIEW_LAYER* l, m_orderedLayers )
|
|
||||||
{
|
|
||||||
if( l->target == aTarget && l->isDirty )
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -459,7 +459,6 @@ private:
|
||||||
struct VIEW_LAYER
|
struct VIEW_LAYER
|
||||||
{
|
{
|
||||||
bool enabled; ///* is the layer to be rendered?
|
bool enabled; ///* is the layer to be rendered?
|
||||||
bool isDirty; ///* does it contain any dirty items (updated since last redraw)
|
|
||||||
bool displayOnly; ///* is the layer display only?
|
bool displayOnly; ///* is the layer display only?
|
||||||
VIEW_RTREE* items; ///* R-tree indexing all items on this layer.
|
VIEW_RTREE* items; ///* R-tree indexing all items on this layer.
|
||||||
int renderingOrder; ///* rendering order of this layer
|
int renderingOrder; ///* rendering order of this layer
|
||||||
|
|
Loading…
Reference in New Issue