Bug 1745308 - Only warn once if ClientWaitSync cannot return availability. r=gfx-reviewers,nical
This avoids spamming warnings across IPC that sometimes causes shmem exhaustion. Differential Revision: https://phabricator.services.mozilla.com/D133829
This commit is contained in:
@@ -5119,9 +5119,12 @@ GLenum ClientWebGLContext::ClientWaitSync(WebGLSyncJS& sync,
|
||||
const bool canBeAvailable =
|
||||
(sync.mCanBeAvailable || StaticPrefs::webgl_allow_immediate_queries());
|
||||
if (!canBeAvailable) {
|
||||
EnqueueWarning(
|
||||
"ClientWaitSync must return TIMEOUT_EXPIRED until control has"
|
||||
" returned to the user agent's main loop.");
|
||||
if (!sync.mHasWarnedNotAvailable) {
|
||||
EnqueueWarning(
|
||||
"ClientWaitSync must return TIMEOUT_EXPIRED until control has"
|
||||
" returned to the user agent's main loop. (only warns once)");
|
||||
sync.mHasWarnedNotAvailable = true;
|
||||
}
|
||||
return LOCAL_GL_TIMEOUT_EXPIRED;
|
||||
}
|
||||
|
||||
|
||||
@@ -485,6 +485,7 @@ class WebGLSyncJS final : public nsWrapperCache,
|
||||
friend class webgl::AvailabilityRunnable;
|
||||
|
||||
bool mCanBeAvailable = false;
|
||||
bool mHasWarnedNotAvailable = false;
|
||||
bool mSignaled = false;
|
||||
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user