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

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

Issue 1808403002: Move simple methods [F-S] from WebGraphicsContext3D to GLES2Interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bindFoo
Patch Set: simples-fplus: tests 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..7e1fae17dba31d621822c371fccbb28a417c64aa 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLTimerQueryEXT.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLTimerQueryEXT.cpp
@@ -4,6 +4,7 @@
#include "modules/webgl/WebGLTimerQueryEXT.h"
+#include "gpu/command_buffer/client/gles2_interface.h"
#include "modules/webgl/WebGLRenderingContextBase.h"
#include "public/platform/Platform.h"
@@ -45,7 +46,7 @@ void WebGLTimerQueryEXT::resetCachedResult()
registerTaskObserver();
}
-void WebGLTimerQueryEXT::updateCachedResult(WebGraphicsContext3D* ctx)
+void WebGLTimerQueryEXT::updateCachedResult(gpu::gles2::GLES2Interface* gl)
{
if (m_queryResultAvailable)
return;
@@ -59,11 +60,11 @@ void WebGLTimerQueryEXT::updateCachedResult(WebGraphicsContext3D* ctx)
// We can only update the cached result when control returns to the browser.
m_canUpdateAvailability = false;
GLuint available = 0;
- ctx->getQueryObjectuivEXT(object(), GL_QUERY_RESULT_AVAILABLE_EXT, &available);
+ gl->GetQueryObjectuivEXT(object(), GL_QUERY_RESULT_AVAILABLE_EXT, &available);
m_queryResultAvailable = !!available;
if (m_queryResultAvailable) {
GLuint64 result = 0;
- ctx->getQueryObjectui64vEXT(object(), GL_QUERY_RESULT_EXT, &result);
+ gl->GetQueryObjectui64vEXT(object(), GL_QUERY_RESULT_EXT, &result);
m_queryResult = result;
unregisterTaskObserver();
}

Powered by Google App Engine
This is Rietveld 408576698