| 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 {
|
|
|