mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
merge backout
This commit is contained in:
commit
32a88d01fa
@ -571,11 +571,6 @@ public:
|
||||
#endif
|
||||
}
|
||||
|
||||
enum ContextFlags {
|
||||
ContextFlagsNone = 0x0,
|
||||
ContextFlagsGlobal = 0x1
|
||||
};
|
||||
|
||||
enum GLContextType {
|
||||
ContextTypeUnknown,
|
||||
ContextTypeWGL,
|
||||
|
@ -590,8 +590,7 @@ CreateOffscreenFBOContext(const ContextFormat& aFormat,
|
||||
|
||||
already_AddRefed<GLContext>
|
||||
GLContextProviderCGL::CreateOffscreen(const gfxIntSize& aSize,
|
||||
const ContextFormat& aFormat,
|
||||
const ContextFlags flags)
|
||||
const ContextFormat& aFormat)
|
||||
{
|
||||
ContextFormat actualFormat(aFormat);
|
||||
|
||||
|
@ -1898,8 +1898,7 @@ GLContextEGL::CreateEGLPixmapOffscreenContext(const gfxIntSize& aSize,
|
||||
// often without the ability to texture from them directly.
|
||||
already_AddRefed<GLContext>
|
||||
GLContextProviderEGL::CreateOffscreen(const gfxIntSize& aSize,
|
||||
const ContextFormat& aFormat,
|
||||
const ContextFlags aFlags)
|
||||
const ContextFormat& aFormat)
|
||||
{
|
||||
if (!sEGLLibrary.EnsureInitialized()) {
|
||||
return nsnull;
|
||||
@ -1919,7 +1918,7 @@ GLContextProviderEGL::CreateOffscreen(const gfxIntSize& aSize,
|
||||
return nsnull;
|
||||
|
||||
gfxIntSize fboSize = usePBuffers ? glContext->OffscreenActualSize() : aSize;
|
||||
if (!(aFlags & ContextFlagsGlobal) && !glContext->ResizeOffscreenFBO(fboSize, !usePBuffers))
|
||||
if (!glContext->ResizeOffscreenFBO(fboSize, !usePBuffers))
|
||||
return nsnull;
|
||||
|
||||
return glContext.forget();
|
||||
@ -1930,7 +1929,7 @@ GLContextProviderEGL::CreateOffscreen(const gfxIntSize& aSize,
|
||||
if (!glContext)
|
||||
return nsnull;
|
||||
|
||||
if (!(aFlags & ContextFlagsGlobal) && !glContext->ResizeOffscreenFBO(glContext->OffscreenActualSize(), true))
|
||||
if (!glContext->ResizeOffscreenFBO(glContext->OffscreenActualSize(), true))
|
||||
return nsnull;
|
||||
|
||||
return glContext.forget();
|
||||
@ -1942,7 +1941,7 @@ GLContextProviderEGL::CreateOffscreen(const gfxIntSize& aSize,
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
if (!(aFlags & ContextFlagsGlobal) && !gUseBackingSurface && !glContext->ResizeOffscreenFBO(glContext->OffscreenActualSize(), true)) {
|
||||
if (!gUseBackingSurface && !glContext->ResizeOffscreenFBO(glContext->OffscreenActualSize(), true)) {
|
||||
// we weren't able to create the initial
|
||||
// offscreen FBO, so this is dead
|
||||
return nsnull;
|
||||
@ -2001,8 +2000,7 @@ GLContextProviderEGL::GetGlobalContext()
|
||||
// CreateOffscreen can call us re-entrantly.
|
||||
nsRefPtr<GLContext> ctx =
|
||||
GLContextProviderEGL::CreateOffscreen(gfxIntSize(16, 16),
|
||||
ContextFormat(ContextFormat::BasicRGB24),
|
||||
GLContext::ContextFlagsGlobal);
|
||||
ContextFormat(ContextFormat::BasicRGB24));
|
||||
gGlobalContext = ctx;
|
||||
if (gGlobalContext)
|
||||
gGlobalContext->SetIsGlobalSharedContext(true);
|
||||
|
@ -1292,8 +1292,7 @@ DONE_CREATING_PIXMAP:
|
||||
|
||||
already_AddRefed<GLContext>
|
||||
GLContextProviderGLX::CreateOffscreen(const gfxIntSize& aSize,
|
||||
const ContextFormat& aFormat,
|
||||
const ContextFlags)
|
||||
const ContextFormat& aFormat)
|
||||
{
|
||||
nsRefPtr<GLContextGLX> glContext =
|
||||
CreateOffscreenPixmapContext(aSize, aFormat, true);
|
||||
|
@ -45,7 +45,6 @@
|
||||
class THEBES_API GL_CONTEXT_PROVIDER_NAME
|
||||
{
|
||||
public:
|
||||
typedef GLContext::ContextFlags ContextFlags;
|
||||
/**
|
||||
* Create a context that renders to the surface of the widget that is
|
||||
* passed in. The context is always created with an RGB pixel format,
|
||||
@ -91,8 +90,7 @@ public:
|
||||
*/
|
||||
static already_AddRefed<GLContext>
|
||||
CreateOffscreen(const gfxIntSize& aSize,
|
||||
const ContextFormat& aFormat = ContextFormat::BasicRGBA32Format,
|
||||
const ContextFlags aFlags = GLContext::ContextFlagsNone);
|
||||
const ContextFormat& aFormat = ContextFormat::BasicRGBA32Format);
|
||||
|
||||
/**
|
||||
* Try to create a GL context from native surface for arbitrary gfxASurface
|
||||
|
@ -46,8 +46,7 @@ GLContextProviderNull::CreateForWindow(nsIWidget*)
|
||||
|
||||
already_AddRefed<GLContext>
|
||||
GLContextProviderNull::CreateOffscreen(const gfxIntSize&,
|
||||
const ContextFormat&,
|
||||
const ContextFlags)
|
||||
const ContextFormat&)
|
||||
{
|
||||
return nsnull;
|
||||
}
|
||||
|
@ -259,8 +259,7 @@ GLContextProviderOSMesa::CreateForWindow(nsIWidget *aWidget)
|
||||
|
||||
already_AddRefed<GLContext>
|
||||
GLContextProviderOSMesa::CreateOffscreen(const gfxIntSize& aSize,
|
||||
const ContextFormat& aFormat,
|
||||
const ContextFlags)
|
||||
const ContextFormat& aFormat)
|
||||
{
|
||||
if (!sOSMesaLibrary.EnsureInitialized()) {
|
||||
return nsnull;
|
||||
|
@ -751,8 +751,7 @@ CreateWindowOffscreenContext(const ContextFormat& aFormat)
|
||||
|
||||
already_AddRefed<GLContext>
|
||||
GLContextProviderWGL::CreateOffscreen(const gfxIntSize& aSize,
|
||||
const ContextFormat& aFormat,
|
||||
const ContextFlags)
|
||||
const ContextFormat& aFormat)
|
||||
{
|
||||
if (!sWGLLibrary.EnsureInitialized()) {
|
||||
return nsnull;
|
||||
|
Loading…
Reference in New Issue
Block a user