finally fix gcc building fully

This commit is contained in:
wuggy 2026-04-19 19:28:17 -07:00
commit 7917e6bed3
12 changed files with 60 additions and 13 deletions

View file

@ -843,9 +843,11 @@ WebGLContext::ThrowEvent_WebGLContextCreationError(const nsACString& text)
}
NS_IMETHODIMP
WebGLContext::InitializeWithDrawTarget(nsIDocShell*,
NotNull<gfx::DrawTarget*>)
WebGLContext::InitializeWithDrawTarget(nsIDocShell* aDocShell,
NotNull<gfx::DrawTarget*> aTarget)
{
(void)aDocShell;
(void)aTarget;
return NS_ERROR_NOT_IMPLEMENTED;
}

View file

@ -0,0 +1,30 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#if defined(__MINGW32__) && defined(__i386__)
#include "WebGLContext.h"
namespace mozilla {
extern "C" nsresult __attribute__((stdcall))
WebGLContext_InitializeWithDrawTarget_stdcall(
WebGLContext* self,
nsIDocShell* aDocShell,
NotNull<gfx::DrawTarget*> aDrawTarget)
__asm__("__ZN7mozilla12WebGLContext24InitializeWithDrawTargetEP11nsIDocShellNS_7NotNullIPNS_3gfx10DrawTargetEEE@12");
extern "C" nsresult __attribute__((stdcall))
WebGLContext_InitializeWithDrawTarget_stdcall(
WebGLContext* self,
nsIDocShell* aDocShell,
NotNull<gfx::DrawTarget*> aDrawTarget)
{
return self->WebGLContext::InitializeWithDrawTarget(aDocShell, aDrawTarget);
}
} // namespace mozilla
#endif

View file

@ -57,6 +57,11 @@ SOURCES += [
'ImageUtils.cpp',
]
if CONFIG['GNU_CC'] and CONFIG['CPU_ARCH'] == 'x86' and CONFIG['OS_ARCH'] == 'WINNT':
SOURCES += [
'WebGLContext_mingw_compat.cpp',
]
# WebGL Sources
UNIFIED_SOURCES += [
'TexUnpackBlob.cpp',
@ -79,7 +84,6 @@ UNIFIED_SOURCES += [
'WebGL2ContextVertices.cpp',
'WebGLActiveInfo.cpp',
'WebGLBuffer.cpp',
'WebGLContext.cpp',
'WebGLContextBuffers.cpp',
'WebGLContextDraw.cpp',
'WebGLContextExtensions.cpp',
@ -151,6 +155,7 @@ UNIFIED_SOURCES += [
SOURCES += [
'MurmurHash3.cpp',
'WebGLContext.cpp',
]
# Suppress warnings from third-party code.