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

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

Powered by Google App Engine
This is Rietveld 408576698