зеркало из https://github.com/mozilla/gecko-dev.git
Bug 902474 - Require a minimum size of 16x16 to use SkiaGL r=mattwoodrow
This commit is contained in:
Родитель
eaaf14d541
Коммит
e417fac939
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче