diff options
author | Andrew Osmond <aosmond@mozilla.com> | 2018-02-22 12:11:00 -0500 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-03-14 11:06:35 +0100 |
commit | c0ea2166b946daaad3b2b85b68c5570f9f7822d7 (patch) | |
tree | 24800a260ae6e9c539f2ce0b5c24d9ba4f117685 /gfx/layers/opengl/MacIOSurfaceTextureHostOGL.cpp | |
parent | 686954ea845a7b05a8bdb8d2ed9a002a88e698e6 (diff) | |
download | UXP-c0ea2166b946daaad3b2b85b68c5570f9f7822d7.tar UXP-c0ea2166b946daaad3b2b85b68c5570f9f7822d7.tar.gz UXP-c0ea2166b946daaad3b2b85b68c5570f9f7822d7.tar.lz UXP-c0ea2166b946daaad3b2b85b68c5570f9f7822d7.tar.xz UXP-c0ea2166b946daaad3b2b85b68c5570f9f7822d7.zip |
Bug 1388020. r=nical, a=RyanVM
Diffstat (limited to 'gfx/layers/opengl/MacIOSurfaceTextureHostOGL.cpp')
-rw-r--r-- | gfx/layers/opengl/MacIOSurfaceTextureHostOGL.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gfx/layers/opengl/MacIOSurfaceTextureHostOGL.cpp b/gfx/layers/opengl/MacIOSurfaceTextureHostOGL.cpp index 05f8cf38f..9736618f7 100644 --- a/gfx/layers/opengl/MacIOSurfaceTextureHostOGL.cpp +++ b/gfx/layers/opengl/MacIOSurfaceTextureHostOGL.cpp @@ -28,6 +28,8 @@ MacIOSurfaceTextureHostOGL::~MacIOSurfaceTextureHostOGL() GLTextureSource* MacIOSurfaceTextureHostOGL::CreateTextureSourceForPlane(size_t aPlane) { + MOZ_ASSERT(mSurface); + GLuint textureHandle; gl::GLContext* gl = mCompositor->gl(); gl->fGenTextures(1, &textureHandle); @@ -84,11 +86,17 @@ MacIOSurfaceTextureHostOGL::SetCompositor(Compositor* aCompositor) gfx::SurfaceFormat MacIOSurfaceTextureHostOGL::GetFormat() const { + if (!mSurface) { + return gfx::SurfaceFormat::UNKNOWN; + } return mSurface->GetFormat(); } gfx::SurfaceFormat MacIOSurfaceTextureHostOGL::GetReadFormat() const { + if (!mSurface) { + return gfx::SurfaceFormat::UNKNOWN; + } return mSurface->GetReadFormat(); } |