From 8bb387dc740734b426573f4d77dda8615d20bcf9 Mon Sep 17 00:00:00 2001 From: "Anthony J. Thibault" Date: Wed, 23 Mar 2016 17:11:16 -0700 Subject: [PATCH] Revert GLEscrow changes --- libraries/gl/src/gl/GLEscrow.h | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/libraries/gl/src/gl/GLEscrow.h b/libraries/gl/src/gl/GLEscrow.h index cf96e43e1f..357398c79b 100644 --- a/libraries/gl/src/gl/GLEscrow.h +++ b/libraries/gl/src/gl/GLEscrow.h @@ -71,16 +71,11 @@ public: } bool signaled() const { -#if THREADED_PRESENT auto result = glClientWaitSync(_sync, 0, 0); if (GL_TIMEOUT_EXPIRED != result && GL_WAIT_FAILED != result) { return true; } return false; -#else - glWaitSync(_sync, 0, GL_TIMEOUT_IGNORED); - return true; -#endif } }; @@ -208,15 +203,13 @@ public: // Also releases any previous texture held by the caller bool fetchSignaledAndRelease(T& value) { T originalValue = value; - bool fetched = false; - while (fetchSignaled(value)) { - fetched = true; + if (fetchSignaled(value)) { if (originalValue != invalid()) { release(originalValue); } - originalValue = value; + return true; } - return fetched; + return false; } bool fetchAndReleaseWithFence(T& value, GLsync& sync) {