Bug 1429284 - Expose compositor dropped frame count to HTMLMediaElement's debug info. draft
authorKilik Kuo <kikuo@mozilla.com>
Wed, 10 Jan 2018 12:07:47 +0800
changeset 718411 048654070e0b5c0a648cd938bcf5586d43a9e90c
parent 718290 e4de69553e3faf8136eb9bb7f2f741e1b7e6f866
child 745474 7b02c7f651d9fd603a7a014435ca35d1eae629f5
push id94917
push userkikuo@mozilla.com
push dateWed, 10 Jan 2018 09:22:56 +0000
bugs1429284
milestone59.0a1
Bug 1429284 - Expose compositor dropped frame count to HTMLMediaElement's debug info. MozReview-Commit-ID: GYtHxdsGSk1
dom/html/HTMLMediaElement.cpp
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -1580,16 +1580,21 @@ HTMLMediaElement::MozRequestDebugInfo(Er
   RefPtr<Promise> promise = CreateDOMPromise(aRv);
   if (NS_WARN_IF(aRv.Failed())) {
     return nullptr;
   }
 
   nsAutoString result;
   GetMozDebugReaderData(result);
 
+  if (mVideoFrameContainer) {
+    result.AppendPrintf("Compositor dropped frame(including when element's invisible): %u\n",
+                        mVideoFrameContainer->GetDroppedImageCount());
+  }
+
   if (mMediaKeys) {
     nsString EMEInfo;
     GetEMEInfo(EMEInfo);
     result.AppendLiteral("EME Info: ");
     result.Append(EMEInfo);
     result.AppendLiteral("\n");
   }