From af000f469e1b0153ce445c96ca3d20e6d12224cc Mon Sep 17 00:00:00 2001 From: paraboul Date: Mon, 24 Nov 2014 07:05:27 -0800 Subject: [PATCH] Add gpu support for Apple specific 'Vertex Arrays' functions BUG=skia: Review URL: https://codereview.chromium.org/754653002 --- AUTHORS | 1 + src/gpu/gl/GrGLAssembleInterface.cpp | 4 ++++ src/gpu/gl/GrGLCaps.cpp | 3 ++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index c36ea2c..1b98402 100644 --- a/AUTHORS +++ b/AUTHORS @@ -32,3 +32,4 @@ The Chromium Authors <*@chromium.org> Thiago Fransosi Farina Pavel Krajcevski Ion Rosca +Anthony Catel diff --git a/src/gpu/gl/GrGLAssembleInterface.cpp b/src/gpu/gl/GrGLAssembleInterface.cpp index 425ed64..25f9e16 100644 --- a/src/gpu/gl/GrGLAssembleInterface.cpp +++ b/src/gpu/gl/GrGLAssembleInterface.cpp @@ -196,6 +196,10 @@ const GrGLInterface* GrGLAssembleGLInterface(void* ctx, GrGLGetProc get) { GET_PROC(BindVertexArray); GET_PROC(GenVertexArrays); GET_PROC(DeleteVertexArrays); + } else if (extensions.has("GL_APPLE_vertex_array_object")) { + GET_PROC_SUFFIX(BindVertexArray, APPLE); + GET_PROC_SUFFIX(GenVertexArrays, APPLE); + GET_PROC_SUFFIX(DeleteVertexArrays, APPLE); } if (glVer >= GR_GL_VER(3,0) || extensions.has("GL_ARB_map_buffer_range")) { diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp index 6272aba..414f06d 100644 --- a/src/gpu/gl/GrGLCaps.cpp +++ b/src/gpu/gl/GrGLCaps.cpp @@ -235,7 +235,8 @@ bool GrGLCaps::init(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) { if (kGL_GrGLStandard == standard) { fVertexArrayObjectSupport = version >= GR_GL_VER(3, 0) || - ctxInfo.hasExtension("GL_ARB_vertex_array_object"); + ctxInfo.hasExtension("GL_ARB_vertex_array_object") || + ctxInfo.hasExtension("GL_APPLE_vertex_array_object"); } else { fVertexArrayObjectSupport = version >= GR_GL_VER(3, 0) || ctxInfo.hasExtension("GL_OES_vertex_array_object"); -- 2.7.4