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

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

Issue 1814263004: Remove create/delete methods from WebGraphicsContext3D. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@complex-casts
Patch Set: complex-create: 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/WebGLTexture.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLTexture.cpp b/third_party/WebKit/Source/modules/webgl/WebGLTexture.cpp
index d6ebe3059f0d8e53f49ab1762f0f1bb3f7e81b8d..0985d33f5f0d2f99897b47411c3e2be0718e9d3c 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLTexture.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLTexture.cpp
@@ -25,6 +25,7 @@
#include "modules/webgl/WebGLTexture.h"
+#include "gpu/command_buffer/client/gles2_interface.h"
#include "modules/webgl/WebGLRenderingContextBase.h"
namespace blink {
@@ -38,7 +39,9 @@ WebGLTexture::WebGLTexture(WebGLRenderingContextBase* ctx)
: WebGLSharedPlatform3DObject(ctx)
, m_target(0)
{
- setObject(ctx->webContext()->createTexture());
+ GLuint texture;
+ ctx->contextGL()->GenTextures(1, &texture);
+ setObject(texture);
}
WebGLTexture::~WebGLTexture()
@@ -59,7 +62,7 @@ void WebGLTexture::setTarget(GLenum target)
void WebGLTexture::deleteObjectImpl(WebGraphicsContext3D* context3d, gpu::gles2::GLES2Interface* gl)
{
- context3d->deleteTexture(m_object);
+ gl->DeleteTextures(1, &m_object);
m_object = 0;
}

Powered by Google App Engine
This is Rietveld 408576698