| Index: gpu/skia_bindings/gl_bindings_skia_cmd_buffer.cc
|
| diff --git a/gpu/skia_bindings/gl_bindings_skia_cmd_buffer.cc b/gpu/skia_bindings/gl_bindings_skia_cmd_buffer.cc
|
| index e9ca9868d1623eb437d84d203fd151933390b7cf..b07f8fb44ad76a6f83907e29b9044ff6e1538c57 100644
|
| --- a/gpu/skia_bindings/gl_bindings_skia_cmd_buffer.cc
|
| +++ b/gpu/skia_bindings/gl_bindings_skia_cmd_buffer.cc
|
| @@ -22,11 +22,19 @@ std::function<R(Args...)> gles_bind(R (GLES2Interface::*func)(Args...),
|
| namespace skia_bindings {
|
|
|
| sk_sp<GrGLInterface> CreateGLES2InterfaceBindings(GLES2Interface* impl) {
|
| + // Until Chromium is passing the WebGL 2.0 conformance we're limiting Skia to
|
| + // a GLES 2.0 interface (plus extensions).
|
| + auto get_string_version_override = [impl](GLenum name) {
|
| + if (name == GL_VERSION)
|
| + return reinterpret_cast<const GLubyte*>("OpenGL ES 2.0 Chromium");
|
| + return impl->GetString(name);
|
| + };
|
| +
|
| sk_sp<GrGLInterface> interface(new GrGLInterface);
|
| interface->fStandard = kGLES_GrGLStandard;
|
| - interface->fExtensions.init(
|
| - kGLES_GrGLStandard, gles_bind(&GLES2Interface::GetString, impl), nullptr,
|
| - gles_bind(&GLES2Interface::GetIntegerv, impl));
|
| + interface->fExtensions.init(kGLES_GrGLStandard, get_string_version_override,
|
| + nullptr,
|
| + gles_bind(&GLES2Interface::GetIntegerv, impl));
|
|
|
| GrGLInterface::Functions* functions = &interface->fFunctions;
|
| functions->fActiveTexture = gles_bind(&GLES2Interface::ActiveTexture, impl);
|
| @@ -91,7 +99,7 @@ sk_sp<GrGLInterface> CreateGLES2InterfaceBindings(GLES2Interface* impl) {
|
| functions->fGetShaderiv = gles_bind(&GLES2Interface::GetShaderiv, impl);
|
| functions->fGetShaderPrecisionFormat =
|
| gles_bind(&GLES2Interface::GetShaderPrecisionFormat, impl);
|
| - functions->fGetString = gles_bind(&GLES2Interface::GetString, impl);
|
| + functions->fGetString = get_string_version_override;
|
| functions->fGetUniformLocation =
|
| gles_bind(&GLES2Interface::GetUniformLocation, impl);
|
| functions->fInsertEventMarker =
|
|
|