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

Unified Diff: third_party/WebKit/Source/platform/graphics/gpu/SharedContextRateLimiter.cpp

Issue 1817323003: Revert of Remove create/delete methods from WebGraphicsContext3D. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@complex-casts
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/platform/graphics/gpu/SharedContextRateLimiter.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/gpu/SharedContextRateLimiter.cpp b/third_party/WebKit/Source/platform/graphics/gpu/SharedContextRateLimiter.cpp
index 1770d7e6322594dc2f693bd1c651b10220fd0132..4b0dbc740ea5559ae39dc2916482624ae5df356b 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/SharedContextRateLimiter.cpp
+++ b/third_party/WebKit/Source/platform/graphics/gpu/SharedContextRateLimiter.cpp
@@ -43,12 +43,12 @@
return;
gpu::gles2::GLES2Interface* gl = m_contextProvider->contextGL();
+
if (!gl || gl->GetGraphicsResetStatusKHR() != GL_NO_ERROR)
return;
- m_queries.append(0);
- if (m_canUseSyncQueries)
- gl->GenQueriesEXT(1, &m_queries.last());
+ WebGraphicsContext3D* context = m_contextProvider->context3d();
+ m_queries.append(m_canUseSyncQueries ? context->createQueryEXT() : 0);
if (m_canUseSyncQueries) {
gl->BeginQueryEXT(GL_COMMANDS_COMPLETED_CHROMIUM, m_queries.last());
gl->EndQueryEXT(GL_COMMANDS_COMPLETED_CHROMIUM);
@@ -57,7 +57,7 @@
if (m_canUseSyncQueries) {
WGC3Duint result;
gl->GetQueryObjectuivEXT(m_queries.first(), GL_QUERY_RESULT_EXT, &result);
- gl->DeleteQueriesEXT(1, &m_queries.first());
+ context->deleteQueryEXT(m_queries.first());
m_queries.removeFirst();
} else {
gl->Finish();
@@ -73,8 +73,9 @@
gpu::gles2::GLES2Interface* gl = m_contextProvider->contextGL();
if (gl && gl->GetGraphicsResetStatusKHR() == GL_NO_ERROR) {
+ WebGraphicsContext3D* context = m_contextProvider->context3d();
while (m_queries.size() > 0) {
- gl->DeleteQueriesEXT(1, &m_queries.first());
+ context->deleteQueryEXT(m_queries.first());
m_queries.removeFirst();
}
} else {

Powered by Google App Engine
This is Rietveld 408576698