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

Unified Diff: third_party/WebKit/Source/platform/graphics/gpu/Extensions3DUtil.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/platform/graphics/gpu/Extensions3DUtil.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/gpu/Extensions3DUtil.cpp b/third_party/WebKit/Source/platform/graphics/gpu/Extensions3DUtil.cpp
index 47af1934893b9213ac50a166f8a2bbf4f58950a8..4941e8db8a0f13870660ea62c9fe93bbb0e34300 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/Extensions3DUtil.cpp
+++ b/third_party/WebKit/Source/platform/graphics/gpu/Extensions3DUtil.cpp
@@ -4,6 +4,7 @@
#include "platform/graphics/gpu/Extensions3DUtil.h"
+#include "gpu/command_buffer/client/gles2_interface.h"
#include "public/platform/WebGraphicsContext3D.h"
#include "wtf/text/CString.h"
#include "wtf/text/StringHash.h"
@@ -22,15 +23,16 @@ void splitStringHelper(const String& str, HashSet<String>& set)
} // anonymous namespace
-PassOwnPtr<Extensions3DUtil> Extensions3DUtil::create(WebGraphicsContext3D* context)
+PassOwnPtr<Extensions3DUtil> Extensions3DUtil::create(WebGraphicsContext3D* context, gpu::gles2::GLES2Interface* gl)
{
- OwnPtr<Extensions3DUtil> out = adoptPtr(new Extensions3DUtil(context));
+ OwnPtr<Extensions3DUtil> out = adoptPtr(new Extensions3DUtil(context, gl));
out->initializeExtensions();
return out.release();
}
-Extensions3DUtil::Extensions3DUtil(WebGraphicsContext3D* context)
+Extensions3DUtil::Extensions3DUtil(WebGraphicsContext3D* context, gpu::gles2::GLES2Interface* gl)
: m_context(context)
+ , m_gl(gl)
, m_isValid(true)
{
}
@@ -41,7 +43,7 @@ Extensions3DUtil::~Extensions3DUtil()
void Extensions3DUtil::initializeExtensions()
{
- if (m_context->isContextLost()) {
+ if (m_gl->GetGraphicsResetStatusKHR() != GL_NO_ERROR) {
// If the context is lost don't initialize the extension strings.
// This will cause supportsExtension, ensureExtensionEnabled, and isExtensionEnabled to always return false.
m_isValid = false;

Powered by Google App Engine
This is Rietveld 408576698