Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
e00c8e92
Commit
e00c8e92
authored
Sep 13, 2013
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed VIEW_LAYER.isDirty flag.
parent
42860b5d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
17 deletions
+4
-17
view.cpp
common/view/view.cpp
+4
-16
view.h
include/view/view.h
+0
-1
No files found.
common/view/view.cpp
View file @
e00c8e92
...
...
@@ -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
;
}
include/view/view.h
View file @
e00c8e92
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment