Add gpu support for Apple specific 'Vertex Arrays' functions

BUG=skia:

Review URL: https://codereview.chromium.org/754653002
This commit is contained in:
paraboul 2014-11-24 07:05:27 -08:00 committed by Commit bot
parent 91175f1966
commit af000f469e
3 changed files with 7 additions and 1 deletions

View File

@ -32,3 +32,4 @@ The Chromium Authors <*@chromium.org>
Thiago Fransosi Farina <thiago.farina@gmail.com>
Pavel Krajcevski <pavel@cs.unc.edu>
Ion Rosca <rosca@adobe.com>
Anthony Catel <paraboul@gmail.com>

View File

@ -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")) {

View File

@ -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");