Bug 1429291 - Add gfxCriticalNote to WebRenderBridgeParent::AddExternalImage() r=nical
authorsotaro <sotaro.ikeda.g@gmail.com>
Thu, 11 Jan 2018 21:44:00 +0900
changeset 453097 7e8d140654574a170c2ddc545462100b546d53dc
parent 453096 4a4c7d5443ab787422a97adf517c0cc334d60cfd
child 453098 9f4397eb2e08246073e0f5b053ba6cd0a3d746a8
push id1648
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 12:45:47 +0000
treeherdermozilla-release@cbb9688c2eeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical
bugs1429291
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1429291 - Add gfxCriticalNote to WebRenderBridgeParent::AddExternalImage() r=nical
gfx/layers/wr/WebRenderBridgeParent.cpp
--- a/gfx/layers/wr/WebRenderBridgeParent.cpp
+++ b/gfx/layers/wr/WebRenderBridgeParent.cpp
@@ -403,43 +403,43 @@ WebRenderBridgeParent::AddExternalImage(
                                   0);
       return true;
     }
   } else {
     MOZ_ASSERT(mExternalImageIds.Get(wr::AsUint64(aExtId)).get());
 
     RefPtr<WebRenderImageHost> host = mExternalImageIds.Get(wr::AsUint64(aExtId));
     if (!host) {
-      NS_ERROR("CompositableHost does not exist");
+      gfxCriticalNote << "CompositableHost does not exist for extId:" << wr::AsUint64(aExtId);
       return false;
     }
     if (!gfxEnv::EnableWebRenderRecording()) {
       TextureHost* texture = host->GetAsTextureHostForComposite();
       if (!texture) {
-        NS_ERROR("TextureHost does not exist");
+        gfxCriticalNote << "TextureHost does not exist for extId:" << wr::AsUint64(aExtId);
         return false;
       }
       WebRenderTextureHost* wrTexture = texture->AsWebRenderTextureHost();
       if (wrTexture) {
         wrTexture->PushResourceUpdates(aResources, TextureHost::ADD_IMAGE, keys,
                                        wrTexture->GetExternalImageKey());
         return true;
       }
     }
     dSurf = host->GetAsSurface();
   }
 
   if (!dSurf) {
-    NS_ERROR("TextureHost does not return DataSourceSurface");
+    gfxCriticalNote << "TextureHost does not return DataSourceSurface for extId:" << wr::AsUint64(aExtId);
     return false;
   }
 
   DataSourceSurface::MappedSurface map;
   if (!dSurf->Map(gfx::DataSourceSurface::MapType::READ, &map)) {
-    NS_ERROR("DataSourceSurface failed to map");
+    gfxCriticalNote << "DataSourceSurface failed to map for Image for extId:" << wr::AsUint64(aExtId);
     return false;
   }
 
   IntSize size = dSurf->GetSize();
   wr::ImageDescriptor descriptor(size, map.mStride, dSurf->GetFormat());
   wr::Vec<uint8_t> data;
   data.PushBytes(Range<uint8_t>(map.mData, size.height * map.mStride));
   aResources.AddImage(keys[0], descriptor, data);