Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/gfx/gl/SkiaGLGlue.cpp
Line
Count
Source (jump to first uncovered line)
1
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
2
/* This Source Code Form is subject to the terms of the Mozilla Public
3
 * License, v. 2.0. If a copy of the MPL was not distributed with this
4
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6
#include "skia/include/gpu/GrContext.h"
7
#include "skia/include/gpu/gl/GrGLInterface.h"
8
#include "mozilla/gfx/2D.h"
9
#include "mozilla/ThreadLocal.h"
10
#include "mozilla/DebugOnly.h"
11
12
/* SkPostConfig.h includes windows.h, which includes windef.h
13
 * which redefines min/max. We don't want that. */
14
#ifdef _WIN32
15
#undef min
16
#undef max
17
#endif
18
19
#include "GLContext.h"
20
#include "SkiaGLGlue.h"
21
22
using mozilla::gl::GLContext;
23
using mozilla::gl::GLFeature;
24
using mozilla::gl::SkiaGLGlue;
25
26
template<typename R, typename... A>
27
static inline GrGLFunction<R (*)(A...)>
28
WrapGL(RefPtr<GLContext> aContext, R (GLContext::*aFunc)(A...))
29
0
{
30
0
  return [aContext, aFunc] (A... args) -> R
31
0
  {
32
0
    aContext->MakeCurrent();
33
0
    return (aContext->*aFunc)(args...);
34
0
  };
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, int*)>::type> WrapGL<void, unsigned int, int*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, int*))::{lambda(unsigned int, int*)#1}::operator()(unsigned int, int*) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int)>::type> WrapGL<void, unsigned int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int))::{lambda(unsigned int)#1}::operator()(unsigned int) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, unsigned int)>::type> WrapGL<void, unsigned int, unsigned int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, unsigned int))::{lambda(unsigned int, unsigned int)#1}::operator()(unsigned int, unsigned int) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, unsigned int, char const*)>::type> WrapGL<void, unsigned int, unsigned int, char const*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, unsigned int, char const*))::{lambda(unsigned int, unsigned int, char const*)#1}::operator()(unsigned int, unsigned int, char const*) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(float, float, float, float)>::type> WrapGL<void, float, float, float, float>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(float, float, float, float))::{lambda(float, float, float, float)#1}::operator()(float, float, float, float) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, long, void const*, unsigned int)>::type> WrapGL<void, unsigned int, long, void const*, unsigned int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, long, void const*, unsigned int))::{lambda(unsigned int, long, void const*, unsigned int)#1}::operator()(unsigned int, long, void const*, unsigned int) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, long, long, void const*)>::type> WrapGL<void, unsigned int, long, long, void const*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, long, long, void const*))::{lambda(unsigned int, long, long, void const*)#1}::operator()(unsigned int, long, long, void const*) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<unsigned int (*)(unsigned int)>::type> WrapGL<unsigned int, unsigned int>(RefPtr<mozilla::gl::GLContext>, unsigned int (mozilla::gl::GLContext::*)(unsigned int))::{lambda(unsigned int)#1}::operator()(unsigned int) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(int)>::type> WrapGL<void, int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(int))::{lambda(int)#1}::operator()(int) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned char, unsigned char, unsigned char, unsigned char)>::type> WrapGL<void, unsigned char, unsigned char, unsigned char, unsigned char>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned char, unsigned char, unsigned char, unsigned char))::{lambda(unsigned char, unsigned char, unsigned char, unsigned char)#1}::operator()(unsigned char, unsigned char, unsigned char, unsigned char) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, int, unsigned int, int, int, int, int, void const*)>::type> WrapGL<void, unsigned int, int, unsigned int, int, int, int, int, void const*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, int, unsigned int, int, int, int, int, void const*))::{lambda(unsigned int, int, unsigned int, int, int, int, int, void const*)#1}::operator()(unsigned int, int, unsigned int, int, int, int, int, void const*) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, int, int, int, int, int, unsigned int, int, void const*)>::type> WrapGL<void, unsigned int, int, int, int, int, int, unsigned int, int, void const*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, int, int, int, int, int, unsigned int, int, void const*))::{lambda(unsigned int, int, int, int, int, int, unsigned int, int, void const*)#1}::operator()(unsigned int, int, int, int, int, int, unsigned int, int, void const*) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, int, int, int, int, int, int, int)>::type> WrapGL<void, unsigned int, int, int, int, int, int, int, int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, int, int, int, int, int, int, int))::{lambda(unsigned int, int, int, int, int, int, int, int)#1}::operator()(unsigned int, int, int, int, int, int, int, int) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<unsigned int (*)()>::type> WrapGL<unsigned int>(RefPtr<mozilla::gl::GLContext>, unsigned int (mozilla::gl::GLContext::*)())::{lambda()#1}::operator()() const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(int, unsigned int const*)>::type> WrapGL<void, int, unsigned int const*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(int, unsigned int const*))::{lambda(int, unsigned int const*)#1}::operator()(int, unsigned int const*) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned char)>::type> WrapGL<void, unsigned char>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned char))::{lambda(unsigned char)#1}::operator()(unsigned char) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, int, int)>::type> WrapGL<void, unsigned int, int, int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, int, int))::{lambda(unsigned int, int, int)#1}::operator()(unsigned int, int, int) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, int, unsigned int, void const*)>::type> WrapGL<void, unsigned int, int, unsigned int, void const*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, int, unsigned int, void const*))::{lambda(unsigned int, int, unsigned int, void const*)#1}::operator()(unsigned int, int, unsigned int, void const*) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, unsigned int, unsigned int, int, unsigned int, void const*)>::type> WrapGL<void, unsigned int, unsigned int, unsigned int, int, unsigned int, void const*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, unsigned int, unsigned int, int, unsigned int, void const*))::{lambda(unsigned int, unsigned int, unsigned int, int, unsigned int, void const*)#1}::operator()(unsigned int, unsigned int, unsigned int, int, unsigned int, void const*) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)()>::type> WrapGL<void>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)())::{lambda()#1}::operator()() const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, unsigned int, unsigned int, unsigned int)>::type> WrapGL<void, unsigned int, unsigned int, unsigned int, unsigned int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, unsigned int, unsigned int, unsigned int))::{lambda(unsigned int, unsigned int, unsigned int, unsigned int)#1}::operator()(unsigned int, unsigned int, unsigned int, unsigned int) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, unsigned int, unsigned int, unsigned int, int)>::type> WrapGL<void, unsigned int, unsigned int, unsigned int, unsigned int, int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, unsigned int, unsigned int, unsigned int, int))::{lambda(unsigned int, unsigned int, unsigned int, unsigned int, int)#1}::operator()(unsigned int, unsigned int, unsigned int, unsigned int, int) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(int, unsigned int*)>::type> WrapGL<void, int, unsigned int*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(int, unsigned int*))::{lambda(int, unsigned int*)#1}::operator()(int, unsigned int*) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, unsigned int, unsigned int, int*)>::type> WrapGL<void, unsigned int, unsigned int, unsigned int, int*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, unsigned int, unsigned int, int*))::{lambda(unsigned int, unsigned int, unsigned int, int*)#1}::operator()(unsigned int, unsigned int, unsigned int, int*) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, unsigned int, int*)>::type> WrapGL<void, unsigned int, unsigned int, int*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, unsigned int, int*))::{lambda(unsigned int, unsigned int, int*)#1}::operator()(unsigned int, unsigned int, int*) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, int, int*, char*)>::type> WrapGL<void, unsigned int, int, int*, char*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, int, int*, char*))::{lambda(unsigned int, int, int*, char*)#1}::operator()(unsigned int, int, int*, char*) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, unsigned int, int*, int*)>::type> WrapGL<void, unsigned int, unsigned int, int*, int*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, unsigned int, int*, int*))::{lambda(unsigned int, unsigned int, int*, int*)#1}::operator()(unsigned int, unsigned int, int*, int*) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<int (*)(unsigned int, char const*)>::type> WrapGL<int, unsigned int, char const*>(RefPtr<mozilla::gl::GLContext>, int (mozilla::gl::GLContext::*)(unsigned int, char const*))::{lambda(unsigned int, char const*)#1}::operator()(unsigned int, char const*) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<unsigned char (*)(unsigned int)>::type> WrapGL<unsigned char, unsigned int>(RefPtr<mozilla::gl::GLContext>, unsigned char (mozilla::gl::GLContext::*)(unsigned int))::{lambda(unsigned int)#1}::operator()(unsigned int) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(float)>::type> WrapGL<void, float>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(float))::{lambda(float)#1}::operator()(float) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, int)>::type> WrapGL<void, unsigned int, int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, int))::{lambda(unsigned int, int)#1}::operator()(unsigned int, int) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(int, int, int, int, unsigned int, unsigned int, void*)>::type> WrapGL<void, int, int, int, int, unsigned int, unsigned int, void*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(int, int, int, int, unsigned int, unsigned int, void*))::{lambda(int, int, int, int, unsigned int, unsigned int, void*)#1}::operator()(int, int, int, int, unsigned int, unsigned int, void*) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, unsigned int, int, int)>::type> WrapGL<void, unsigned int, unsigned int, int, int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, unsigned int, int, int))::{lambda(unsigned int, unsigned int, int, int)#1}::operator()(unsigned int, unsigned int, int, int) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(int, int, int, int)>::type> WrapGL<void, int, int, int, int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(int, int, int, int))::{lambda(int, int, int, int)#1}::operator()(int, int, int, int) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, int, char const* const*, int const*)>::type> WrapGL<void, unsigned int, int, char const* const*, int const*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, int, char const* const*, int const*))::{lambda(unsigned int, int, char const* const*, int const*)#1}::operator()(unsigned int, int, char const* const*, int const*) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, int, unsigned int)>::type> WrapGL<void, unsigned int, int, unsigned int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, int, unsigned int))::{lambda(unsigned int, int, unsigned int)#1}::operator()(unsigned int, int, unsigned int) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, unsigned int, int, unsigned int)>::type> WrapGL<void, unsigned int, unsigned int, int, unsigned int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, unsigned int, int, unsigned int))::{lambda(unsigned int, unsigned int, int, unsigned int)#1}::operator()(unsigned int, unsigned int, int, unsigned int) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, unsigned int, unsigned int)>::type> WrapGL<void, unsigned int, unsigned int, unsigned int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, unsigned int, unsigned int))::{lambda(unsigned int, unsigned int, unsigned int)#1}::operator()(unsigned int, unsigned int, unsigned int) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, int, int, int, int, int, unsigned int, unsigned int, void const*)>::type> WrapGL<void, unsigned int, int, int, int, int, int, unsigned int, unsigned int, void const*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, int, int, int, int, int, unsigned int, unsigned int, void const*))::{lambda(unsigned int, int, int, int, int, int, unsigned int, unsigned int, void const*)#1}::operator()(unsigned int, int, int, int, int, int, unsigned int, unsigned int, void const*) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, unsigned int, int)>::type> WrapGL<void, unsigned int, unsigned int, int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, unsigned int, int))::{lambda(unsigned int, unsigned int, int)#1}::operator()(unsigned int, unsigned int, int) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, unsigned int, int const*)>::type> WrapGL<void, unsigned int, unsigned int, int const*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, unsigned int, int const*))::{lambda(unsigned int, unsigned int, int const*)#1}::operator()(unsigned int, unsigned int, int const*) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(int, float)>::type> WrapGL<void, int, float>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(int, float))::{lambda(int, float)#1}::operator()(int, float) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(int, int)>::type> WrapGL<void, int, int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(int, int))::{lambda(int, int)#1}::operator()(int, int) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(int, int, float const*)>::type> WrapGL<void, int, int, float const*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(int, int, float const*))::{lambda(int, int, float const*)#1}::operator()(int, int, float const*) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(int, int, int const*)>::type> WrapGL<void, int, int, int const*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(int, int, int const*))::{lambda(int, int, int const*)#1}::operator()(int, int, int const*) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(int, float, float)>::type> WrapGL<void, int, float, float>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(int, float, float))::{lambda(int, float, float)#1}::operator()(int, float, float) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(int, int, int)>::type> WrapGL<void, int, int, int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(int, int, int))::{lambda(int, int, int)#1}::operator()(int, int, int) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(int, float, float, float)>::type> WrapGL<void, int, float, float, float>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(int, float, float, float))::{lambda(int, float, float, float)#1}::operator()(int, float, float, float) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(int, float, float, float, float)>::type> WrapGL<void, int, float, float, float, float>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(int, float, float, float, float))::{lambda(int, float, float, float, float)#1}::operator()(int, float, float, float, float) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(int, int, int, int, int)>::type> WrapGL<void, int, int, int, int, int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(int, int, int, int, int))::{lambda(int, int, int, int, int)#1}::operator()(int, int, int, int, int) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(int, int, unsigned char, float const*)>::type> WrapGL<void, int, int, unsigned char, float const*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(int, int, unsigned char, float const*))::{lambda(int, int, unsigned char, float const*)#1}::operator()(int, int, unsigned char, float const*) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, float)>::type> WrapGL<void, unsigned int, float>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, float))::{lambda(unsigned int, float)#1}::operator()(unsigned int, float) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, float const*)>::type> WrapGL<void, unsigned int, float const*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, float const*))::{lambda(unsigned int, float const*)#1}::operator()(unsigned int, float const*) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, int, unsigned int, unsigned char, int, void const*)>::type> WrapGL<void, unsigned int, int, unsigned int, unsigned char, int, void const*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, int, unsigned int, unsigned char, int, void const*))::{lambda(unsigned int, int, unsigned int, unsigned char, int, void const*)#1}::operator()(unsigned int, int, unsigned int, unsigned char, int, void const*) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void* (*)(unsigned int, unsigned int)>::type> WrapGL<void*, unsigned int, unsigned int>(RefPtr<mozilla::gl::GLContext>, void* (mozilla::gl::GLContext::*)(unsigned int, unsigned int))::{lambda(unsigned int, unsigned int)#1}::operator()(unsigned int, unsigned int) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, int, unsigned int, int, int)>::type> WrapGL<void, unsigned int, int, unsigned int, int, int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, int, unsigned int, int, int))::{lambda(unsigned int, int, unsigned int, int, int)#1}::operator()(unsigned int, int, unsigned int, int, int) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(int, int, int, int, int, int, int, int, unsigned int, unsigned int)>::type> WrapGL<void, int, int, int, int, int, int, int, int, unsigned int, unsigned int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(int, int, int, int, int, int, int, int, unsigned int, unsigned int))::{lambda(int, int, int, int, int, int, int, int, unsigned int, unsigned int)#1}::operator()(int, int, int, int, int, int, int, int, unsigned int, unsigned int) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, int, unsigned int, int*)>::type> WrapGL<void, unsigned int, int, unsigned int, int*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, int, unsigned int, int*))::{lambda(unsigned int, int, unsigned int, int*)#1}::operator()(unsigned int, int, unsigned int, int*) const
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, unsigned int, unsigned int*)>::type> WrapGL<void, unsigned int, unsigned int, unsigned int*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, unsigned int, unsigned int*))::{lambda(unsigned int, unsigned int, unsigned int*)#1}::operator()(unsigned int, unsigned int, unsigned int*) const
35
0
}
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, int*)>::type> WrapGL<void, unsigned int, int*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, int*))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int)>::type> WrapGL<void, unsigned int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, unsigned int)>::type> WrapGL<void, unsigned int, unsigned int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, unsigned int))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, unsigned int, char const*)>::type> WrapGL<void, unsigned int, unsigned int, char const*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, unsigned int, char const*))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(float, float, float, float)>::type> WrapGL<void, float, float, float, float>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(float, float, float, float))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, long, void const*, unsigned int)>::type> WrapGL<void, unsigned int, long, void const*, unsigned int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, long, void const*, unsigned int))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, long, long, void const*)>::type> WrapGL<void, unsigned int, long, long, void const*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, long, long, void const*))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<unsigned int (*)(unsigned int)>::type> WrapGL<unsigned int, unsigned int>(RefPtr<mozilla::gl::GLContext>, unsigned int (mozilla::gl::GLContext::*)(unsigned int))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(int)>::type> WrapGL<void, int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(int))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned char, unsigned char, unsigned char, unsigned char)>::type> WrapGL<void, unsigned char, unsigned char, unsigned char, unsigned char>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned char, unsigned char, unsigned char, unsigned char))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, int, unsigned int, int, int, int, int, void const*)>::type> WrapGL<void, unsigned int, int, unsigned int, int, int, int, int, void const*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, int, unsigned int, int, int, int, int, void const*))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, int, int, int, int, int, unsigned int, int, void const*)>::type> WrapGL<void, unsigned int, int, int, int, int, int, unsigned int, int, void const*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, int, int, int, int, int, unsigned int, int, void const*))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, int, int, int, int, int, int, int)>::type> WrapGL<void, unsigned int, int, int, int, int, int, int, int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, int, int, int, int, int, int, int))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<unsigned int (*)()>::type> WrapGL<unsigned int>(RefPtr<mozilla::gl::GLContext>, unsigned int (mozilla::gl::GLContext::*)())
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(int, unsigned int const*)>::type> WrapGL<void, int, unsigned int const*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(int, unsigned int const*))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned char)>::type> WrapGL<void, unsigned char>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned char))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, int, int)>::type> WrapGL<void, unsigned int, int, int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, int, int))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, int, unsigned int, void const*)>::type> WrapGL<void, unsigned int, int, unsigned int, void const*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, int, unsigned int, void const*))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, unsigned int, unsigned int, int, unsigned int, void const*)>::type> WrapGL<void, unsigned int, unsigned int, unsigned int, int, unsigned int, void const*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, unsigned int, unsigned int, int, unsigned int, void const*))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)()>::type> WrapGL<void>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)())
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, unsigned int, unsigned int, unsigned int)>::type> WrapGL<void, unsigned int, unsigned int, unsigned int, unsigned int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, unsigned int, unsigned int, unsigned int))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, unsigned int, unsigned int, unsigned int, int)>::type> WrapGL<void, unsigned int, unsigned int, unsigned int, unsigned int, int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, unsigned int, unsigned int, unsigned int, int))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(int, unsigned int*)>::type> WrapGL<void, int, unsigned int*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(int, unsigned int*))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, unsigned int, unsigned int, int*)>::type> WrapGL<void, unsigned int, unsigned int, unsigned int, int*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, unsigned int, unsigned int, int*))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, unsigned int, int*)>::type> WrapGL<void, unsigned int, unsigned int, int*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, unsigned int, int*))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, int, int*, char*)>::type> WrapGL<void, unsigned int, int, int*, char*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, int, int*, char*))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, unsigned int, int*, int*)>::type> WrapGL<void, unsigned int, unsigned int, int*, int*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, unsigned int, int*, int*))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<int (*)(unsigned int, char const*)>::type> WrapGL<int, unsigned int, char const*>(RefPtr<mozilla::gl::GLContext>, int (mozilla::gl::GLContext::*)(unsigned int, char const*))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<unsigned char (*)(unsigned int)>::type> WrapGL<unsigned char, unsigned int>(RefPtr<mozilla::gl::GLContext>, unsigned char (mozilla::gl::GLContext::*)(unsigned int))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(float)>::type> WrapGL<void, float>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(float))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, int)>::type> WrapGL<void, unsigned int, int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, int))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(int, int, int, int, unsigned int, unsigned int, void*)>::type> WrapGL<void, int, int, int, int, unsigned int, unsigned int, void*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(int, int, int, int, unsigned int, unsigned int, void*))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, unsigned int, int, int)>::type> WrapGL<void, unsigned int, unsigned int, int, int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, unsigned int, int, int))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(int, int, int, int)>::type> WrapGL<void, int, int, int, int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(int, int, int, int))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, int, char const* const*, int const*)>::type> WrapGL<void, unsigned int, int, char const* const*, int const*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, int, char const* const*, int const*))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, int, unsigned int)>::type> WrapGL<void, unsigned int, int, unsigned int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, int, unsigned int))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, unsigned int, int, unsigned int)>::type> WrapGL<void, unsigned int, unsigned int, int, unsigned int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, unsigned int, int, unsigned int))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, unsigned int, unsigned int)>::type> WrapGL<void, unsigned int, unsigned int, unsigned int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, unsigned int, unsigned int))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, int, int, int, int, int, unsigned int, unsigned int, void const*)>::type> WrapGL<void, unsigned int, int, int, int, int, int, unsigned int, unsigned int, void const*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, int, int, int, int, int, unsigned int, unsigned int, void const*))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, unsigned int, int)>::type> WrapGL<void, unsigned int, unsigned int, int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, unsigned int, int))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, unsigned int, int const*)>::type> WrapGL<void, unsigned int, unsigned int, int const*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, unsigned int, int const*))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(int, float)>::type> WrapGL<void, int, float>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(int, float))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(int, int)>::type> WrapGL<void, int, int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(int, int))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(int, int, float const*)>::type> WrapGL<void, int, int, float const*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(int, int, float const*))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(int, int, int const*)>::type> WrapGL<void, int, int, int const*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(int, int, int const*))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(int, float, float)>::type> WrapGL<void, int, float, float>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(int, float, float))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(int, int, int)>::type> WrapGL<void, int, int, int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(int, int, int))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(int, float, float, float)>::type> WrapGL<void, int, float, float, float>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(int, float, float, float))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(int, float, float, float, float)>::type> WrapGL<void, int, float, float, float, float>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(int, float, float, float, float))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(int, int, int, int, int)>::type> WrapGL<void, int, int, int, int, int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(int, int, int, int, int))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(int, int, unsigned char, float const*)>::type> WrapGL<void, int, int, unsigned char, float const*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(int, int, unsigned char, float const*))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, float)>::type> WrapGL<void, unsigned int, float>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, float))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, float const*)>::type> WrapGL<void, unsigned int, float const*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, float const*))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, int, unsigned int, unsigned char, int, void const*)>::type> WrapGL<void, unsigned int, int, unsigned int, unsigned char, int, void const*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, int, unsigned int, unsigned char, int, void const*))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void* (*)(unsigned int, unsigned int)>::type> WrapGL<void*, unsigned int, unsigned int>(RefPtr<mozilla::gl::GLContext>, void* (mozilla::gl::GLContext::*)(unsigned int, unsigned int))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, int, unsigned int, int, int)>::type> WrapGL<void, unsigned int, int, unsigned int, int, int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, int, unsigned int, int, int))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(int, int, int, int, int, int, int, int, unsigned int, unsigned int)>::type> WrapGL<void, int, int, int, int, int, int, int, int, unsigned int, unsigned int>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(int, int, int, int, int, int, int, int, unsigned int, unsigned int))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, int, unsigned int, int*)>::type> WrapGL<void, unsigned int, int, unsigned int, int*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, int, unsigned int, int*))
Unexecuted instantiation: SkiaGLGlue.cpp:std::__1::function<std::__1::remove_pointer<void (*)(unsigned int, unsigned int, unsigned int*)>::type> WrapGL<void, unsigned int, unsigned int, unsigned int*>(RefPtr<mozilla::gl::GLContext>, void (mozilla::gl::GLContext::*)(unsigned int, unsigned int, unsigned int*))
36
37
template<typename R, typename... A>
38
static inline GrGLFunction<R (*)(A...)>
39
WrapGL(RefPtr<GLContext> aContext, R (*aFunc)(GLContext*, A...))
40
0
{
41
0
  return [aContext, aFunc] (A... args) -> R
42
0
  {
43
0
    aContext->MakeCurrent();
44
0
    return (*aFunc)(aContext, args...);
45
0
  };
46
0
}
47
48
// Core GL functions required by Ganesh
49
50
static const GLubyte*
51
glGetString_mozilla(GLContext* aContext, GrGLenum aName)
52
0
{
53
0
    // GLContext only exposes a OpenGL 2.0 style API, so we have to intercept a bunch
54
0
    // of checks that Ganesh makes to determine which capabilities are present
55
0
    // on the GL implementation and change them to match what GLContext actually exposes.
56
0
57
0
    if (aName == LOCAL_GL_VERSION) {
58
0
        if (aContext->IsGLES()) {
59
0
            return reinterpret_cast<const GLubyte*>("OpenGL ES 2.0");
60
0
        }
61
0
        return reinterpret_cast<const GLubyte*>("2.0");
62
0
    } else if (aName == LOCAL_GL_EXTENSIONS) {
63
0
        // Only expose the bare minimum extensions we want to support to ensure a functional Ganesh
64
0
        // as GLContext only exposes certain extensions
65
0
        static bool extensionsStringBuilt = false;
66
0
        static char extensionsString[1024];
67
0
68
0
        if (!extensionsStringBuilt) {
69
0
            extensionsString[0] = '\0';
70
0
71
0
            if (aContext->IsGLES()) {
72
0
                // OES is only applicable to GLES2
73
0
                if (aContext->IsExtensionSupported(GLContext::OES_packed_depth_stencil)) {
74
0
                    strcat(extensionsString, "GL_OES_packed_depth_stencil ");
75
0
                }
76
0
77
0
                if (aContext->IsExtensionSupported(GLContext::OES_rgb8_rgba8)) {
78
0
                    strcat(extensionsString, "GL_OES_rgb8_rgba8 ");
79
0
                }
80
0
81
0
                if (aContext->IsExtensionSupported(GLContext::OES_texture_npot)) {
82
0
                    strcat(extensionsString, "GL_OES_texture_npot ");
83
0
                }
84
0
85
0
                if (aContext->IsExtensionSupported(GLContext::OES_vertex_array_object)) {
86
0
                    strcat(extensionsString, "GL_OES_vertex_array_object ");
87
0
                }
88
0
89
0
                if (aContext->IsSupported(GLFeature::standard_derivatives)) {
90
0
                    strcat(extensionsString, "GL_OES_standard_derivatives ");
91
0
                }
92
0
            } else {
93
0
                if (aContext->IsSupported(GLFeature::framebuffer_object)) {
94
0
                    strcat(extensionsString, "GL_ARB_framebuffer_object ");
95
0
                } else if (aContext->IsExtensionSupported(GLContext::EXT_framebuffer_object)) {
96
0
                    strcat(extensionsString, "GL_EXT_framebuffer_object ");
97
0
                }
98
0
99
0
                if (aContext->IsSupported(GLFeature::texture_rg)) {
100
0
                    strcat(extensionsString, "GL_ARB_texture_rg ");
101
0
                }
102
0
            }
103
0
104
0
            if (aContext->IsExtensionSupported(GLContext::EXT_texture_format_BGRA8888)) {
105
0
                strcat(extensionsString, "GL_EXT_texture_format_BGRA8888 ");
106
0
            }
107
0
108
0
            if (aContext->IsExtensionSupported(GLContext::EXT_packed_depth_stencil)) {
109
0
                strcat(extensionsString, "GL_EXT_packed_depth_stencil ");
110
0
            }
111
0
112
0
            if (aContext->IsExtensionSupported(GLContext::EXT_bgra)) {
113
0
                strcat(extensionsString, "GL_EXT_bgra ");
114
0
            }
115
0
116
0
            if (aContext->IsExtensionSupported(GLContext::EXT_read_format_bgra)) {
117
0
                strcat(extensionsString, "GL_EXT_read_format_bgra ");
118
0
            }
119
0
120
0
            extensionsStringBuilt = true;
121
#ifdef DEBUG
122
            printf_stderr("Exported SkiaGL extensions: %s\n", extensionsString);
123
#endif
124
        }
125
0
126
0
        return reinterpret_cast<const GLubyte*>(extensionsString);
127
0
128
0
    } else if (aName == LOCAL_GL_SHADING_LANGUAGE_VERSION) {
129
0
        if (aContext->IsGLES()) {
130
0
            return reinterpret_cast<const GLubyte*>("OpenGL ES GLSL ES 1.0");
131
0
        }
132
0
        return reinterpret_cast<const GLubyte*>("1.10");
133
0
    }
134
0
135
0
    return aContext->fGetString(aName);
136
0
}
137
138
static GrGLInterface* CreateGrGLInterfaceFromGLContext(GLContext* context)
139
0
{
140
0
    auto *i = new GrGLInterface();
141
0
142
0
    context->MakeCurrent();
143
0
144
0
    // We support both desktop GL and GLES2
145
0
    if (context->IsGLES()) {
146
0
        i->fStandard = kGLES_GrGLStandard;
147
0
    } else {
148
0
        i->fStandard = kGL_GrGLStandard;
149
0
    }
150
0
151
0
    GrGLFunction<GrGLGetStringProc> getString = WrapGL(context, &glGetString_mozilla);
152
0
    GrGLFunction<GrGLGetIntegervProc> getIntegerv = WrapGL(context, &GLContext::fGetIntegerv);
153
0
154
0
    GrGLExtensions extensions;
155
0
    if (!extensions.init(i->fStandard, getString, nullptr, getIntegerv)) {
156
0
        delete i;
157
0
        return nullptr;
158
0
    }
159
0
160
0
    i->fExtensions.swap(&extensions);
161
0
162
0
    // Core GL functions required by Ganesh
163
0
    i->fFunctions.fActiveTexture = WrapGL(context, &GLContext::fActiveTexture);
164
0
    i->fFunctions.fAttachShader = WrapGL(context, &GLContext::fAttachShader);
165
0
    i->fFunctions.fBindAttribLocation = WrapGL(context, &GLContext::fBindAttribLocation);
166
0
    i->fFunctions.fBindBuffer = WrapGL(context, &GLContext::fBindBuffer);
167
0
    i->fFunctions.fBindFramebuffer = WrapGL(context, &GLContext::fBindFramebuffer);
168
0
    i->fFunctions.fBindRenderbuffer = WrapGL(context, &GLContext::fBindRenderbuffer);
169
0
    i->fFunctions.fBindTexture = WrapGL(context, &GLContext::fBindTexture);
170
0
    i->fFunctions.fBlendFunc = WrapGL(context, &GLContext::fBlendFunc);
171
0
    i->fFunctions.fBlendColor = WrapGL(context, &GLContext::fBlendColor);
172
0
    i->fFunctions.fBlendEquation = WrapGL(context, &GLContext::fBlendEquation);
173
0
    i->fFunctions.fBufferData = WrapGL(context, &GLContext::fBufferData);
174
0
    i->fFunctions.fBufferSubData = WrapGL(context, &GLContext::fBufferSubData);
175
0
    i->fFunctions.fCheckFramebufferStatus = WrapGL(context, &GLContext::fCheckFramebufferStatus);
176
0
    i->fFunctions.fClear = WrapGL(context, &GLContext::fClear);
177
0
    i->fFunctions.fClearColor = WrapGL(context, &GLContext::fClearColor);
178
0
    i->fFunctions.fClearStencil = WrapGL(context, &GLContext::fClearStencil);
179
0
    i->fFunctions.fColorMask = WrapGL(context, &GLContext::fColorMask);
180
0
    i->fFunctions.fCompileShader = WrapGL(context, &GLContext::fCompileShader);
181
0
    i->fFunctions.fCompressedTexImage2D = WrapGL(context, &GLContext::fCompressedTexImage2D);
182
0
    i->fFunctions.fCompressedTexSubImage2D = WrapGL(context, &GLContext::fCompressedTexSubImage2D);
183
0
    i->fFunctions.fCopyTexSubImage2D = WrapGL(context, &GLContext::fCopyTexSubImage2D);
184
0
    i->fFunctions.fCreateProgram = WrapGL(context, &GLContext::fCreateProgram);
185
0
    i->fFunctions.fCreateShader = WrapGL(context, &GLContext::fCreateShader);
186
0
    i->fFunctions.fCullFace = WrapGL(context, &GLContext::fCullFace);
187
0
    i->fFunctions.fDeleteBuffers = WrapGL(context, &GLContext::fDeleteBuffers);
188
0
    i->fFunctions.fDeleteFramebuffers = WrapGL(context, &GLContext::fDeleteFramebuffers);
189
0
    i->fFunctions.fDeleteProgram = WrapGL(context, &GLContext::fDeleteProgram);
190
0
    i->fFunctions.fDeleteRenderbuffers = WrapGL(context, &GLContext::fDeleteRenderbuffers);
191
0
    i->fFunctions.fDeleteShader = WrapGL(context, &GLContext::fDeleteShader);
192
0
    i->fFunctions.fDeleteTextures = WrapGL(context, &GLContext::fDeleteTextures);
193
0
    i->fFunctions.fDepthMask = WrapGL(context, &GLContext::fDepthMask);
194
0
    i->fFunctions.fDisable = WrapGL(context, &GLContext::fDisable);
195
0
    i->fFunctions.fDisableVertexAttribArray = WrapGL(context, &GLContext::fDisableVertexAttribArray);
196
0
    i->fFunctions.fDrawArrays = WrapGL(context, &GLContext::fDrawArrays);
197
0
    i->fFunctions.fDrawElements = WrapGL(context, &GLContext::fDrawElements);
198
0
    i->fFunctions.fDrawRangeElements = WrapGL(context, &GLContext::fDrawRangeElements);
199
0
    i->fFunctions.fEnable = WrapGL(context, &GLContext::fEnable);
200
0
    i->fFunctions.fEnableVertexAttribArray = WrapGL(context, &GLContext::fEnableVertexAttribArray);
201
0
    i->fFunctions.fFinish = WrapGL(context, &GLContext::fFinish);
202
0
    i->fFunctions.fFlush = WrapGL(context, &GLContext::fFlush);
203
0
    i->fFunctions.fFramebufferRenderbuffer = WrapGL(context, &GLContext::fFramebufferRenderbuffer);
204
0
    i->fFunctions.fFramebufferTexture2D = WrapGL(context, &GLContext::fFramebufferTexture2D);
205
0
    i->fFunctions.fFrontFace = WrapGL(context, &GLContext::fFrontFace);
206
0
    i->fFunctions.fGenBuffers = WrapGL(context, &GLContext::fGenBuffers);
207
0
    i->fFunctions.fGenFramebuffers = WrapGL(context, &GLContext::fGenFramebuffers);
208
0
    i->fFunctions.fGenRenderbuffers = WrapGL(context, &GLContext::fGenRenderbuffers);
209
0
    i->fFunctions.fGetFramebufferAttachmentParameteriv = WrapGL(context, &GLContext::fGetFramebufferAttachmentParameteriv);
210
0
    i->fFunctions.fGenTextures = WrapGL(context, &GLContext::fGenTextures);
211
0
    i->fFunctions.fGenerateMipmap = WrapGL(context, &GLContext::fGenerateMipmap);
212
0
    i->fFunctions.fGetBufferParameteriv = WrapGL(context, &GLContext::fGetBufferParameteriv);
213
0
    i->fFunctions.fGetError = WrapGL(context, &GLContext::fGetError);
214
0
    i->fFunctions.fGetIntegerv = getIntegerv;
215
0
    i->fFunctions.fGetProgramInfoLog = WrapGL(context, &GLContext::fGetProgramInfoLog);
216
0
    i->fFunctions.fGetProgramiv = WrapGL(context, &GLContext::fGetProgramiv);
217
0
    i->fFunctions.fGetRenderbufferParameteriv = WrapGL(context, &GLContext::fGetRenderbufferParameteriv);
218
0
    i->fFunctions.fGetShaderInfoLog = WrapGL(context, &GLContext::fGetShaderInfoLog);
219
0
    i->fFunctions.fGetShaderiv = WrapGL(context, &GLContext::fGetShaderiv);
220
0
    i->fFunctions.fGetShaderPrecisionFormat = WrapGL(context, &GLContext::fGetShaderPrecisionFormat);
221
0
    i->fFunctions.fGetString = getString;
222
0
    i->fFunctions.fGetUniformLocation = WrapGL(context, &GLContext::fGetUniformLocation);
223
0
    i->fFunctions.fIsTexture = WrapGL(context, &GLContext::fIsTexture);
224
0
    i->fFunctions.fLineWidth = WrapGL(context, &GLContext::fLineWidth);
225
0
    i->fFunctions.fLinkProgram = WrapGL(context, &GLContext::fLinkProgram);
226
0
    i->fFunctions.fPixelStorei = WrapGL(context, &GLContext::fPixelStorei);
227
0
    i->fFunctions.fPolygonMode = WrapGL(context, &GLContext::fPolygonMode);
228
0
    i->fFunctions.fReadPixels = WrapGL(context, &GLContext::fReadPixels);
229
0
    i->fFunctions.fRenderbufferStorage = WrapGL(context, &GLContext::fRenderbufferStorage);
230
0
    i->fFunctions.fScissor = WrapGL(context, &GLContext::fScissor);
231
0
    i->fFunctions.fShaderSource = WrapGL(context, &GLContext::fShaderSource);
232
0
    i->fFunctions.fStencilFunc = WrapGL(context, &GLContext::fStencilFunc);
233
0
    i->fFunctions.fStencilFuncSeparate = WrapGL(context, &GLContext::fStencilFuncSeparate);
234
0
    i->fFunctions.fStencilMask = WrapGL(context, &GLContext::fStencilMask);
235
0
    i->fFunctions.fStencilMaskSeparate = WrapGL(context, &GLContext::fStencilMaskSeparate);
236
0
    i->fFunctions.fStencilOp = WrapGL(context, &GLContext::fStencilOp);
237
0
    i->fFunctions.fStencilOpSeparate = WrapGL(context, &GLContext::fStencilOpSeparate);
238
0
    i->fFunctions.fTexImage2D = WrapGL(context, &GLContext::fTexImage2D);
239
0
    i->fFunctions.fTexParameteri = WrapGL(context, &GLContext::fTexParameteri);
240
0
    i->fFunctions.fTexParameteriv = WrapGL(context, &GLContext::fTexParameteriv);
241
0
    i->fFunctions.fTexSubImage2D = WrapGL(context, &GLContext::fTexSubImage2D);
242
0
    i->fFunctions.fUniform1f = WrapGL(context, &GLContext::fUniform1f);
243
0
    i->fFunctions.fUniform1i = WrapGL(context, &GLContext::fUniform1i);
244
0
    i->fFunctions.fUniform1fv = WrapGL(context, &GLContext::fUniform1fv);
245
0
    i->fFunctions.fUniform1iv = WrapGL(context, &GLContext::fUniform1iv);
246
0
    i->fFunctions.fUniform2f = WrapGL(context, &GLContext::fUniform2f);
247
0
    i->fFunctions.fUniform2i = WrapGL(context, &GLContext::fUniform2i);
248
0
    i->fFunctions.fUniform2fv = WrapGL(context, &GLContext::fUniform2fv);
249
0
    i->fFunctions.fUniform2iv = WrapGL(context, &GLContext::fUniform2iv);
250
0
    i->fFunctions.fUniform3f = WrapGL(context, &GLContext::fUniform3f);
251
0
    i->fFunctions.fUniform3i = WrapGL(context, &GLContext::fUniform3i);
252
0
    i->fFunctions.fUniform3fv = WrapGL(context, &GLContext::fUniform3fv);
253
0
    i->fFunctions.fUniform3iv = WrapGL(context, &GLContext::fUniform3iv);
254
0
    i->fFunctions.fUniform4f = WrapGL(context, &GLContext::fUniform4f);
255
0
    i->fFunctions.fUniform4i = WrapGL(context, &GLContext::fUniform4i);
256
0
    i->fFunctions.fUniform4fv = WrapGL(context, &GLContext::fUniform4fv);
257
0
    i->fFunctions.fUniform4iv = WrapGL(context, &GLContext::fUniform4iv);
258
0
    i->fFunctions.fUniformMatrix2fv = WrapGL(context, &GLContext::fUniformMatrix2fv);
259
0
    i->fFunctions.fUniformMatrix3fv = WrapGL(context, &GLContext::fUniformMatrix3fv);
260
0
    i->fFunctions.fUniformMatrix4fv = WrapGL(context, &GLContext::fUniformMatrix4fv);
261
0
    i->fFunctions.fUseProgram = WrapGL(context, &GLContext::fUseProgram);
262
0
    i->fFunctions.fVertexAttrib1f = WrapGL(context, &GLContext::fVertexAttrib1f);
263
0
    i->fFunctions.fVertexAttrib2fv = WrapGL(context, &GLContext::fVertexAttrib2fv);
264
0
    i->fFunctions.fVertexAttrib3fv = WrapGL(context, &GLContext::fVertexAttrib3fv);
265
0
    i->fFunctions.fVertexAttrib4fv = WrapGL(context, &GLContext::fVertexAttrib4fv);
266
0
    i->fFunctions.fVertexAttribPointer = WrapGL(context, &GLContext::fVertexAttribPointer);
267
0
    i->fFunctions.fViewport = WrapGL(context, &GLContext::fViewport);
268
0
269
0
    // Required for either desktop OpenGL 2.0 or OpenGL ES 2.0
270
0
    i->fFunctions.fStencilFuncSeparate = WrapGL(context, &GLContext::fStencilFuncSeparate);
271
0
    i->fFunctions.fStencilMaskSeparate = WrapGL(context, &GLContext::fStencilMaskSeparate);
272
0
    i->fFunctions.fStencilOpSeparate = WrapGL(context, &GLContext::fStencilOpSeparate);
273
0
274
0
    // GLContext supports glMapBuffer
275
0
    i->fFunctions.fMapBuffer = WrapGL(context, &GLContext::fMapBuffer);
276
0
    i->fFunctions.fUnmapBuffer = WrapGL(context, &GLContext::fUnmapBuffer);
277
0
278
0
    // GLContext supports glRenderbufferStorageMultisample/glBlitFramebuffer
279
0
    i->fFunctions.fRenderbufferStorageMultisample = WrapGL(context, &GLContext::fRenderbufferStorageMultisample);
280
0
    i->fFunctions.fBlitFramebuffer = WrapGL(context, &GLContext::fBlitFramebuffer);
281
0
282
0
    // GLContext supports glCompressedTexImage2D
283
0
    i->fFunctions.fCompressedTexImage2D = WrapGL(context, &GLContext::fCompressedTexImage2D);
284
0
285
0
    // GL_OES_vertex_array_object
286
0
    i->fFunctions.fBindVertexArray = WrapGL(context, &GLContext::fBindVertexArray);
287
0
    i->fFunctions.fDeleteVertexArrays = WrapGL(context, &GLContext::fDeleteVertexArrays);
288
0
    i->fFunctions.fGenVertexArrays = WrapGL(context, &GLContext::fGenVertexArrays);
289
0
290
0
    // Desktop GL
291
0
    i->fFunctions.fGetTexLevelParameteriv = WrapGL(context, &GLContext::fGetTexLevelParameteriv);
292
0
    i->fFunctions.fDrawBuffer = WrapGL(context, &GLContext::fDrawBuffer);
293
0
    i->fFunctions.fReadBuffer = WrapGL(context, &GLContext::fReadBuffer);
294
0
295
0
    // Desktop OpenGL > 1.5
296
0
    i->fFunctions.fGenQueries = WrapGL(context, &GLContext::fGenQueries);
297
0
    i->fFunctions.fDeleteQueries = WrapGL(context, &GLContext::fDeleteQueries);
298
0
    i->fFunctions.fBeginQuery = WrapGL(context, &GLContext::fBeginQuery);
299
0
    i->fFunctions.fEndQuery = WrapGL(context, &GLContext::fEndQuery);
300
0
    i->fFunctions.fGetQueryiv = WrapGL(context, &GLContext::fGetQueryiv);
301
0
    i->fFunctions.fGetQueryObjectiv = WrapGL(context, &GLContext::fGetQueryObjectiv);
302
0
    i->fFunctions.fGetQueryObjectuiv = WrapGL(context, &GLContext::fGetQueryObjectuiv);
303
0
304
0
    // Desktop OpenGL > 2.0
305
0
    i->fFunctions.fDrawBuffers = WrapGL(context, &GLContext::fDrawBuffers);
306
0
307
0
    return i;
308
0
}
309
310
SkiaGLGlue::SkiaGLGlue(GLContext* context)
311
    : mGLContext(context)
312
0
{
313
0
    mGrGLInterface.reset(CreateGrGLInterfaceFromGLContext(mGLContext));
314
0
    mGrContext.reset(GrContext::Create(kOpenGL_GrBackend, (GrBackendContext)mGrGLInterface.get()));
315
0
}
316
317
SkiaGLGlue::~SkiaGLGlue()
318
0
{
319
0
    /*
320
0
     * These members have inter-dependencies, but do not keep each other alive, so
321
0
     * destruction order is very important here: mGrContext uses mGrGLInterface, and
322
0
     * through it, uses mGLContext
323
0
     */
324
0
    mGrContext = nullptr;
325
0
    if (mGrGLInterface) {
326
0
      // Ensure that no references to the GLContext remain, even if the GrContext still lives.
327
0
      mGrGLInterface->fFunctions = GrGLInterface::Functions();
328
0
      mGrGLInterface = nullptr;
329
0
    }
330
0
    mGLContext = nullptr;
331
0
}