Flutter Engine
The Flutter Engine
Functions
GrGLExtensions.cpp File Reference
#include "include/gpu/gl/GrGLExtensions.h"
#include "src/gpu/ganesh/gl/GrGLDefines.h"
#include "src/gpu/ganesh/gl/GrGLUtil.h"
#include "src/base/SkTSearch.h"
#include "src/base/SkTSort.h"

Go to the source code of this file.

Functions

static int find_string (const TArray< SkString > &strings, const char ext[])
 
static void eat_space_sep_strings (TArray< SkString > *out, const char in[])
 

Function Documentation

◆ eat_space_sep_strings()

static void eat_space_sep_strings ( TArray< SkString > *  out,
const char  in[] 
)
static

Definition at line 48 of file GrGLExtensions.cpp.

48 {
49 if (!in) {
50 return;
51 }
52 while (true) {
53 // skip over multiple spaces between extensions
54 while (' ' == *in) {
55 ++in;
56 }
57 // quit once we reach the end of the string.
58 if ('\0' == *in) {
59 break;
60 }
61 // we found an extension
62 size_t length = strcspn(in, " ");
63 out->push_back().set(in, length);
64 in += length;
65 }
66}
size_t length

◆ find_string()

static int find_string ( const TArray< SkString > &  strings,
const char  ext[] 
)
static

Definition at line 24 of file GrGLExtensions.cpp.

24 {
25 if (strings.empty()) {
26 return -1;
27 }
28 SkString extensionStr(ext);
29 int idx = SkTSearch<SkString, extension_compare>(&strings.front(),
30 strings.size(),
31 extensionStr,
32 sizeof(SkString));
33 return idx;
34}
bool empty() const
Definition: SkTArray.h:199
int size() const
Definition: SkTArray.h:421