mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 863477 - Use SurfaceCaps::Any() for CreateOffscreen for GLContexts for NPAPI plugins. r=cpeterson
This commit is contained in:
parent
27cb228e61
commit
1eda226668
@ -83,8 +83,8 @@ static bool EnsureGLContext()
|
||||
{
|
||||
if (!sPluginContext) {
|
||||
gfxIntSize dummySize(16, 16);
|
||||
GLContext::SurfaceCaps dummyCaps;
|
||||
sPluginContext = GLContextProvider::CreateOffscreen(dummySize, dummyCaps);
|
||||
sPluginContext = GLContextProvider::CreateOffscreen(dummySize,
|
||||
GLContext::SurfaceCaps::Any());
|
||||
}
|
||||
|
||||
return sPluginContext != nullptr;
|
||||
|
@ -869,9 +869,12 @@ GLContext::UpdatePixelFormat()
|
||||
PixelBufferFormat format = QueryPixelFormat();
|
||||
#ifdef DEBUG
|
||||
const SurfaceCaps& caps = Caps();
|
||||
MOZ_ASSERT(!caps.any, "Did you forget to DetermineCaps()?");
|
||||
|
||||
MOZ_ASSERT(caps.color == !!format.red);
|
||||
MOZ_ASSERT(caps.color == !!format.green);
|
||||
MOZ_ASSERT(caps.color == !!format.blue);
|
||||
|
||||
MOZ_ASSERT(caps.alpha == !!format.alpha);
|
||||
MOZ_ASSERT(caps.depth == !!format.depth);
|
||||
MOZ_ASSERT(caps.stencil == !!format.stencil);
|
||||
|
@ -1195,7 +1195,10 @@ public:
|
||||
fViewport(0, 0, size.width, size.height);
|
||||
|
||||
mCaps = mScreen->Caps();
|
||||
UpdateGLFormats(caps);
|
||||
if (mCaps.any)
|
||||
DetermineCaps();
|
||||
|
||||
UpdateGLFormats(mCaps);
|
||||
UpdatePixelFormat();
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user