Bug 723942 - ImageLayerD3D*.cpp does not compile on mingw r=bas
authorJacek Caban <jacek@codeweavers.com>
Mon, 06 Feb 2012 11:24:47 +0100
changeset 86241 deefae783b97b3cdceddb6a6e97fe6ef10cd0e6c
parent 86240 3821d8e969819157f5f3b7b23d7f35381f9486f0
child 86242 76640a2f72b38f9a925baf39c57e6015868aebbd
push id22008
push userbmo@edmorley.co.uk
push dateTue, 07 Feb 2012 10:32:58 +0000
treeherdermozilla-central@2b61af9d18ee [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbas
bugs723942
milestone13.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 723942 - ImageLayerD3D*.cpp does not compile on mingw r=bas
gfx/layers/d3d10/ImageLayerD3D10.cpp
gfx/layers/d3d9/ImageLayerD3D9.cpp
--- a/gfx/layers/d3d10/ImageLayerD3D10.cpp
+++ b/gfx/layers/d3d10/ImageLayerD3D10.cpp
@@ -127,17 +127,17 @@ ImageLayerD3D10::RenderLayer()
     CairoImage *cairoImage =
       static_cast<CairoImage*>(image.get());
 
     if (!cairoImage->mSurface) {
       return;
     }
 
     if (!cairoImage->GetBackendData(LayerManager::LAYERS_D3D10)) {
-      nsAutoPtr<CairoD3D10BackendData> dat = new CairoD3D10BackendData();
+      nsAutoPtr<CairoD3D10BackendData> dat(new CairoD3D10BackendData());
       dat->mTexture = SurfaceToTexture(device(), cairoImage->mSurface, cairoImage->mSize);
 
       if (dat->mTexture) {
         device()->CreateShaderResourceView(dat->mTexture, NULL, getter_AddRefs(dat->mSRView));
         cairoImage->SetBackendData(LayerManager::LAYERS_D3D10, dat.forget());
       }
     }
 
@@ -271,18 +271,18 @@ ImageLayerD3D10::RenderLayer()
       SetFloatVector(ShaderConstantRectD3D10(0, 0, 1.0f, 1.0f));
   }
 
   GetContainer()->NotifyPaintedImage(image);
 }
 
 void ImageLayerD3D10::AllocateTexturesYCbCr(PlanarYCbCrImage *aImage)
 {
-  nsAutoPtr<PlanarYCbCrD3D10BackendData> backendData =
-    new PlanarYCbCrD3D10BackendData;
+  nsAutoPtr<PlanarYCbCrD3D10BackendData> backendData(
+    new PlanarYCbCrD3D10BackendData);
 
   PlanarYCbCrImage::Data &data = aImage->mData;
 
   D3D10_SUBRESOURCE_DATA dataY;
   D3D10_SUBRESOURCE_DATA dataCb;
   D3D10_SUBRESOURCE_DATA dataCr;
   CD3D10_TEXTURE2D_DESC descY(DXGI_FORMAT_R8_UNORM,
                               data.mYSize.width,
--- a/gfx/layers/d3d9/ImageLayerD3D9.cpp
+++ b/gfx/layers/d3d9/ImageLayerD3D9.cpp
@@ -136,18 +136,18 @@ SurfaceToTexture(IDirect3DDevice9 *aDevi
 
   return texture.forget();
 }
 
 static void AllocateTexturesYCbCr(PlanarYCbCrImage *aImage,
                                   IDirect3DDevice9 *aDevice,
                                   LayerManagerD3D9 *aManager)
 {
-  nsAutoPtr<PlanarYCbCrD3D9BackendData> backendData =
-    new PlanarYCbCrD3D9BackendData;
+  nsAutoPtr<PlanarYCbCrD3D9BackendData> backendData(
+    new PlanarYCbCrD3D9BackendData);
 
   PlanarYCbCrImage::Data &data = aImage->mData;
 
   D3DLOCKED_RECT lockrectY;
   D3DLOCKED_RECT lockrectCb;
   D3DLOCKED_RECT lockrectCr;
   PRUint8* src;
   PRUint8* dest;
@@ -318,17 +318,17 @@ ImageLayerD3D9::RenderLayer()
     CairoImage *cairoImage =
       static_cast<CairoImage*>(image.get());
 
     if (!cairoImage->mSurface) {
       return;
     }
 
     if (!cairoImage->GetBackendData(LayerManager::LAYERS_D3D9)) {
-      nsAutoPtr<CairoD3D9BackendData> dat = new CairoD3D9BackendData();
+      nsAutoPtr<CairoD3D9BackendData> dat(new CairoD3D9BackendData());
       dat->mTexture = SurfaceToTexture(device(), cairoImage->mSurface, cairoImage->mSize);
 
       if (dat->mTexture) {
         cairoImage->SetBackendData(LayerManager::LAYERS_D3D9, dat.forget());
       }
     }
 
     CairoD3D9BackendData *data =