Bug 635464: Diagnostic crash in nightly and aurora, to see if we are asking basic content client for alpha. r=bas
authorMilan Sreckovic <milan@mozilla.com>
Wed, 20 Jul 2016 10:26:02 -0400
changeset 331161 115209d4f543a66994fa68ee9a187490cc60c17d
parent 331159 8ad7dc5cba0ca3c18cdc32beaa0b0808488cabd3
child 331162 cd5af43f84b11096643c2418d3af263cf92c7bdd
push id9858
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 14:37:10 +0000
treeherdermozilla-aurora@203106ef6cb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbas
bugs635464
milestone50.0a1
Bug 635464: Diagnostic crash in nightly and aurora, to see if we are asking basic content client for alpha. r=bas MozReview-Commit-ID: 2DBdJZs0hlh
gfx/2d/Logging.h
gfx/layers/client/ContentClient.cpp
--- a/gfx/2d/Logging.h
+++ b/gfx/2d/Logging.h
@@ -121,16 +121,17 @@ enum class LogReason : int {
   MessageChannelCloseFailure,
   MessageChannelInvalidHandle,
   TextureAliveAfterShutdown,
   InvalidContext,
   InvalidCommandList,
   AsyncTransactionTimeout, // 30
   TextureCreation,
   InvalidCacheSurface,
+  AlphaWithBasicClient,
   // End
   MustBeLessThanThis = 101,
 };
 
 struct BasicLogger
 {
   // For efficiency, this method exists and copies the logic of the
   // OutputMessage below.  If making any changes here, also make it
--- a/gfx/layers/client/ContentClient.cpp
+++ b/gfx/layers/client/ContentClient.cpp
@@ -122,16 +122,19 @@ ContentClientBasic::ContentClientBasic()
 void
 ContentClientBasic::CreateBuffer(ContentType aType,
                                  const IntRect& aRect,
                                  uint32_t aFlags,
                                  RefPtr<gfx::DrawTarget>* aBlackDT,
                                  RefPtr<gfx::DrawTarget>* aWhiteDT)
 {
   MOZ_ASSERT(!(aFlags & BUFFER_COMPONENT_ALPHA));
+  if (aFlags & BUFFER_COMPONENT_ALPHA) {
+    gfxDevCrash(LogReason::AlphaWithBasicClient) << "Asking basic content client for component alpha";
+  }
 
   *aBlackDT = gfxPlatform::GetPlatform()->CreateOffscreenContentDrawTarget(
     IntSize(aRect.width, aRect.height),
     gfxPlatform::GetPlatform()->Optimal2DFormatForContent(aType));
 }
 
 void
 ContentClientRemoteBuffer::DestroyBuffers()