Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGLTimerQueryEXT.cpp

Issue 1800383002: Disable timestamps in WebGL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mark the test as no longer flaky Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/webgl/WebGLTimerQueryEXT.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLTimerQueryEXT.cpp b/third_party/WebKit/Source/modules/webgl/WebGLTimerQueryEXT.cpp
index e4518f11d3004f9b0fc04784cede656a1885951c..16a0fb913fdf85d178d21e49574bb2c99242fc53 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLTimerQueryEXT.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLTimerQueryEXT.cpp
@@ -56,6 +56,13 @@ void WebGLTimerQueryEXT::updateCachedResult(WebGraphicsContext3D* ctx)
if (!hasTarget())
return;
+ // If this is a timestamp query, set the result to 0 and make it available as we don't support timestamps in WebGL due to very poor driver support for them
+ if (m_target == GL_TIMESTAMP_EXT) {
+ m_queryResult = 0;
+ m_queryResultAvailable = true;
+ return;
+ }
+
// We can only update the cached result when control returns to the browser.
m_canUpdateAvailability = false;
GLuint available = 0;

Powered by Google App Engine
This is Rietveld 408576698