Bug 964745 - GetAsSourceSurface in SharedTextureImage and DeprecatedSharedRGBImage. r=nical
authorAli Akhtarzada <ali@comoyo.com>
Tue, 28 Jan 2014 10:27:36 -0500
changeset 165623 da8c61077b5ad1af09b9336b26c03a642601c31e
parent 165622 be76dc85648200d3df4d4398e444ebee909d7a34
child 165624 4cd2059e557fbb459001b38e790cbc7633898474
push id26098
push userryanvm@gmail.com
push dateTue, 28 Jan 2014 21:25:14 +0000
treeherdermozilla-central@7e79536aca0a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical
bugs964745
milestone29.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 964745 - GetAsSourceSurface in SharedTextureImage and DeprecatedSharedRGBImage. r=nical
gfx/layers/SharedTextureImage.h
gfx/layers/ipc/SharedRGBImage.cpp
gfx/layers/ipc/SharedRGBImage.h
--- a/gfx/layers/SharedTextureImage.h
+++ b/gfx/layers/SharedTextureImage.h
@@ -34,16 +34,21 @@ public:
   const Data* GetData() { return &mData; }
 
   gfx::IntSize GetSize() { return mData.mSize; }
 
   virtual already_AddRefed<gfxASurface> DeprecatedGetAsSurface() {
     return nullptr;
   }
 
+  virtual TemporaryRef<gfx::SourceSurface> GetAsSourceSurface() MOZ_OVERRIDE
+  {
+    return nullptr;
+  }
+
   SharedTextureImage() : Image(nullptr, SHARED_TEXTURE) {}
 
 private:
   Data mData;
 };
 
 } // layers
 } // mozilla
--- a/gfx/layers/ipc/SharedRGBImage.cpp
+++ b/gfx/layers/ipc/SharedRGBImage.cpp
@@ -131,16 +131,22 @@ DeprecatedSharedRGBImage::AllocateBuffer
 }
 
 already_AddRefed<gfxASurface>
 DeprecatedSharedRGBImage::DeprecatedGetAsSurface()
 {
   return nullptr;
 }
 
+TemporaryRef<gfx::SourceSurface>
+DeprecatedSharedRGBImage::GetAsSourceSurface()
+{
+  return nullptr;
+}
+
 bool
 DeprecatedSharedRGBImage::ToSurfaceDescriptor(SurfaceDescriptor& aResult)
 {
   if (!mAllocated) {
     return false;
   }
   this->AddRef();
   aResult = RGBImage(*mShmem,
--- a/gfx/layers/ipc/SharedRGBImage.h
+++ b/gfx/layers/ipc/SharedRGBImage.h
@@ -56,16 +56,17 @@ public:
 
   virtual uint8_t *GetBuffer() MOZ_OVERRIDE;
 
   gfx::IntSize GetSize();
   size_t GetBufferSize();
 
   static uint8_t BytesPerPixel(gfxImageFormat aImageFormat);
   already_AddRefed<gfxASurface> DeprecatedGetAsSurface();
+  virtual TemporaryRef<gfx::SourceSurface> GetAsSourceSurface() MOZ_OVERRIDE;
 
   /**
    * Setup the Surface descriptor to contain this image's shmem, while keeping
    * ownership of the shmem.
    * if the operation succeeds, return true and AddRef this DeprecatedSharedRGBImage.
    */
   bool ToSurfaceDescriptor(SurfaceDescriptor& aResult);