mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 966543 - null check mSurface in MacIOSurfaceTextureHostOGL. r=nical
This commit is contained in:
parent
b03da0f6e7
commit
bccfc9bf4a
@ -46,7 +46,7 @@ MacIOSurfaceTextureHostOGL::MacIOSurfaceTextureHostOGL(TextureFlags aFlags,
|
||||
bool
|
||||
MacIOSurfaceTextureHostOGL::Lock()
|
||||
{
|
||||
if (!mCompositor) {
|
||||
if (!mCompositor || !mSurface) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -95,11 +95,17 @@ MacIOSurfaceTextureSourceOGL::gl() const
|
||||
|
||||
gfx::SurfaceFormat
|
||||
MacIOSurfaceTextureHostOGL::GetFormat() const {
|
||||
if (!mSurface) {
|
||||
return gfx::SurfaceFormat::UNKNOWN;
|
||||
}
|
||||
return mSurface->HasAlpha() ? gfx::SurfaceFormat::R8G8B8A8 : gfx::SurfaceFormat::B8G8R8X8;
|
||||
}
|
||||
|
||||
gfx::IntSize
|
||||
MacIOSurfaceTextureHostOGL::GetSize() const {
|
||||
if (!mSurface) {
|
||||
return gfx::IntSize();
|
||||
}
|
||||
return gfx::IntSize(mSurface->GetDevicePixelWidth(),
|
||||
mSurface->GetDevicePixelHeight());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user