Closed Bug 1015659 Opened 10 years ago Closed 10 years ago

Use QR Code to video sync profiles

Categories

(Core :: Gecko Profiler, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: BenWa, Assigned: BenWa)

References

Details

Attachments

(2 files, 5 obsolete files)

Right now we use a binary counter but it's very difficult to do ORC. Instead we should use a QR code approach.
Attached patch WIP (obsolete) — Splinter Review
Assignee: nobody → bgirard
Status: NEW → ASSIGNED
Attached image Screenshot
You said on IRC you think this could use the color bar. I'm assuming you mean the frame coloring? I picked QR code because they work with any orientation and they are easy to find a frame and can encode a reasonable amount of data and have redundancy/checksums.

I'd like to hear if we can achieve a workable solution without qr code because it is annoying to deal with a parsing library.
Flags: needinfo?(vladimir)
CCing mchang since it might help with the using a high speed camera to measure frames.
CCing wlach since it might be interesting feature for eideticker to use.
Attached file qrcode_table.h (obsolete) —
I forgot to attach this. Putting here to be merged into the patch. Just so I don't lose the patch.
Taking needinfo off. I had a conversation with vlad in person.
Flags: needinfo?(vladimir)
Attachment #8428320 - Attachment is obsolete: true
Attachment #8435967 - Attachment is obsolete: true
Attachment #8440330 - Flags: review?(jmuizelaar)
Attachment #8440330 - Attachment is obsolete: true
Attachment #8440330 - Flags: review?(jmuizelaar)
Attachment #8440332 - Flags: review?(jmuizelaar)
Blocks: 1025704
Comment on attachment 8440332 [details] [diff] [review]
Patch: Replace frame counter by a QRCode

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

::: gfx/layers/composite/LayerManagerComposite.cpp
@@ +313,5 @@
>  
> +#ifdef MOZ_PROFILING
> +// Only build the QR feature when profiling to avoid bloating
> +// our data section.
> +#include "qrcode_table.h"

Maybe add a comment as to where this data came from and what it is.

@@ +355,2 @@
>  
> +    int padding = 2;

Maybe give a name to 21?

@@ +368,5 @@
> +                          effects,
> +                          opacity,
> +                          gfx::Matrix4x4());
> +
> +    // Change the color to black

Instead write: Draw a black square for every bit set in qr[index]

@@ +378,5 @@
> +        if (currBit == 0) {
> +          currBit = 128;
> +          i++;
> +        }
> +        if (qr[i] & currBit) {

Can you stop computing currBit incrementally and just do it directly from the loop variable. That will make it a little easier to understand what's going on here.

@@ +385,5 @@
> +                                          bitWidth, bitWidth),
> +                                clip,
> +                                effects,
> +                                opacity,
> +                                gfx::Matrix4x4());

This seems like a terrible way to draw this, but it probably doesn't matter.
Attachment #8440332 - Flags: review?(jmuizelaar) → review+
https://hg.mozilla.org/mozilla-central/rev/2b1d50423271
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: