Bug 615316 - Part 8: Support GetAsSurface for CairoImageD3D9. r=jrmuizel a=blocking-betaN
authorBas Schouten <bschouten@mozilla.com>
Mon, 20 Dec 2010 22:37:11 +0000
changeset 59534 7d05c8f6c4da72ed60a83f08346892d7a3a56ab2
parent 59533 b6e4e41dbee04fdaa0a9100f50f2ef92233ee834
child 59535 6cfc50d8629c0c04ac88bf5e7b5c5dc49e82c9c3
push id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
reviewersjrmuizel, blocking-betaN
bugs615316
milestone2.0b9pre
Bug 615316 - Part 8: Support GetAsSurface for CairoImageD3D9. r=jrmuizel a=blocking-betaN
gfx/layers/d3d9/ImageLayerD3D9.cpp
--- a/gfx/layers/d3d9/ImageLayerD3D9.cpp
+++ b/gfx/layers/d3d9/ImageLayerD3D9.cpp
@@ -584,13 +584,14 @@ CairoImageD3D9::GetOrCreateTexture()
 
   // We need to keep our cached surface around in case the device changes.
   return mTexture;
 }
 
 already_AddRefed<gfxASurface>
 CairoImageD3D9::GetAsSurface()
 {
-  return nsnull;
+  nsRefPtr<gfxASurface> surface = mCachedSurface;
+  return surface.forget();
 }
 
 } /* layers */
 } /* mozilla */