3902628e35
There is some logic in here for 2.0 as well, just as a "as long as I was looking at the specs", but only 1.0 is really supported. This seems to resolve the bug where some GPUs weren't advertising correctly that they had vertex array object support, by checking for both extension names (with and without "GL_" prefix) Of note, this saves about 18 Kb (5.5 Kb gzipped) of code size by compiling out the unneeded GLES checks/functionality. Bug: skia:8378 Change-Id: I773bf4dbf231b991051d2a9f640b8047a9010e7d Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203461 Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
40 lines
1.6 KiB
C
40 lines
1.6 KiB
C
/*
|
|
* Copyright 2014 Google Inc.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
#include "gl/GrGLInterface.h"
|
|
|
|
typedef GrGLFuncPtr (*GrGLGetProc)(void* ctx, const char name[]);
|
|
|
|
/**
|
|
* Generic function for creating a GrGLInterface for an either OpenGL or GLES. It calls
|
|
* get() to get each function address. ctx is a generic ptr passed to and interpreted by get().
|
|
*/
|
|
SK_API sk_sp<const GrGLInterface> GrGLMakeAssembledInterface(void *ctx, GrGLGetProc get);
|
|
|
|
/**
|
|
* Generic function for creating a GrGLInterface for an OpenGL (but not GLES) context. It calls
|
|
* get() to get each function address. ctx is a generic ptr passed to and interpreted by get().
|
|
*/
|
|
SK_API sk_sp<const GrGLInterface> GrGLMakeAssembledGLInterface(void *ctx, GrGLGetProc get);
|
|
|
|
/**
|
|
* Generic function for creating a GrGLInterface for an OpenGL ES (but not Open GL) context. It
|
|
* calls get() to get each function address. ctx is a generic ptr passed to and interpreted by
|
|
* get().
|
|
*/
|
|
SK_API sk_sp<const GrGLInterface> GrGLMakeAssembledGLESInterface(void *ctx, GrGLGetProc get);
|
|
|
|
/**
|
|
* Generic function for creating a GrGLInterface for a WebGL (similar to OpenGL ES) context. It
|
|
* calls get() to get each function address. ctx is a generic ptr passed to and interpreted by
|
|
* get().
|
|
*/
|
|
SK_API sk_sp<const GrGLInterface> GrGLMakeAssembledWebGLInterface(void *ctx, GrGLGetProc get);
|
|
|
|
/** Deprecated version of GrGLMakeAssembledInterface() that returns a bare pointer. */
|
|
SK_API const GrGLInterface* GrGLAssembleInterface(void *ctx, GrGLGetProc get);
|