mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 888445 - Only use SkiaGL canvas on NVIDIA r=bjacob
This commit is contained in:
parent
1561ddb942
commit
5d2fe5dbb6
@ -104,6 +104,7 @@
|
||||
#include "GLContextProvider.h"
|
||||
#include "GLContextSkia.h"
|
||||
#include "SurfaceTypes.h"
|
||||
#include "nsIGfxInfo.h"
|
||||
using mozilla::gl::GLContext;
|
||||
using mozilla::gl::GLContextProvider;
|
||||
#endif
|
||||
@ -873,8 +874,14 @@ CanvasRenderingContext2D::EnsureTarget()
|
||||
DemoteOldestContextIfNecessary();
|
||||
|
||||
nsRefPtr<GLContext> glContext;
|
||||
nsCOMPtr<nsIGfxInfo> gfxInfo = do_GetService("@mozilla.org/gfx/info;1");
|
||||
nsString vendor;
|
||||
|
||||
if (!mForceSoftware) {
|
||||
if (!mForceSoftware &&
|
||||
gfxInfo &&
|
||||
NS_SUCCEEDED(gfxInfo->GetAdapterVendorID(vendor)) &&
|
||||
StringBeginsWith(vendor, NS_LITERAL_STRING("NVIDIA")))
|
||||
{
|
||||
glContext = GLContextProvider::CreateOffscreen(gfxIntSize(size.width, size.height),
|
||||
caps, GLContext::ContextFlagsNone);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user