Bug 1272877 - Allow access to derived Image classes; r=sotaro

MozReview-Commit-ID: 3fXjwaDN5KV

--HG--
extra : rebase_source : 7da96726ab3f9664f3dc9efb9927e1cfc1337c40
This commit is contained in:
Munro Mengjue Chiang 2016-08-23 15:44:40 +08:00
parent b55bb2b76f
commit 66b4d655fb
2 changed files with 6 additions and 0 deletions

View File

@ -22,6 +22,10 @@ public:
explicit GLImage(ImageFormat aFormat) : Image(nullptr, aFormat){}
virtual already_AddRefed<gfx::SourceSurface> GetAsSourceSurface() override;
GLImage* AsGLImage() override {
return this;
}
};
class EGLImageImage : public GLImage {

View File

@ -163,6 +163,7 @@ protected:
};
/* Forward declarations for Image derivatives. */
class GLImage;
class EGLImageImage;
class SharedRGBImage;
#ifdef MOZ_WIDGET_ANDROID
@ -230,6 +231,7 @@ public:
/* Access to derived classes. */
virtual EGLImageImage* AsEGLImageImage() { return nullptr; }
virtual GLImage* AsGLImage() { return nullptr; }
#ifdef MOZ_WIDGET_ANDROID
virtual SurfaceTextureImage* AsSurfaceTextureImage() { return nullptr; }
#endif