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

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGLSampler.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/WebGLSampler.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLSampler.cpp b/third_party/WebKit/Source/modules/webgl/WebGLSampler.cpp
index eb4324ff61a51638a7424f310eede589d4642511..2ef7eaa49a215a1655261794503071dde4003236 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLSampler.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLSampler.cpp
@@ -4,6 +4,7 @@
#include "modules/webgl/WebGLSampler.h"
+#include "gpu/command_buffer/client/gles2_interface.h"
#include "modules/webgl/WebGL2RenderingContextBase.h"
namespace blink {
@@ -22,12 +23,14 @@ WebGLSampler::~WebGLSampler()
WebGLSampler::WebGLSampler(WebGL2RenderingContextBase* ctx)
: WebGLSharedPlatform3DObject(ctx)
{
- setObject(ctx->webContext()->createSampler());
+ GLuint sampler;
+ ctx->contextGL()->GenSamplers(1, &sampler);
+ setObject(sampler);
}
void WebGLSampler::deleteObjectImpl(WebGraphicsContext3D* context3d, gpu::gles2::GLES2Interface* gl)
{
- context3d->deleteSampler(m_object);
+ gl->DeleteSamplers(1, &m_object);
m_object = 0;
}

Powered by Google App Engine
This is Rietveld 408576698