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

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

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

Powered by Google App Engine
This is Rietveld 408576698