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

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

Issue 1790753002: Expose GLES2Interface to blink, and delete isContextLost() from WGC3D. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wgc3d: deps-for-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/WebGLRenderingContextBase.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
index daa0ac8ad797dc7c1b37fce5fd48bd6ba22da8ce..48a944b355813f88e8d20bc56bc30e77b80bce24 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
@@ -45,6 +45,7 @@
#include "core/layout/LayoutBox.h"
#include "core/loader/FrameLoader.h"
#include "core/loader/FrameLoaderClient.h"
+#include "gpu/command_buffer/client/gles2_interface.h"
#include "modules/webgl/ANGLEInstancedArrays.h"
#include "modules/webgl/CHROMIUMSubscribeUniform.h"
#include "modules/webgl/CHROMIUMValuebuffer.h"
@@ -5072,9 +5073,11 @@ void WebGLRenderingContextBase::setFilterQuality(SkFilterQuality filterQuality)
Extensions3DUtil* WebGLRenderingContextBase::extensionsUtil()
{
if (!m_extensionsUtil) {
- m_extensionsUtil = Extensions3DUtil::create(webContext());
+ WebGraphicsContext3D* context = webContext();
+ gpu::gles2::GLES2Interface* gl = context->getGLES2Interface();
+ m_extensionsUtil = Extensions3DUtil::create(context, gl);
// The only reason the ExtensionsUtil should be invalid is if the webContext is lost.
- ASSERT(m_extensionsUtil->isValid() || webContext()->isContextLost());
+ ASSERT(m_extensionsUtil->isValid() || gl->GetGraphicsResetStatusKHR() != GL_NO_ERROR);
}
return m_extensionsUtil.get();
}
« no previous file with comments | « third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.cpp ('k') | third_party/WebKit/Source/platform/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698