Flutter Engine
The Flutter Engine
|
#include <GrGLExtensions.h>
Public Member Functions | |
GrGLExtensions () | |
GrGLExtensions (const GrGLExtensions &) | |
GrGLExtensions & | operator= (const GrGLExtensions &) |
void | swap (GrGLExtensions *that) |
bool | init (GrGLStandard standard, GrGLFunction< GrGLGetStringFn > getString, GrGLFunction< GrGLGetStringiFn > getStringi, GrGLFunction< GrGLGetIntegervFn > getIntegerv, GrGLFunction< GrEGLQueryStringFn > queryString=nullptr, GrEGLDisplay eglDisplay=nullptr) |
bool | isInitialized () const |
bool | has (const char[]) const |
bool | remove (const char[]) |
void | add (const char[]) |
void | reset () |
void | dumpJSON (SkJSONWriter *) const |
This helper queries the current GL context for its extensions, remembers them, and can be queried. It supports both glGetString- and glGetStringi-style extension string APIs and will use the latter if it is available. It also will query for EGL extensions if a eglQueryString implementation is provided.
Definition at line 26 of file GrGLExtensions.h.
|
inline |
Definition at line 28 of file GrGLExtensions.h.
GrGLExtensions::GrGLExtensions | ( | const GrGLExtensions & | that | ) |
Definition at line 36 of file GrGLExtensions.cpp.
void GrGLExtensions::add | ( | const char | ext[] | ) |
Adds an extension to list
Definition at line 148 of file GrGLExtensions.cpp.
void GrGLExtensions::dumpJSON | ( | SkJSONWriter * | writer | ) | const |
Definition at line 169 of file GrGLExtensions.cpp.
bool GrGLExtensions::has | ( | const char | ext[] | ) | const |
Queries whether an extension is present. This will fail if init() has not been called.
Definition at line 127 of file GrGLExtensions.cpp.
bool GrGLExtensions::init | ( | GrGLStandard | standard, |
GrGLFunction< GrGLGetStringFn > | getString, | ||
GrGLFunction< GrGLGetStringiFn > | getStringi, | ||
GrGLFunction< GrGLGetIntegervFn > | getIntegerv, | ||
GrGLFunction< GrEGLQueryStringFn > | queryString = nullptr , |
||
GrEGLDisplay | eglDisplay = nullptr |
||
) |
We sometimes need to use this class without having yet created a GrGLInterface. This version of init expects that getString is always non-NULL while getIntegerv and getStringi are non- NULL if on desktop GL with version 3.0 or higher. Otherwise it will fail.
Definition at line 68 of file GrGLExtensions.cpp.
|
inline |
Definition at line 52 of file GrGLExtensions.h.
GrGLExtensions & GrGLExtensions::operator= | ( | const GrGLExtensions & | that | ) |
Definition at line 40 of file GrGLExtensions.cpp.
bool GrGLExtensions::remove | ( | const char | ext[] | ) |
Removes an extension if present. Returns true if the extension was present before the call.
Definition at line 132 of file GrGLExtensions.cpp.
|
inline |
Definition at line 69 of file GrGLExtensions.h.
|
inline |
Definition at line 34 of file GrGLExtensions.h.