From 81a809d4a184b55ff2acb43e8a100f75fc1ddbce Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Tue, 7 Jan 2025 05:42:30 -0800 Subject: [PATCH] Get rid of extraneous logging in PowGl. --- src/lib/workers/powgl.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/lib/workers/powgl.ts b/src/lib/workers/powgl.ts index ef1683a..82f6bf8 100644 --- a/src/lib/workers/powgl.ts +++ b/src/lib/workers/powgl.ts @@ -343,7 +343,6 @@ void main() { const work = new Uint8Array(8) let start: DOMHighResTimeStamp const draw = (): void => { - start = performance.now() if (PowGl.#gl == null) throw new Error('WebGL 2 is required') if (PowGl.#query == null) throw new Error('WebGL 2 is required to run queries') PowGl.#gl.clear(PowGl.#gl.COLOR_BUFFER_BIT) @@ -364,20 +363,16 @@ void main() { function checkQueryResult () { if (PowGl.#gl == null) throw new Error('WebGL 2 is required to check query results') if (PowGl.#query == null) throw new Error('Query not found') - console.log(`checking (${performance.now() - start} ms)`) if (PowGl.#gl.getQueryParameter(PowGl.#query, PowGl.#gl.QUERY_RESULT_AVAILABLE)) { - console.log(`AVAILABLE (${performance.now() - start} ms)`) const anySamplesPassed = PowGl.#gl.getQueryParameter(PowGl.#query, PowGl.#gl.QUERY_RESULT) if (anySamplesPassed) { // A valid nonce was found readBackResult() } else { - console.log(`not found (${performance.now() - start} ms)`) // No valid nonce found, start the next draw call requestAnimationFrame(draw) } } else { - console.log(`not ready (${performance.now() - start} ms)`) // Query result not yet available, check again in the next frame requestAnimationFrame(checkQueryResult) } @@ -388,7 +383,6 @@ void main() { // Check the pixels for any success for (let i = 0; i < PowGl.#pixels.length; i += 4) { if (PowGl.#pixels[i] !== 0) { - console.log(`FOUND (${performance.now() - start} ms)`) const hex = PowGl.#hexify(work.subarray(4, 8)) + PowGl.#hexify([ PowGl.#pixels[i + 2], PowGl.#pixels[i + 3], -- 2.34.1