Closed Bug 1429284 Opened 2 years ago Closed 2 years ago

Expose compositor dropped frame count to HTMLMediaElement's debug info.

Categories

(Core :: Audio/Video: Playback, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: kikuo, Assigned: kikuo)

References

Details

Attachments

(1 file)

It would be better to have this information in debuginfo to narrow down the cause of frame dropping easier for developers.
Attachment #8941323 - Flags: review?(jwwang)
Comment on attachment 8941323 [details]
Bug 1429284 - Expose compositor dropped frame count to HTMLMediaElement's debug info.

https://reviewboard.mozilla.org/r/211634/#review217406
Attachment #8941323 - Flags: review?(jwwang) → review+
Comment on attachment 8941323 [details]
Bug 1429284 - Expose compositor dropped frame count to HTMLMediaElement's debug info.

https://reviewboard.mozilla.org/r/211634/#review217416

::: dom/html/HTMLMediaElement.cpp:1592
(Diff revision 1)
>  
> +  if (mVideoFrameContainer) {
> +    auto count = nsPrintfCString(
> +      "Compositor dropped frame(including when element's invisible): %u\n",
> +      mVideoFrameContainer->GetDroppedImageCount());
> +    result.Append(NS_ConvertUTF8toUTF16(count));

Hi Kilik,
Do you consider using result.AppendPrintf("Compositor   dropped frame(including when element's invisible): %u\n",
      mVideoFrameContainer->GetDroppedImageCount()); instead?

nsPrintfCString may have extra heap allocation/deallocation.
Pushed by kikuo@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/56983cf43007
Expose compositor dropped frame count to HTMLMediaElement's debug info. r=jwwang
https://hg.mozilla.org/mozilla-central/rev/56983cf43007
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in before you can comment on or make changes to this bug.