Bug 944679 - Do not return nullptr in DeprecatedTextureHostBasic::GetAsSurface. r=nical
authorAndreas Pehrson <pehrsons@gmail.com>
Fri, 29 Nov 2013 13:39:52 +0100
changeset 174335 a7c22bdbf800459aa6d0f9f0a0ee07a1636bb043
parent 174334 fdd48523bfbe0dac009be30e989a6aec6271259f
child 174336 a683f61403a18a000e4184abba6ff520fe3c81e8
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical
bugs944679
milestone28.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 944679 - Do not return nullptr in DeprecatedTextureHostBasic::GetAsSurface. r=nical
gfx/layers/basic/BasicCompositor.cpp
--- a/gfx/layers/basic/BasicCompositor.cpp
+++ b/gfx/layers/basic/BasicCompositor.cpp
@@ -118,17 +118,20 @@ protected:
     return true;
   }
 
   virtual bool Lock() MOZ_OVERRIDE {
     return EnsureSurface();
   }
 
   virtual TemporaryRef<gfx::DataSourceSurface> GetAsSurface() MOZ_OVERRIDE {
-    return nullptr;
+    if (!mSurface) {
+        return nullptr;
+    }
+    return mSurface->GetDataSurface();
   }
 
   BasicCompositor *mCompositor;
   RefPtr<SourceSurface> mSurface;
   IntSize mSize;
   SurfaceFormat mFormat;
 };