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

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGLQuery.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/WebGLQuery.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLQuery.cpp b/third_party/WebKit/Source/modules/webgl/WebGLQuery.cpp
index 910cca492426bb0af0196db43df3c148acc29217..ec6be74381b2ee7d86993451c5444e29b82586b4 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLQuery.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLQuery.cpp
@@ -4,6 +4,7 @@
#include "modules/webgl/WebGLQuery.h"
+#include "gpu/command_buffer/client/gles2_interface.h"
#include "modules/webgl/WebGL2RenderingContextBase.h"
#include "public/platform/Platform.h"
@@ -57,7 +58,7 @@ void WebGLQuery::resetCachedResult()
registerTaskObserver();
}
-void WebGLQuery::updateCachedResult(WebGraphicsContext3D* ctx)
+void WebGLQuery::updateCachedResult(gpu::gles2::GLES2Interface* gl)
{
if (m_queryResultAvailable)
return;
@@ -71,11 +72,11 @@ void WebGLQuery::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) {
GLuint result = 0;
- ctx->getQueryObjectuivEXT(object(), GL_QUERY_RESULT_EXT, &result);
+ gl->GetQueryObjectuivEXT(object(), GL_QUERY_RESULT_EXT, &result);
m_queryResult = result;
unregisterTaskObserver();
}

Powered by Google App Engine
This is Rietveld 408576698