コード例 #1
0
ファイル: GLLibraryEGL.cpp プロジェクト: brendandahl/positron
static void
MarkExtensions(const char* rawExtString, bool shouldDumpExts, const char* extType,
               std::bitset<N>* const out)
{
    MOZ_ASSERT(rawExtString);

    const nsDependentCString extString(rawExtString);

    std::vector<nsCString> extList;
    SplitByChar(extString, ' ', &extList);

    if (shouldDumpExts) {
        printf_stderr("%u EGL %s extensions: (*: recognized)\n",
                      (uint32_t)extList.size(), extType);
    }

    MarkBitfieldByStrings(extList, shouldDumpExts, sEGLExtensionNames, out);
}
コード例 #2
0
ファイル: GLLibraryEGL.cpp プロジェクト: hoosteeno/gecko-dev
void
GLLibraryEGL::InitExtensionsFromDisplay(EGLDisplay eglDisplay)
{
    std::vector<nsCString> driverExtensionList;

    const char* rawExts = (const char*)fQueryString(eglDisplay, LOCAL_EGL_EXTENSIONS);
    if (rawExts) {
        nsDependentCString exts(rawExts);
        SplitByChar(exts, ' ', &driverExtensionList);
    } else {
        NS_WARNING("Failed to load EGL extension list!");
    }

    const bool shouldDumpExts = GLContext::ShouldDumpExts();
    if (shouldDumpExts) {
        printf_stderr("%i EGL driver extensions: (*: recognized)\n",
                      (uint32_t)driverExtensionList.size());
    }

    MarkBitfieldByStrings(driverExtensionList, shouldDumpExts, sEGLExtensionNames,
                          &mAvailableExtensions);
}