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

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

Issue 1824433002: Remove getError() and synthesizeGLError() from WebGraphicsContext3D. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@simples-tplus
Patch Set: 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/EXTDisjointTimerQuery.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/EXTDisjointTimerQuery.cpp b/third_party/WebKit/Source/modules/webgl/EXTDisjointTimerQuery.cpp
index f243117c210c3567f80cdeb8a14fb0e8918def08..c93cecfc37fdb3d81b1c8f730635dd95d983fa27 100644
--- a/third_party/WebKit/Source/modules/webgl/EXTDisjointTimerQuery.cpp
+++ b/third_party/WebKit/Source/modules/webgl/EXTDisjointTimerQuery.cpp
@@ -75,22 +75,22 @@ void EXTDisjointTimerQuery::beginQueryEXT(GLenum target, WebGLTimerQueryEXT* que
return;
if (!query || query->isDeleted() || !query->validate(0, scoped.context())) {
- scoped.context()->webContext()->synthesizeGLError(GL_INVALID_OPERATION);
+ scoped.context()->synthesizeGLError(GL_INVALID_OPERATION, "beginQueryEXT", "invalid query");
return;
}
if (target != GL_TIME_ELAPSED_EXT) {
- scoped.context()->webContext()->synthesizeGLError(GL_INVALID_ENUM);
+ scoped.context()->synthesizeGLError(GL_INVALID_ENUM, "beginQueryEXT", "invalid target");
return;
}
- if (m_currentElapsedQuery.get()) {
- scoped.context()->webContext()->synthesizeGLError(GL_INVALID_OPERATION);
+ if (m_currentElapsedQuery) {
+ scoped.context()->synthesizeGLError(GL_INVALID_OPERATION, "beginQueryEXT", "no current query");
return;
}
if (query->hasTarget() && query->target() != target) {
- scoped.context()->webContext()->synthesizeGLError(GL_INVALID_OPERATION);
+ scoped.context()->synthesizeGLError(GL_INVALID_OPERATION, "beginQueryEXT", "target does not match query");
return;
}
@@ -106,12 +106,12 @@ void EXTDisjointTimerQuery::endQueryEXT(GLenum target)
return;
if (target != GL_TIME_ELAPSED_EXT) {
- scoped.context()->webContext()->synthesizeGLError(GL_INVALID_ENUM);
+ scoped.context()->synthesizeGLError(GL_INVALID_ENUM, "endQueryEXT", "invalid target");
return;
}
if (!m_currentElapsedQuery) {
- scoped.context()->webContext()->synthesizeGLError(GL_INVALID_OPERATION);
+ scoped.context()->synthesizeGLError(GL_INVALID_OPERATION, "endQueryEXT", "no current query");
return;
}
@@ -127,17 +127,17 @@ void EXTDisjointTimerQuery::queryCounterEXT(WebGLTimerQueryEXT* query, GLenum ta
return;
if (!query || query->isDeleted() || !query->validate(0, scoped.context())) {
- scoped.context()->webContext()->synthesizeGLError(GL_INVALID_OPERATION);
+ scoped.context()->synthesizeGLError(GL_INVALID_OPERATION, "queryCounterEXT", "invalid query");
return;
}
if (target != GL_TIMESTAMP_EXT) {
- scoped.context()->webContext()->synthesizeGLError(GL_INVALID_ENUM);
+ scoped.context()->synthesizeGLError(GL_INVALID_ENUM, "queryCounterEXT", "invalid target");
return;
}
if (query->hasTarget() && query->target() != target) {
- scoped.context()->webContext()->synthesizeGLError(GL_INVALID_OPERATION);
+ scoped.context()->synthesizeGLError(GL_INVALID_OPERATION, "queryCounterEXT", "target does not match query");
return;
}
@@ -168,7 +168,7 @@ ScriptValue EXTDisjointTimerQuery::getQueryEXT(ScriptState* scriptState, GLenum
}
}
- scoped.context()->webContext()->synthesizeGLError(GL_INVALID_ENUM);
+ scoped.context()->synthesizeGLError(GL_INVALID_ENUM, "getQueryEXT", "invalid target or pname");
return ScriptValue::createNull(scriptState);
}
@@ -179,7 +179,7 @@ ScriptValue EXTDisjointTimerQuery::getQueryObjectEXT(ScriptState* scriptState, W
return ScriptValue::createNull(scriptState);
if (!query || query->isDeleted() || !query->validate(0, scoped.context()) || m_currentElapsedQuery == query) {
- scoped.context()->webContext()->synthesizeGLError(GL_INVALID_OPERATION);
+ scoped.context()->synthesizeGLError(GL_INVALID_OPERATION, "getQueryObjectEXT", "invalid query");
return ScriptValue::createNull(scriptState);
}
@@ -193,7 +193,7 @@ ScriptValue EXTDisjointTimerQuery::getQueryObjectEXT(ScriptState* scriptState, W
return WebGLAny(scriptState, query->isQueryResultAvailable());
}
default:
- scoped.context()->webContext()->synthesizeGLError(GL_INVALID_ENUM);
+ scoped.context()->synthesizeGLError(GL_INVALID_ENUM, "getQueryObjectEXT", "invalid pname");
break;
}

Powered by Google App Engine
This is Rietveld 408576698