Removed VIEW_LAYER.isDirty flag.

This commit is contained in:
Maciej Suminski 2013-09-13 11:38:16 +02:00
parent 42860b5d02
commit e00c8e92cb
2 changed files with 4 additions and 17 deletions

View File

@ -80,7 +80,6 @@ void VIEW::AddLayer( int aLayer, bool aDisplayOnly )
m_layers[aLayer].items = new VIEW_RTREE();
m_layers[aLayer].renderingOrder = aLayer;
m_layers[aLayer].enabled = true;
m_layers[aLayer].isDirty = false;
m_layers[aLayer].displayOnly = aDisplayOnly;
m_layers[aLayer].target = TARGET_CACHED;
}
@ -100,7 +99,7 @@ void VIEW::Add( VIEW_ITEM* aItem )
{
VIEW_LAYER& l = m_layers[layers[i]];
l.items->Insert( aItem );
l.isDirty = true;
MarkTargetDirty( l.target );
}
if( m_dynamic )
@ -120,7 +119,6 @@ void VIEW::Remove( VIEW_ITEM* aItem )
{
VIEW_LAYER& l = m_layers[layers[i]];
l.items->Remove( aItem );
l.isDirty = true;
}
}
@ -568,8 +566,6 @@ void VIEW::redrawRect( const BOX2I& aRect )
m_gal->SetLayerDepth( l->renderingOrder );
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
m_layers[layerId].isDirty = true;
MarkTargetDirty( m_layers[layerId].target ); // TODO remove?
MarkTargetDirty( m_layers[layerId].target );
}
}
@ -876,7 +871,7 @@ void VIEW::updateBbox( VIEW_ITEM* aItem )
VIEW_LAYER& l = m_layers[layers[i]];
l.items->Remove( 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 );
recacheLayer visitor( this, m_gal, l->id, aImmediately );
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] )
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;
}

View File

@ -459,7 +459,6 @@ private:
struct VIEW_LAYER
{
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?
VIEW_RTREE* items; ///* R-tree indexing all items on this layer.
int renderingOrder; ///* rendering order of this layer