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

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

Issue 1814263004: 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/WebGLBuffer.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLBuffer.cpp b/third_party/WebKit/Source/modules/webgl/WebGLBuffer.cpp
index a3144eef04e46b0887324fd6df119b8c47b3f7e9..fd4202a843206eaf9047e21c4f9cbd6310847b38 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLBuffer.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLBuffer.cpp
@@ -25,6 +25,7 @@
#include "modules/webgl/WebGLBuffer.h"
+#include "gpu/command_buffer/client/gles2_interface.h"
#include "modules/webgl/WebGLRenderingContextBase.h"
namespace blink {
@@ -39,7 +40,9 @@ WebGLBuffer::WebGLBuffer(WebGLRenderingContextBase* ctx)
, m_initialTarget(0)
, m_size(0)
{
- setObject(ctx->webContext()->createBuffer());
+ uint32_t buffer;
+ ctx->contextGL()->GenBuffers(1, &buffer);
+ setObject(buffer);
}
WebGLBuffer::~WebGLBuffer()
@@ -50,7 +53,7 @@ WebGLBuffer::~WebGLBuffer()
void WebGLBuffer::deleteObjectImpl(WebGraphicsContext3D* context3d, gpu::gles2::GLES2Interface* gl)
{
- context3d->deleteBuffer(m_object);
+ gl->DeleteBuffers(1, &m_object);
m_object = 0;
}

Powered by Google App Engine
This is Rietveld 408576698