What steps will reproduce the problem?
1. Start Canvas Redraw and Draw Circle
What is the expected output? What do you see instead?
Expected test are visually ok.
But a code inspection show that they have both the same logic flaw. They both did not test what they
should be which should be their onDraw() method speed.
For example for DrawCircle:
After a new view invalidate in DrawCircle.java:oneRound() we return to
Tester.java:lazyLoop() polling
for end of test and calling again oneRound() until the thread is preempted and
ui main thread is
scheduled. At this point we execute DrawCircle.java:onDraw() method and
decrease loop counter. Then
we return to Tester.java:lazyLoop() to invalidate again view and looping until
new preemption.
So the test spent the main part of it's time into Tester.java:lazyLoop() and not into DrawCircle.java:onDraw()
as it should do.
Note that in case we have a dual processor core then test correctly measure DrawCircle.java:onDraw() execution
time.
What version of the product are you using? On what operating system?
git version on Android
Please provide any additional information below.
Original issue reported on code.google.com by mickael....@st.com on 20 Feb 2012 at 9:21
Original issue reported on code.google.com by
mickael....@st.com
on 20 Feb 2012 at 9:21