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

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

Issue 1833273002: Remove WebGraphicsContext3D::getGLES2Interface(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: getgles2: rebase 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/WebGLObject.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLObject.cpp b/third_party/WebKit/Source/modules/webgl/WebGLObject.cpp
index a0f2d61681cf470f908cd21a87073ea157b55740..5ef85c10856ae31fe0c86424aa1fc65993f6ca04 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLObject.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLObject.cpp
@@ -25,6 +25,7 @@
#include "modules/webgl/WebGLObject.h"
+#include "modules/webgl/WebGLRenderingContextBase.h"
#include "public/platform/WebGraphicsContext3D.h"
namespace blink {
@@ -41,7 +42,7 @@ WebGLObject::~WebGLObject()
ASSERT(m_deleted);
}
-void WebGLObject::deleteObject(WebGraphicsContext3D* context3d, gpu::gles2::GLES2Interface* gl)
+void WebGLObject::deleteObject(gpu::gles2::GLES2Interface* gl)
{
m_deleted = true;
if (!hasObject())
@@ -51,13 +52,10 @@ void WebGLObject::deleteObject(WebGraphicsContext3D* context3d, gpu::gles2::GLES
return;
if (!m_attachmentCount) {
- if (!context3d) {
- context3d = getAWebGraphicsContext3D();
- gl = context3d ? context3d->getGLES2Interface() : nullptr;
- }
-
- if (context3d) {
- deleteObjectImpl(context3d, gl);
+ if (!gl)
+ gl = getAGLInterface();
+ if (gl) {
+ deleteObjectImpl(gl);
// Ensure the inherited class no longer claims to have a valid object
ASSERT(!hasObject());
}
@@ -77,15 +75,15 @@ void WebGLObject::detachAndDeleteObject()
// The individual WebGL destructors need to call detachAndDeleteObject()
// rather than do it based on Oilpan GC.
detach();
- deleteObject(nullptr, nullptr);
+ deleteObject(nullptr);
}
-void WebGLObject::onDetached(WebGraphicsContext3D* context3d, gpu::gles2::GLES2Interface* gl)
+void WebGLObject::onDetached(gpu::gles2::GLES2Interface* gl)
{
if (m_attachmentCount)
--m_attachmentCount;
if (m_deleted)
- deleteObject(context3d, gl);
+ deleteObject(gl);
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/modules/webgl/WebGLObject.h ('k') | third_party/WebKit/Source/modules/webgl/WebGLProgram.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698