mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 902474 - Require a minimum size of 16x16 to use SkiaGL r=mattwoodrow
This commit is contained in:
parent
33c8aceca1
commit
9dffd3edff
@ -800,6 +800,13 @@ CanvasRenderingContext2D::AddDemotableContext(CanvasRenderingContext2D* context)
|
||||
DemotableContexts().push_back(context);
|
||||
}
|
||||
|
||||
#define MIN_SKIA_GL_DIMENSION 16
|
||||
|
||||
bool
|
||||
CheckSizeForSkiaGL(IntSize size) {
|
||||
return size.width > MIN_SKIA_GL_DIMENSION && size.height > MIN_SKIA_GL_DIMENSION;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void
|
||||
@ -845,7 +852,7 @@ CanvasRenderingContext2D::EnsureTarget()
|
||||
nsCOMPtr<nsIGfxInfo> gfxInfo = do_GetService("@mozilla.org/gfx/info;1");
|
||||
nsString vendor;
|
||||
|
||||
if (!mForceSoftware)
|
||||
if (!mForceSoftware && CheckSizeForSkiaGL(size))
|
||||
{
|
||||
glContext = GLContextProvider::CreateOffscreen(gfxIntSize(size.width, size.height),
|
||||
caps, GLContext::ContextFlagsNone);
|
||||
|
Loading…
Reference in New Issue
Block a user