Bug 612103 - Followup: Only report a failure when the call actually fails. r=jrmuizel a=blocking-final
authorBas Schouten <bas.schouten@live.nl>
Tue, 08 Feb 2011 18:44:14 -0600
changeset 62211 fa1a4b6abff0d357235b6e293dcba6aa1e592262
parent 62210 c3a4a1970f6cf431770c315fd53d5480e7d42bc9
child 62212 62601280d25dc5c963460b20d45b124ad5bab703
push id18641
push usercjones@mozilla.com
push dateWed, 09 Feb 2011 00:44:41 +0000
treeherdermozilla-central@fa1a4b6abff0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel, blocking-final
bugs612103
milestone2.0b12pre
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 612103 - Followup: Only report a failure when the call actually fails. r=jrmuizel a=blocking-final
gfx/layers/d3d10/ImageLayerD3D10.cpp
--- a/gfx/layers/d3d10/ImageLayerD3D10.cpp
+++ b/gfx/layers/d3d10/ImageLayerD3D10.cpp
@@ -85,18 +85,21 @@ SurfaceToTexture(ID3D10Device *aDevice,
   desc.Usage = D3D10_USAGE_IMMUTABLE;
   
   data.pSysMem = imageSurface->Data();
   data.SysMemPitch = imageSurface->Stride();
 
   nsRefPtr<ID3D10Texture2D> texture;
   HRESULT hr = aDevice->CreateTexture2D(&desc, &data, getter_AddRefs(texture));
 
-  LayerManagerD3D10::ReportFailure(NS_LITERAL_CSTRING("Failed to create texture for image surface"),
-                                   hr);
+  if (FAILED(hr)) {
+    LayerManagerD3D10::ReportFailure(NS_LITERAL_CSTRING("Failed to create texture for image surface"),
+                                     hr);
+  }
+
   return texture.forget();
 }
 
 ImageContainerD3D10::ImageContainerD3D10(ID3D10Device1 *aDevice)
   : ImageContainer(nsnull)
   , mDevice(aDevice)
   , mActiveImageLock("mozilla.layers.ImageContainerD3D10.mActiveImageLock")
 {