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
e1ecd301
Commit
e1ecd301
authored
May 15, 2013
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added some debug informations.
parent
135149e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
view.cpp
common/view/view.cpp
+15
-0
No files found.
common/view/view.cpp
View file @
e1ecd301
...
...
@@ -407,10 +407,12 @@ void VIEW::redrawRect( const BOX2I& aRect )
{
int
totalItems
=
0
,
totalCached
=
0
;
uint64_t
totalDrawTime
=
0
;
#ifdef __WXDEBUG__
prof_counter
totalCycles
,
totalRealTime
;
prof_start
(
&
totalRealTime
,
false
);
prof_start
(
&
totalCycles
,
true
);
#endif
/* __WXDEBUG__ */
BOOST_FOREACH
(
VIEW_LAYER
*
l
,
m_orderedLayers
)
{
...
...
@@ -428,6 +430,7 @@ void VIEW::redrawRect( const BOX2I& aRect )
}
}
#ifdef __WXDEBUG__
prof_end
(
&
totalCycles
);
prof_end
(
&
totalRealTime
);
...
...
@@ -435,6 +438,7 @@ void VIEW::redrawRect( const BOX2I& aRect )
totalItems
,
totalCached
,
(
double
)
totalRealTime
.
value
/
1000.0
,
1000000.0
/
(
double
)
totalRealTime
.
value
,
(
double
)
totalDrawTime
/
(
double
)
totalCycles
.
value
*
100.0
);
#endif
/* __WXDEBUG__ */
}
...
...
@@ -600,12 +604,23 @@ void VIEW::RecacheAllItems( bool aImmediately )
r
.
SetMaximum
();
#ifdef __WXDEBUG__
wxLogDebug
(
wxT
(
"RecacheAllItems::immediately: %u"
),
aImmediately
);
prof_counter
totalRealTime
;
prof_start
(
&
totalRealTime
,
false
);
#endif
/* __WXDEBUG__ */
for
(
LayerMapIter
i
=
m_layers
.
begin
();
i
!=
m_layers
.
end
();
++
i
)
{
VIEW_LAYER
*
l
=
&
(
(
*
i
).
second
);
recacheItem
visitor
(
this
,
m_gal
,
l
->
id
,
aImmediately
);
l
->
items
->
Query
(
r
,
visitor
);
}
#ifdef __WXDEBUG__
prof_end
(
&
totalRealTime
);
wxLogDebug
(
wxT
(
"RecacheAllItems::%.1f ms"
),
(
double
)
totalRealTime
.
value
/
1000.0
);
#endif
/* __WXDEBUG__ */
}
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