#include "include/gpu/ganesh/gl/GrGLExtensions.h"
#include "include/private/base/SkAssert.h"
#include "src/base/SkTSearch.h"
#include "src/base/SkTSort.h"
#include "src/gpu/ganesh/gl/GrGLDefines.h"
#include "src/gpu/ganesh/gl/GrGLUtil.h"
#include <cstring>
usingnamespaceskia_private;
namespace {
inline bool extension_compare(const SkString& a, const SkString& b) { … }
}
static int find_string(const TArray<SkString>& strings, const char ext[]) { … }
GrGLExtensions::GrGLExtensions(const GrGLExtensions& that) { … }
GrGLExtensions& GrGLExtensions::operator=(const GrGLExtensions& that) { … }
static void eat_space_sep_strings(TArray<SkString>* out, const char in[]) { … }
bool GrGLExtensions::init(GrGLStandard standard,
GrGLFunction<GrGLGetStringFn> getString,
GrGLFunction<GrGLGetStringiFn> getStringi,
GrGLFunction<GrGLGetIntegervFn> getIntegerv,
GrGLFunction<GrEGLQueryStringFn> queryString,
GrEGLDisplay eglDisplay) { … }
bool GrGLExtensions::has(const char ext[]) const { … }
bool GrGLExtensions::remove(const char ext[]) { … }
void GrGLExtensions::add(const char ext[]) { … }
#ifdef SK_ENABLE_DUMP_GPU
#include "src/utils/SkJSONWriter.h"
void GrGLExtensions::dumpJSON(SkJSONWriter* writer) const {
writer->beginArray();
for (int i = 0; i < fStrings.size(); ++i) {
writer->appendString(fStrings[i]);
}
writer->endArray();
}
#else
void GrGLExtensions::dumpJSON(SkJSONWriter* writer) const { … }
#endif