mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 879304 - Add "webgl.max-warnings-per-context" preference. r=bjacob
This commit is contained in:
parent
402c1c9beb
commit
a29fd38573
@ -189,6 +189,12 @@ WebGLContext::WebGLContext()
|
||||
|
||||
mAlreadyGeneratedWarnings = 0;
|
||||
mAlreadyWarnedAboutFakeVertexAttrib0 = false;
|
||||
mMaxWarnings = Preferences::GetInt("webgl.max-warnings-per-context", 32);
|
||||
if (mMaxWarnings < -1)
|
||||
{
|
||||
GenerateWarning("webgl.max-warnings-per-context size is too large (seems like a negative value wrapped)");
|
||||
mMaxWarnings = 0;
|
||||
}
|
||||
|
||||
mLastUseIndex = 0;
|
||||
|
||||
|
@ -1134,10 +1134,15 @@ protected:
|
||||
int mDrawCallsSinceLastFlush;
|
||||
|
||||
int mAlreadyGeneratedWarnings;
|
||||
int mMaxWarnings;
|
||||
bool mAlreadyWarnedAboutFakeVertexAttrib0;
|
||||
|
||||
bool ShouldGenerateWarnings() const {
|
||||
return mAlreadyGeneratedWarnings < 32;
|
||||
if (mMaxWarnings == -1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return mAlreadyGeneratedWarnings < mMaxWarnings;
|
||||
}
|
||||
|
||||
uint64_t mLastUseIndex;
|
||||
|
@ -3962,6 +3962,7 @@ pref("webgl.default-no-alpha", false);
|
||||
pref("webgl.force-layers-readback", false);
|
||||
pref("webgl.lose-context-on-heap-minimize", false);
|
||||
pref("webgl.can-lose-context-in-foreground", true);
|
||||
pref("webgl.max-warnings-per-context", 32);
|
||||
|
||||
// Stagefright prefs
|
||||
pref("stagefright.force-enabled", false);
|
||||
|
Loading…
Reference in New Issue
Block a user