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

Unified Diff: Source/modules/webgl/WebGLRenderingContextBase.cpp

Issue 1325453007: Added support for EXTDisjointTimerQuery on the Blink side. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: GL_INVALID_ENUM when timer query not enabled for GetParameter, use context3d for deletion Created 5 years, 3 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
« no previous file with comments | « Source/modules/webgl/WebGLRenderingContextBase.h ('k') | Source/modules/webgl/WebGLTimerQueryEXT.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webgl/WebGLRenderingContextBase.cpp
diff --git a/Source/modules/webgl/WebGLRenderingContextBase.cpp b/Source/modules/webgl/WebGLRenderingContextBase.cpp
index fca5c3e2eb1224b37564569495d2ec4ad4a8e37a..2f225860b2304320305e1ee647f405ea9301e660 100644
--- a/Source/modules/webgl/WebGLRenderingContextBase.cpp
+++ b/Source/modules/webgl/WebGLRenderingContextBase.cpp
@@ -2866,6 +2866,17 @@ ScriptValue WebGLRenderingContextBase::getParameter(ScriptState* scriptState, GL
return WebGLAny(scriptState, maxDrawBuffers());
synthesizeGLError(GL_INVALID_ENUM, "getParameter", "invalid parameter name, WEBGL_draw_buffers not enabled");
return ScriptValue::createNull(scriptState);
+ case GL_TIMESTAMP_EXT:
+ if (extensionEnabled(EXTDisjointTimerQueryName))
+ return getInt64Parameter(scriptState, GL_TIMESTAMP_EXT);
+ synthesizeGLError(GL_INVALID_ENUM, "getParameter", "invalid parameter name, EXT_disjoint_timer_query not enabled");
+ return ScriptValue::createNull(scriptState);
+ case GL_GPU_DISJOINT_EXT:
+ if (extensionEnabled(EXTDisjointTimerQueryName))
+ return getBooleanParameter(scriptState, GL_GPU_DISJOINT_EXT);
+ synthesizeGLError(GL_INVALID_ENUM, "getParameter", "invalid parameter name, EXT_disjoint_timer_query not enabled");
+ return ScriptValue::createNull(scriptState);
+
default:
if ((extensionEnabled(WebGLDrawBuffersName) || isWebGL2OrHigher())
&& pname >= GL_DRAW_BUFFER0_EXT
@@ -5168,6 +5179,14 @@ ScriptValue WebGLRenderingContextBase::getIntParameter(ScriptState* scriptState,
return WebGLAny(scriptState, value);
}
+ScriptValue WebGLRenderingContextBase::getInt64Parameter(ScriptState* scriptState, GLenum pname)
+{
+ GLint64 value = 0;
+ if (!isContextLost())
+ webContext()->getInteger64v(pname, &value);
+ return WebGLAny(scriptState, value);
+}
+
ScriptValue WebGLRenderingContextBase::getUnsignedIntParameter(ScriptState* scriptState, GLenum pname)
{
GLint value = 0;
« no previous file with comments | « Source/modules/webgl/WebGLRenderingContextBase.h ('k') | Source/modules/webgl/WebGLTimerQueryEXT.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698