mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 895855 - [WebGL 2.0] Build error when using --disable-webgl. r=bjacob
This commit is contained in:
parent
e54eb27318
commit
b85cdb7050
@ -4,13 +4,7 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsIDOMWebGLRenderingContext.h"
|
||||
#include "WebGL2Context.h"
|
||||
|
||||
#define DUMMY(func,rtype) nsresult func (rtype ** aResult) { return NS_ERROR_FAILURE; }
|
||||
|
||||
DUMMY(NS_NewCanvasRenderingContextWebGL, nsIDOMWebGLRenderingContext)
|
||||
|
||||
WebGL2Context * WebGL2Context::Create()
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -31,7 +31,9 @@
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsStreamUtils.h"
|
||||
|
||||
#ifdef MOZ_WEBGL
|
||||
#include "../canvas/src/WebGL2Context.h"
|
||||
#endif
|
||||
|
||||
using namespace mozilla::layers;
|
||||
|
||||
@ -684,8 +686,9 @@ HTMLCanvasElement::GetContextHelper(const nsAString& aContextId,
|
||||
ctx.forget(aContext);
|
||||
return NS_OK;
|
||||
}
|
||||
else if (WebGL2Context::IsSupported() &&
|
||||
aContextId.EqualsLiteral("experimental-webgl2"))
|
||||
#ifdef MOZ_WEBGL
|
||||
if (WebGL2Context::IsSupported() &&
|
||||
aContextId.EqualsLiteral("experimental-webgl2"))
|
||||
{
|
||||
Telemetry::Accumulate(Telemetry::CANVAS_WEBGL_USED, 1);
|
||||
nsRefPtr<WebGL2Context> ctx = WebGL2Context::Create();
|
||||
@ -698,6 +701,7 @@ HTMLCanvasElement::GetContextHelper(const nsAString& aContextId,
|
||||
ctx.forget(aContext);
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
NS_ConvertUTF16toUTF8 ctxId(aContextId);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user