Closed Bug 696398 Opened 13 years ago Closed 13 years ago

Need an api to analyze panning performance

Categories

(Core :: Graphics, defect)

x86
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla12

People

(Reporter: taras.mozilla, Assigned: jrmuizel)

References

Details

Attachments

(1 file, 1 obsolete file)

We need to Start() and Stop() a panning operation. Once stopped we should get a histogram of paint times.
Joel, this is the bug I mentioned where we were talking about a low level API to help measure panning for Fennec-native.
would we need a separate bug for zooming?
can I get an idea of what this API will look like and what I could expect from it?  Maybe just some example code of how to use it and some made up (yet moderately realistic) results?
can we get this sample data?  we are building tools around this and it would be nice to work with some sample data.  Thanks!
I'll try to get this working this week.
This adds a startFrameTimeRecording() and stopFrameTimeRecording() to DOMWindowUtils. stopFrameTimeRecording() returns an array of frame times in milliseconds.
I was talking with :pcwalton about this last night and he was worried that on birch, gecko might not have access to what's being drawn now as a result of the patch queue he landed last night (on birch).  Can you guys confirm whether or not that is the case?
(In reply to Clint Talbert ( :ctalbert ) from comment #7)
> I was talking with :pcwalton about this last night and he was worried that
> on birch, gecko might not have access to what's being drawn now as a result
> of the patch queue he landed last night (on birch).  Can you guys confirm
> whether or not that is the case?

Correct. Something like this API will need to be added to the Java UI.
Blocks: 702509
Attached patch Add the apiSplinter Review
Attachment #573273 - Attachment is obsolete: true
Attachment #577793 - Flags: feedback?(bgirard)
Comment on attachment 577793 [details] [diff] [review]
Add the api

Review of attachment 577793 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/layers/Layers.cpp
@@ +576,5 @@
> +
> +nsTArray<float>
> +LayerManager::StopFrameTimeRecording()
> +{
> +  mLastFrameTime = TimeStamp();

I would add a comment about how 'TimeStamp()' is the "null" moment that you're using to mark that it's stopped.
Attachment #577793 - Flags: feedback?(bgirard) → feedback+
Attachment #577793 - Flags: review?(ajuma)
Comment on attachment 577793 [details] [diff] [review]
Add the api

Review of attachment 577793 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/layers/Layers.cpp
@@ +570,5 @@
> +void
> +LayerManager::PostPresent()
> +{
> +  if (!mLastFrameTime.IsNull())
> +    mFrameTimes.AppendElement((TimeStamp::Now() - mLastFrameTime).ToMilliseconds());

Update mLastFrameTime here.
Attachment #577793 - Flags: review?(ajuma) → review+
https://hg.mozilla.org/mozilla-central/rev/90e2471b7a42
Assignee: nobody → jmuizelaar
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: