mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-07 18:04:46 +00:00
Bug 1279657 - Star to left against type. - r=jrmuizel
MozReview-Commit-ID: IAuzZp4qcRX
This commit is contained in:
parent
acda27dffc
commit
f24d3f8f8b
@ -131,10 +131,10 @@ private:
|
||||
typedef int32_t (*pfnANativeWindow_setBuffersGeometry)(void* window, int32_t width, int32_t height, int32_t format);
|
||||
pfnANativeWindow_setBuffersGeometry fANativeWindow_setBuffersGeometry;
|
||||
|
||||
typedef int32_t (*pfnANativeWindow_lock)(void *window, void *out_buffer, void *in_out_dirtyBounds);
|
||||
typedef int32_t (*pfnANativeWindow_lock)(void* window, void* out_buffer, void* in_out_dirtyBounds);
|
||||
pfnANativeWindow_lock fANativeWindow_lock;
|
||||
|
||||
typedef int32_t (*pfnANativeWindow_unlockAndPost)(void *window);
|
||||
typedef int32_t (*pfnANativeWindow_unlockAndPost)(void* window);
|
||||
pfnANativeWindow_unlockAndPost fANativeWindow_unlockAndPost;
|
||||
|
||||
typedef AndroidWindowFormat (*pfnANativeWindow_getFormat)(void* window);
|
||||
@ -247,7 +247,7 @@ AndroidNativeWindow::Lock(void** out_bits,int32_t* out_width, int32_t* out_heigh
|
||||
|
||||
// Do not touch.
|
||||
uint32_t reserved[6];
|
||||
} ANativeWindow_Buffer;
|
||||
} ANativeWindow_Buffer;
|
||||
|
||||
|
||||
ANativeWindow_Buffer buffer;
|
||||
|
@ -236,8 +236,8 @@ GLBlitHelper::InitTexQuadProgram(BlitType target)
|
||||
|
||||
bool success = false;
|
||||
|
||||
GLuint *programPtr;
|
||||
GLuint *fragShaderPtr;
|
||||
GLuint* programPtr;
|
||||
GLuint* fragShaderPtr;
|
||||
const char* fragShaderSource;
|
||||
switch (target) {
|
||||
case ConvertEGLImage:
|
||||
|
@ -473,7 +473,7 @@ GLContext::~GLContext() {
|
||||
NS_ASSERTION(IsDestroyed(), "GLContext implementation must call MarkDestroyed in destructor!");
|
||||
#ifdef MOZ_GL_DEBUG
|
||||
if (mSharedContext) {
|
||||
GLContext *tip = mSharedContext;
|
||||
GLContext* tip = mSharedContext;
|
||||
while (tip->mSharedContext)
|
||||
tip = tip->mSharedContext;
|
||||
tip->SharedContextDestroyed(this);
|
||||
@ -1548,8 +1548,8 @@ GLContext::LoadMoreSymbols(const char* prefix, bool trygl)
|
||||
|
||||
if (IsSupported(GLFeature::invalidate_framebuffer)) {
|
||||
const SymLoadStruct symbols[] = {
|
||||
{ (PRFuncPtr *) &mSymbols.fInvalidateFramebuffer, { "InvalidateFramebuffer", nullptr } },
|
||||
{ (PRFuncPtr *) &mSymbols.fInvalidateSubFramebuffer, { "InvalidateSubFramebuffer", nullptr } },
|
||||
{ (PRFuncPtr*) &mSymbols.fInvalidateFramebuffer, { "InvalidateFramebuffer", nullptr } },
|
||||
{ (PRFuncPtr*) &mSymbols.fInvalidateSubFramebuffer, { "InvalidateSubFramebuffer", nullptr } },
|
||||
END_SYMBOLS
|
||||
};
|
||||
fnLoadForFeature(symbols, GLFeature::invalidate_framebuffer);
|
||||
@ -1826,17 +1826,18 @@ GLContext::PlatformStartup()
|
||||
|
||||
// Common code for checking for both GL extensions and GLX extensions.
|
||||
bool
|
||||
GLContext::ListHasExtension(const GLubyte *extensions, const char *extension)
|
||||
GLContext::ListHasExtension(const GLubyte* extensions, const char* extension)
|
||||
{
|
||||
// fix bug 612572 - we were crashing as we were calling this function with extensions==null
|
||||
if (extensions == nullptr || extension == nullptr)
|
||||
return false;
|
||||
|
||||
const GLubyte *start;
|
||||
GLubyte *where, *terminator;
|
||||
const GLubyte* start;
|
||||
GLubyte* where;
|
||||
GLubyte* terminator;
|
||||
|
||||
/* Extension names should not have spaces. */
|
||||
where = (GLubyte *) strchr(extension, ' ');
|
||||
where = (GLubyte*) strchr(extension, ' ');
|
||||
if (where || *extension == '\0')
|
||||
return false;
|
||||
|
||||
@ -1847,7 +1848,7 @@ GLContext::ListHasExtension(const GLubyte *extensions, const char *extension)
|
||||
*/
|
||||
start = extensions;
|
||||
for (;;) {
|
||||
where = (GLubyte *) strstr((const char *) start, extension);
|
||||
where = (GLubyte*) strstr((const char*) start, extension);
|
||||
if (!where) {
|
||||
break;
|
||||
}
|
||||
@ -2235,19 +2236,19 @@ GLContext::AssertNotPassingStackBufferToTheGL(const void* ptr)
|
||||
}
|
||||
|
||||
void
|
||||
GLContext::CreatedProgram(GLContext *aOrigin, GLuint aName)
|
||||
GLContext::CreatedProgram(GLContext* aOrigin, GLuint aName)
|
||||
{
|
||||
mTrackedPrograms.AppendElement(NamedResource(aOrigin, aName));
|
||||
}
|
||||
|
||||
void
|
||||
GLContext::CreatedShader(GLContext *aOrigin, GLuint aName)
|
||||
GLContext::CreatedShader(GLContext* aOrigin, GLuint aName)
|
||||
{
|
||||
mTrackedShaders.AppendElement(NamedResource(aOrigin, aName));
|
||||
}
|
||||
|
||||
void
|
||||
GLContext::CreatedBuffers(GLContext *aOrigin, GLsizei aCount, GLuint *aNames)
|
||||
GLContext::CreatedBuffers(GLContext* aOrigin, GLsizei aCount, GLuint* aNames)
|
||||
{
|
||||
for (GLsizei i = 0; i < aCount; ++i) {
|
||||
mTrackedBuffers.AppendElement(NamedResource(aOrigin, aNames[i]));
|
||||
@ -2255,7 +2256,7 @@ GLContext::CreatedBuffers(GLContext *aOrigin, GLsizei aCount, GLuint *aNames)
|
||||
}
|
||||
|
||||
void
|
||||
GLContext::CreatedQueries(GLContext *aOrigin, GLsizei aCount, GLuint *aNames)
|
||||
GLContext::CreatedQueries(GLContext* aOrigin, GLsizei aCount, GLuint* aNames)
|
||||
{
|
||||
for (GLsizei i = 0; i < aCount; ++i) {
|
||||
mTrackedQueries.AppendElement(NamedResource(aOrigin, aNames[i]));
|
||||
@ -2263,7 +2264,7 @@ GLContext::CreatedQueries(GLContext *aOrigin, GLsizei aCount, GLuint *aNames)
|
||||
}
|
||||
|
||||
void
|
||||
GLContext::CreatedTextures(GLContext *aOrigin, GLsizei aCount, GLuint *aNames)
|
||||
GLContext::CreatedTextures(GLContext* aOrigin, GLsizei aCount, GLuint* aNames)
|
||||
{
|
||||
for (GLsizei i = 0; i < aCount; ++i) {
|
||||
mTrackedTextures.AppendElement(NamedResource(aOrigin, aNames[i]));
|
||||
@ -2271,7 +2272,7 @@ GLContext::CreatedTextures(GLContext *aOrigin, GLsizei aCount, GLuint *aNames)
|
||||
}
|
||||
|
||||
void
|
||||
GLContext::CreatedFramebuffers(GLContext *aOrigin, GLsizei aCount, GLuint *aNames)
|
||||
GLContext::CreatedFramebuffers(GLContext* aOrigin, GLsizei aCount, GLuint* aNames)
|
||||
{
|
||||
for (GLsizei i = 0; i < aCount; ++i) {
|
||||
mTrackedFramebuffers.AppendElement(NamedResource(aOrigin, aNames[i]));
|
||||
@ -2279,7 +2280,7 @@ GLContext::CreatedFramebuffers(GLContext *aOrigin, GLsizei aCount, GLuint *aName
|
||||
}
|
||||
|
||||
void
|
||||
GLContext::CreatedRenderbuffers(GLContext *aOrigin, GLsizei aCount, GLuint *aNames)
|
||||
GLContext::CreatedRenderbuffers(GLContext* aOrigin, GLsizei aCount, GLuint* aNames)
|
||||
{
|
||||
for (GLsizei i = 0; i < aCount; ++i) {
|
||||
mTrackedRenderbuffers.AppendElement(NamedResource(aOrigin, aNames[i]));
|
||||
@ -2287,7 +2288,7 @@ GLContext::CreatedRenderbuffers(GLContext *aOrigin, GLsizei aCount, GLuint *aNam
|
||||
}
|
||||
|
||||
static void
|
||||
RemoveNamesFromArray(GLContext *aOrigin, GLsizei aCount, const GLuint *aNames, nsTArray<GLContext::NamedResource>& aArray)
|
||||
RemoveNamesFromArray(GLContext* aOrigin, GLsizei aCount, const GLuint* aNames, nsTArray<GLContext::NamedResource>& aArray)
|
||||
{
|
||||
for (GLsizei j = 0; j < aCount; ++j) {
|
||||
GLuint name = aNames[j];
|
||||
@ -2305,49 +2306,49 @@ RemoveNamesFromArray(GLContext *aOrigin, GLsizei aCount, const GLuint *aNames, n
|
||||
}
|
||||
|
||||
void
|
||||
GLContext::DeletedProgram(GLContext *aOrigin, GLuint aName)
|
||||
GLContext::DeletedProgram(GLContext* aOrigin, GLuint aName)
|
||||
{
|
||||
RemoveNamesFromArray(aOrigin, 1, &aName, mTrackedPrograms);
|
||||
}
|
||||
|
||||
void
|
||||
GLContext::DeletedShader(GLContext *aOrigin, GLuint aName)
|
||||
GLContext::DeletedShader(GLContext* aOrigin, GLuint aName)
|
||||
{
|
||||
RemoveNamesFromArray(aOrigin, 1, &aName, mTrackedShaders);
|
||||
}
|
||||
|
||||
void
|
||||
GLContext::DeletedBuffers(GLContext *aOrigin, GLsizei aCount, const GLuint *aNames)
|
||||
GLContext::DeletedBuffers(GLContext* aOrigin, GLsizei aCount, const GLuint* aNames)
|
||||
{
|
||||
RemoveNamesFromArray(aOrigin, aCount, aNames, mTrackedBuffers);
|
||||
}
|
||||
|
||||
void
|
||||
GLContext::DeletedQueries(GLContext *aOrigin, GLsizei aCount, const GLuint *aNames)
|
||||
GLContext::DeletedQueries(GLContext* aOrigin, GLsizei aCount, const GLuint* aNames)
|
||||
{
|
||||
RemoveNamesFromArray(aOrigin, aCount, aNames, mTrackedQueries);
|
||||
}
|
||||
|
||||
void
|
||||
GLContext::DeletedTextures(GLContext *aOrigin, GLsizei aCount, const GLuint *aNames)
|
||||
GLContext::DeletedTextures(GLContext* aOrigin, GLsizei aCount, const GLuint* aNames)
|
||||
{
|
||||
RemoveNamesFromArray(aOrigin, aCount, aNames, mTrackedTextures);
|
||||
}
|
||||
|
||||
void
|
||||
GLContext::DeletedFramebuffers(GLContext *aOrigin, GLsizei aCount, const GLuint *aNames)
|
||||
GLContext::DeletedFramebuffers(GLContext* aOrigin, GLsizei aCount, const GLuint* aNames)
|
||||
{
|
||||
RemoveNamesFromArray(aOrigin, aCount, aNames, mTrackedFramebuffers);
|
||||
}
|
||||
|
||||
void
|
||||
GLContext::DeletedRenderbuffers(GLContext *aOrigin, GLsizei aCount, const GLuint *aNames)
|
||||
GLContext::DeletedRenderbuffers(GLContext* aOrigin, GLsizei aCount, const GLuint* aNames)
|
||||
{
|
||||
RemoveNamesFromArray(aOrigin, aCount, aNames, mTrackedRenderbuffers);
|
||||
}
|
||||
|
||||
static void
|
||||
MarkContextDestroyedInArray(GLContext *aContext, nsTArray<GLContext::NamedResource>& aArray)
|
||||
MarkContextDestroyedInArray(GLContext* aContext, nsTArray<GLContext::NamedResource>& aArray)
|
||||
{
|
||||
for (uint32_t i = 0; i < aArray.Length(); ++i) {
|
||||
if (aArray[i].origin == aContext)
|
||||
@ -2356,7 +2357,7 @@ MarkContextDestroyedInArray(GLContext *aContext, nsTArray<GLContext::NamedResour
|
||||
}
|
||||
|
||||
void
|
||||
GLContext::SharedContextDestroyed(GLContext *aChild)
|
||||
GLContext::SharedContextDestroyed(GLContext* aChild)
|
||||
{
|
||||
MarkContextDestroyedInArray(aChild, mTrackedPrograms);
|
||||
MarkContextDestroyedInArray(aChild, mTrackedShaders);
|
||||
@ -2368,7 +2369,7 @@ GLContext::SharedContextDestroyed(GLContext *aChild)
|
||||
}
|
||||
|
||||
static void
|
||||
ReportArrayContents(const char *title, const nsTArray<GLContext::NamedResource>& aArray)
|
||||
ReportArrayContents(const char* title, const nsTArray<GLContext::NamedResource>& aArray)
|
||||
{
|
||||
if (aArray.Length() == 0)
|
||||
return;
|
||||
@ -2378,7 +2379,7 @@ ReportArrayContents(const char *title, const nsTArray<GLContext::NamedResource>&
|
||||
nsTArray<GLContext::NamedResource> copy(aArray);
|
||||
copy.Sort();
|
||||
|
||||
GLContext *lastContext = nullptr;
|
||||
GLContext* lastContext = nullptr;
|
||||
for (uint32_t i = 0; i < copy.Length(); ++i) {
|
||||
if (lastContext != copy[i].origin) {
|
||||
if (lastContext)
|
||||
@ -2532,12 +2533,12 @@ GLContext::ShouldDumpExts()
|
||||
}
|
||||
|
||||
bool
|
||||
DoesStringMatch(const char* aString, const char *aWantedString)
|
||||
DoesStringMatch(const char* aString, const char* aWantedString)
|
||||
{
|
||||
if (!aString || !aWantedString)
|
||||
return false;
|
||||
|
||||
const char *occurrence = strstr(aString, aWantedString);
|
||||
const char* occurrence = strstr(aString, aWantedString);
|
||||
|
||||
// aWanted not found
|
||||
if (!occurrence)
|
||||
@ -2548,7 +2549,7 @@ DoesStringMatch(const char* aString, const char *aWantedString)
|
||||
return false;
|
||||
|
||||
// aWantedVendor followed by alpha character
|
||||
const char *afterOccurrence = occurrence + strlen(aWantedString);
|
||||
const char* afterOccurrence = occurrence + strlen(aWantedString);
|
||||
if (isalpha(*afterOccurrence))
|
||||
return false;
|
||||
|
||||
|
@ -765,9 +765,9 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
GLContext *TrackingContext()
|
||||
GLContext* TrackingContext()
|
||||
{
|
||||
GLContext *tip = this;
|
||||
GLContext* tip = this;
|
||||
while (tip->mSharedContext)
|
||||
tip = tip->mSharedContext;
|
||||
return tip;
|
||||
@ -1021,7 +1021,7 @@ public:
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
void fCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *pixels) {
|
||||
void fCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* pixels) {
|
||||
ASSERT_NOT_PASSING_STACK_BUFFER_TO_GL(pixels);
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, pixels);
|
||||
@ -1029,7 +1029,7 @@ public:
|
||||
mHeavyGLCallsSinceLastFlush = true;
|
||||
}
|
||||
|
||||
void fCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *pixels) {
|
||||
void fCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* pixels) {
|
||||
ASSERT_NOT_PASSING_STACK_BUFFER_TO_GL(pixels);
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, pixels);
|
||||
@ -1123,7 +1123,7 @@ private:
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
void raw_fDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices) {
|
||||
void raw_fDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices) {
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fDrawElements(mode, count, type, indices);
|
||||
AFTER_GL_CALL;
|
||||
@ -1136,7 +1136,7 @@ public:
|
||||
AfterGLDrawCall();
|
||||
}
|
||||
|
||||
void fDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices) {
|
||||
void fDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices) {
|
||||
BeforeGLDrawCall();
|
||||
raw_fDrawElements(mode, count, type, indices);
|
||||
AfterGLDrawCall();
|
||||
@ -1223,7 +1223,7 @@ public:
|
||||
|
||||
void fGetIntegerv(GLenum pname, GLint* params);
|
||||
|
||||
void GetUIntegerv(GLenum pname, GLuint *params) {
|
||||
void GetUIntegerv(GLenum pname, GLuint* params) {
|
||||
fGetIntegerv(pname, reinterpret_cast<GLint*>(params));
|
||||
}
|
||||
|
||||
@ -1312,19 +1312,19 @@ public:
|
||||
|
||||
const GLubyte* fGetString(GLenum name) {
|
||||
BEFORE_GL_CALL;
|
||||
const GLubyte *result = mSymbols.fGetString(name);
|
||||
const GLubyte* result = mSymbols.fGetString(name);
|
||||
AFTER_GL_CALL;
|
||||
return result;
|
||||
}
|
||||
|
||||
void fGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *img) {
|
||||
void fGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, GLvoid* img) {
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fGetTexImage);
|
||||
mSymbols.fGetTexImage(target, level, format, type, img);
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
void fGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params)
|
||||
void fGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint* params)
|
||||
{
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fGetTexLevelParameteriv);
|
||||
@ -1461,7 +1461,7 @@ public:
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
void fLoadMatrixf(const GLfloat *matrix) {
|
||||
void fLoadMatrixf(const GLfloat* matrix) {
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fLoadMatrixf(matrix);
|
||||
AFTER_GL_CALL;
|
||||
@ -1479,7 +1479,7 @@ public:
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
void fTextureRangeAPPLE(GLenum target, GLsizei length, GLvoid *pointer) {
|
||||
void fTextureRangeAPPLE(GLenum target, GLsizei length, GLvoid* pointer) {
|
||||
ASSERT_NOT_PASSING_STACK_BUFFER_TO_GL(pointer);
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fTextureRangeAPPLE(target, length, pointer);
|
||||
@ -1518,7 +1518,7 @@ public:
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
void raw_fReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels) {
|
||||
void raw_fReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels) {
|
||||
ASSERT_NOT_PASSING_STACK_BUFFER_TO_GL(pixels);
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fReadPixels(x, y, width, height, format, type, pixels);
|
||||
@ -1601,14 +1601,14 @@ public:
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
void fTexGenfv(GLenum coord, GLenum pname, const GLfloat *params) {
|
||||
void fTexGenfv(GLenum coord, GLenum pname, const GLfloat* params) {
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fTexGenfv(coord, pname, params);
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
private:
|
||||
void raw_fTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels) {
|
||||
void raw_fTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels) {
|
||||
ASSERT_NOT_PASSING_STACK_BUFFER_TO_GL(pixels);
|
||||
BEFORE_GL_CALL;
|
||||
mSymbols.fTexImage2D(target, level, internalformat, width, height, border, format, type, pixels);
|
||||
@ -1617,7 +1617,7 @@ private:
|
||||
}
|
||||
|
||||
public:
|
||||
void fTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels) {
|
||||
void fTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels) {
|
||||
if (!IsTextureSizeSafeToPassToDriver(target, width, height)) {
|
||||
// pass wrong values to cause the GL to generate GL_INVALID_VALUE.
|
||||
// See bug 737182 and the comment in IsTextureSizeSafeToPassToDriver.
|
||||
@ -2066,7 +2066,7 @@ public:
|
||||
void* fMapBuffer(GLenum target, GLenum access) {
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fMapBuffer);
|
||||
void *ret = mSymbols.fMapBuffer(target, access);
|
||||
void* ret = mSymbols.fMapBuffer(target, access);
|
||||
AFTER_GL_CALL;
|
||||
return ret;
|
||||
}
|
||||
@ -2268,14 +2268,14 @@ public:
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
void fGetInteger64v(GLenum pname, GLint64 *params) {
|
||||
void fGetInteger64v(GLenum pname, GLint64* params) {
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fGetInteger64v);
|
||||
mSymbols.fGetInteger64v(pname, params);
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
void fGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values) {
|
||||
void fGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values) {
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fGetSynciv);
|
||||
mSymbols.fGetSynciv(sync, pname, bufSize, length, values);
|
||||
@ -2799,7 +2799,7 @@ public:
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
void fDeleteVertexArrays(GLsizei n, const GLuint *arrays)
|
||||
void fDeleteVertexArrays(GLsizei n, const GLuint* arrays)
|
||||
{
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fDeleteVertexArrays);
|
||||
@ -2807,7 +2807,7 @@ public:
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
void fGenVertexArrays(GLsizei n, GLuint *arrays)
|
||||
void fGenVertexArrays(GLsizei n, GLuint* arrays)
|
||||
{
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fGenVertexArrays);
|
||||
@ -2933,7 +2933,7 @@ public:
|
||||
// -----------------------------------------------------------------------------
|
||||
// Core GL & Extension ARB_sampler_objects
|
||||
public:
|
||||
void fGenSamplers(GLsizei count, GLuint *samplers)
|
||||
void fGenSamplers(GLsizei count, GLuint* samplers)
|
||||
{
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fGenSamplers);
|
||||
@ -2941,7 +2941,7 @@ public:
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
void fDeleteSamplers(GLsizei count, const GLuint *samplers)
|
||||
void fDeleteSamplers(GLsizei count, const GLuint* samplers)
|
||||
{
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fDeleteSamplers);
|
||||
@ -2974,7 +2974,7 @@ public:
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
void fSamplerParameteriv(GLuint sampler, GLenum pname, const GLint *param)
|
||||
void fSamplerParameteriv(GLuint sampler, GLenum pname, const GLint* param)
|
||||
{
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fSamplerParameteriv);
|
||||
@ -2990,7 +2990,7 @@ public:
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
void fSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat *param)
|
||||
void fSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat* param)
|
||||
{
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fSamplerParameterfv);
|
||||
@ -2998,7 +2998,7 @@ public:
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
void fGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *params)
|
||||
void fGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint* params)
|
||||
{
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fGetSamplerParameteriv);
|
||||
@ -3006,7 +3006,7 @@ public:
|
||||
AFTER_GL_CALL;
|
||||
}
|
||||
|
||||
void fGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat *params)
|
||||
void fGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat* params)
|
||||
{
|
||||
BEFORE_GL_CALL;
|
||||
ASSERT_SYMBOL_PRESENT(fGetSamplerParameterfv);
|
||||
@ -3237,7 +3237,7 @@ public:
|
||||
return mSymbols.fUseProgram == nullptr;
|
||||
}
|
||||
|
||||
GLContext *GetSharedContext() { return mSharedContext; }
|
||||
GLContext* GetSharedContext() { return mSharedContext; }
|
||||
|
||||
/**
|
||||
* Returns true if the thread on which this context was created is the currently
|
||||
@ -3345,8 +3345,8 @@ public:
|
||||
virtual bool RenewSurface(nsIWidget* aWidget) { return false; }
|
||||
|
||||
// Shared code for GL extensions and GLX extensions.
|
||||
static bool ListHasExtension(const GLubyte *extensions,
|
||||
const char *extension);
|
||||
static bool ListHasExtension(const GLubyte* extensions,
|
||||
const char* extension);
|
||||
|
||||
GLint GetMaxTextureImageSize() { return mMaxTextureImageSize; }
|
||||
|
||||
@ -3568,22 +3568,22 @@ public:
|
||||
#undef ASSERT_SYMBOL_PRESENT
|
||||
|
||||
#ifdef MOZ_GL_DEBUG
|
||||
void CreatedProgram(GLContext *aOrigin, GLuint aName);
|
||||
void CreatedShader(GLContext *aOrigin, GLuint aName);
|
||||
void CreatedBuffers(GLContext *aOrigin, GLsizei aCount, GLuint *aNames);
|
||||
void CreatedQueries(GLContext *aOrigin, GLsizei aCount, GLuint *aNames);
|
||||
void CreatedTextures(GLContext *aOrigin, GLsizei aCount, GLuint *aNames);
|
||||
void CreatedFramebuffers(GLContext *aOrigin, GLsizei aCount, GLuint *aNames);
|
||||
void CreatedRenderbuffers(GLContext *aOrigin, GLsizei aCount, GLuint *aNames);
|
||||
void DeletedProgram(GLContext *aOrigin, GLuint aName);
|
||||
void DeletedShader(GLContext *aOrigin, GLuint aName);
|
||||
void DeletedBuffers(GLContext *aOrigin, GLsizei aCount, const GLuint *aNames);
|
||||
void DeletedQueries(GLContext *aOrigin, GLsizei aCount, const GLuint *aNames);
|
||||
void DeletedTextures(GLContext *aOrigin, GLsizei aCount, const GLuint *aNames);
|
||||
void DeletedFramebuffers(GLContext *aOrigin, GLsizei aCount, const GLuint *aNames);
|
||||
void DeletedRenderbuffers(GLContext *aOrigin, GLsizei aCount, const GLuint *aNames);
|
||||
void CreatedProgram(GLContext* aOrigin, GLuint aName);
|
||||
void CreatedShader(GLContext* aOrigin, GLuint aName);
|
||||
void CreatedBuffers(GLContext* aOrigin, GLsizei aCount, GLuint* aNames);
|
||||
void CreatedQueries(GLContext* aOrigin, GLsizei aCount, GLuint* aNames);
|
||||
void CreatedTextures(GLContext* aOrigin, GLsizei aCount, GLuint* aNames);
|
||||
void CreatedFramebuffers(GLContext* aOrigin, GLsizei aCount, GLuint* aNames);
|
||||
void CreatedRenderbuffers(GLContext* aOrigin, GLsizei aCount, GLuint* aNames);
|
||||
void DeletedProgram(GLContext* aOrigin, GLuint aName);
|
||||
void DeletedShader(GLContext* aOrigin, GLuint aName);
|
||||
void DeletedBuffers(GLContext* aOrigin, GLsizei aCount, const GLuint* aNames);
|
||||
void DeletedQueries(GLContext* aOrigin, GLsizei aCount, const GLuint* aNames);
|
||||
void DeletedTextures(GLContext* aOrigin, GLsizei aCount, const GLuint* aNames);
|
||||
void DeletedFramebuffers(GLContext* aOrigin, GLsizei aCount, const GLuint* aNames);
|
||||
void DeletedRenderbuffers(GLContext* aOrigin, GLsizei aCount, const GLuint* aNames);
|
||||
|
||||
void SharedContextDestroyed(GLContext *aChild);
|
||||
void SharedContextDestroyed(GLContext* aChild);
|
||||
void ReportOutstandingNames();
|
||||
|
||||
struct NamedResource {
|
||||
@ -3591,11 +3591,11 @@ public:
|
||||
: origin(nullptr), name(0), originDeleted(false)
|
||||
{ }
|
||||
|
||||
NamedResource(GLContext *aOrigin, GLuint aName)
|
||||
NamedResource(GLContext* aOrigin, GLuint aName)
|
||||
: origin(aOrigin), name(aName), originDeleted(false)
|
||||
{ }
|
||||
|
||||
GLContext *origin;
|
||||
GLContext* origin;
|
||||
GLuint name;
|
||||
bool originDeleted;
|
||||
|
||||
@ -3634,7 +3634,7 @@ public:
|
||||
void Readback(SharedSurface* src, gfx::DataSourceSurface* dest);
|
||||
};
|
||||
|
||||
bool DoesStringMatch(const char* aString, const char *aWantedString);
|
||||
bool DoesStringMatch(const char* aString, const char* aWantedString);
|
||||
|
||||
void SplitByChar(const nsACString& str, const char delim,
|
||||
std::vector<nsCString>* const out);
|
||||
|
@ -24,7 +24,7 @@ class GLContextCGL : public GLContext
|
||||
{
|
||||
friend class GLContextProviderCGL;
|
||||
|
||||
NSOpenGLContext *mContext;
|
||||
NSOpenGLContext* mContext;
|
||||
|
||||
public:
|
||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(GLContextCGL, override)
|
||||
|
@ -20,7 +20,7 @@ class GLContextEGL : public GLContext
|
||||
static already_AddRefed<GLContextEGL>
|
||||
CreateGLContext(CreateContextFlags flags,
|
||||
const SurfaceCaps& caps,
|
||||
GLContextEGL *shareContext,
|
||||
GLContextEGL* shareContext,
|
||||
bool isOffscreen,
|
||||
EGLConfig config,
|
||||
EGLSurface surface,
|
||||
@ -91,7 +91,7 @@ public:
|
||||
|
||||
// hold a reference to the given surface
|
||||
// for the lifetime of this context.
|
||||
void HoldSurface(gfxASurface *aSurf);
|
||||
void HoldSurface(gfxASurface* aSurf);
|
||||
|
||||
EGLSurface GetEGLSurface() const {
|
||||
return mSurface;
|
||||
@ -101,8 +101,8 @@ public:
|
||||
return sEGLLibrary.Display();
|
||||
}
|
||||
|
||||
bool BindTex2DOffscreen(GLContext *aOffscreen);
|
||||
void UnbindTex2DOffscreen(GLContext *aOffscreen);
|
||||
bool BindTex2DOffscreen(GLContext* aOffscreen);
|
||||
void UnbindTex2DOffscreen(GLContext* aOffscreen);
|
||||
void BindOffscreenFramebuffer();
|
||||
|
||||
static already_AddRefed<GLContextEGL>
|
||||
|
@ -75,16 +75,16 @@ private:
|
||||
const SurfaceCaps& caps,
|
||||
GLContext* shareContext,
|
||||
bool isOffscreen,
|
||||
Display *aDisplay,
|
||||
Display* aDisplay,
|
||||
GLXDrawable aDrawable,
|
||||
GLXContext aContext,
|
||||
bool aDeleteDrawable,
|
||||
bool aDoubleBuffered,
|
||||
gfxXlibSurface *aPixmap,
|
||||
gfxXlibSurface* aPixmap,
|
||||
ContextProfile profile);
|
||||
|
||||
GLXContext mContext;
|
||||
Display *mDisplay;
|
||||
Display* mDisplay;
|
||||
GLXDrawable mDrawable;
|
||||
bool mDeleteDrawable;
|
||||
bool mDoubleBuffered;
|
||||
|
@ -65,7 +65,7 @@ public:
|
||||
private:
|
||||
bool mInitialized;
|
||||
bool mUseDoubleBufferedWindows;
|
||||
PRLibrary *mOGLLibrary;
|
||||
PRLibrary* mOGLLibrary;
|
||||
};
|
||||
|
||||
CGLLibrary sCGLLibrary;
|
||||
@ -235,7 +235,7 @@ CreateWithFormat(const NSOpenGLPixelFormatAttribute* attribs)
|
||||
}
|
||||
|
||||
already_AddRefed<GLContext>
|
||||
GLContextProviderCGL::CreateForWindow(nsIWidget *aWidget, bool aForceAccelerated)
|
||||
GLContextProviderCGL::CreateForWindow(nsIWidget* aWidget, bool aForceAccelerated)
|
||||
{
|
||||
if (!sCGLLibrary.EnsureInitialized()) {
|
||||
return nullptr;
|
||||
|
@ -448,7 +448,7 @@ GLContextEGL::SwapBuffers()
|
||||
// hold a reference to the given surface
|
||||
// for the lifetime of this context.
|
||||
void
|
||||
GLContextEGL::HoldSurface(gfxASurface *aSurf) {
|
||||
GLContextEGL::HoldSurface(gfxASurface* aSurf) {
|
||||
mThebesSurface = aSurf;
|
||||
}
|
||||
|
||||
@ -486,7 +486,7 @@ GLContextEGL::DestroySurface(EGLSurface aSurface)
|
||||
already_AddRefed<GLContextEGL>
|
||||
GLContextEGL::CreateGLContext(CreateContextFlags flags,
|
||||
const SurfaceCaps& caps,
|
||||
GLContextEGL *shareContext,
|
||||
GLContextEGL* shareContext,
|
||||
bool isOffscreen,
|
||||
EGLConfig config,
|
||||
EGLSurface surface,
|
||||
@ -760,7 +760,7 @@ GLContextProviderEGL::CreateWrappingExisting(void* aContext, void* aSurface)
|
||||
}
|
||||
|
||||
already_AddRefed<GLContext>
|
||||
GLContextProviderEGL::CreateForWindow(nsIWidget *aWidget, bool aForceAccelerated)
|
||||
GLContextProviderEGL::CreateForWindow(nsIWidget* aWidget, bool aForceAccelerated)
|
||||
{
|
||||
nsCString discardFailureId;
|
||||
if (!sEGLLibrary.EnsureInitialized(false, discardFailureId)) {
|
||||
|
@ -6,7 +6,7 @@
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
#include <gdk/gdk.h>
|
||||
#include <gdk/gdkx.h>
|
||||
#define GET_NATIVE_WINDOW(aWidget) GDK_WINDOW_XID((GdkWindow *) aWidget->GetNativeData(NS_NATIVE_WINDOW))
|
||||
#define GET_NATIVE_WINDOW(aWidget) GDK_WINDOW_XID((GdkWindow*) aWidget->GetNativeData(NS_NATIVE_WINDOW))
|
||||
#elif defined(MOZ_WIDGET_QT)
|
||||
#define GET_NATIVE_WINDOW(aWidget) (Window)(aWidget->GetNativeData(NS_NATIVE_SHAREABLE_WINDOW))
|
||||
#endif
|
||||
@ -180,7 +180,7 @@ GLXLibrary::EnsureInitialized()
|
||||
return false;
|
||||
}
|
||||
|
||||
Display *display = DefaultXDisplay();
|
||||
Display* display = DefaultXDisplay();
|
||||
int screen = DefaultScreen(display);
|
||||
|
||||
if (!xQueryVersion(display, &mGLXMajorVersion, &mGLXMinorVersion)) {
|
||||
@ -193,11 +193,11 @@ GLXLibrary::EnsureInitialized()
|
||||
// Not possible to query for extensions.
|
||||
return false;
|
||||
|
||||
const char *clientVendor = xGetClientString(display, LOCAL_GLX_VENDOR);
|
||||
const char *serverVendor = xQueryServerString(display, screen, LOCAL_GLX_VENDOR);
|
||||
const char *extensionsStr = xQueryExtensionsString(display, screen);
|
||||
const char* clientVendor = xGetClientString(display, LOCAL_GLX_VENDOR);
|
||||
const char* serverVendor = xQueryServerString(display, screen, LOCAL_GLX_VENDOR);
|
||||
const char* extensionsStr = xQueryExtensionsString(display, screen);
|
||||
|
||||
GLLibraryLoader::SymLoadStruct *sym13;
|
||||
GLLibraryLoader::SymLoadStruct* sym13;
|
||||
if (!GLXVersionCheck(1, 3)) {
|
||||
// Even if we don't have 1.3, we might have equivalent extensions
|
||||
// (as on the Intel X server).
|
||||
@ -213,7 +213,7 @@ GLXLibrary::EnsureInitialized()
|
||||
return false;
|
||||
}
|
||||
|
||||
GLLibraryLoader::SymLoadStruct *sym14;
|
||||
GLLibraryLoader::SymLoadStruct* sym14;
|
||||
if (!GLXVersionCheck(1, 4)) {
|
||||
// Even if we don't have 1.4, we might have equivalent extensions
|
||||
// (as on the Intel X server).
|
||||
@ -299,8 +299,8 @@ GLXLibrary::CreatePixmap(gfxASurface* aSurface)
|
||||
return None;
|
||||
}
|
||||
|
||||
gfxXlibSurface *xs = static_cast<gfxXlibSurface*>(aSurface);
|
||||
const XRenderPictFormat *format = xs->XRenderFormat();
|
||||
gfxXlibSurface* xs = static_cast<gfxXlibSurface*>(aSurface);
|
||||
const XRenderPictFormat* format = xs->XRenderFormat();
|
||||
if (!format || format->type != PictTypeDirect) {
|
||||
return None;
|
||||
}
|
||||
@ -318,7 +318,7 @@ GLXLibrary::CreatePixmap(gfxASurface* aSurface)
|
||||
None };
|
||||
|
||||
int numConfigs = 0;
|
||||
Display *display = xs->XDisplay();
|
||||
Display* display = xs->XDisplay();
|
||||
int xscreen = DefaultScreen(display);
|
||||
|
||||
ScopedXFree<GLXFBConfig> cfgs(xChooseFBConfig(display,
|
||||
@ -341,7 +341,7 @@ GLXLibrary::CreatePixmap(gfxASurface* aSurface)
|
||||
for (int i = 0; i < numConfigs; i++) {
|
||||
int id = None;
|
||||
sGLXLibrary.xGetFBConfigAttrib(display, cfgs[i], LOCAL_GLX_VISUAL_ID, &id);
|
||||
Visual *visual;
|
||||
Visual* visual;
|
||||
int depth;
|
||||
FindVisualAndDepth(display, id, &visual, &depth);
|
||||
if (!visual ||
|
||||
@ -484,9 +484,9 @@ GLXLibrary::UpdateTexImage(Display* aDisplay, GLXPixmap aPixmap)
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
static int (*sOldErrorHandler)(Display *, XErrorEvent *);
|
||||
static int (*sOldErrorHandler)(Display*, XErrorEvent*);
|
||||
ScopedXErrorHandler::ErrorEvent sErrorEvent;
|
||||
static int GLXErrorHandler(Display *display, XErrorEvent *ev)
|
||||
static int GLXErrorHandler(Display* display, XErrorEvent* ev)
|
||||
{
|
||||
if (!sErrorEvent.mError.error_code) {
|
||||
sErrorEvent.mError = *ev;
|
||||
@ -566,7 +566,7 @@ GLXLibrary::xGetCurrentContext()
|
||||
}
|
||||
|
||||
/* static */ void*
|
||||
GLXLibrary::xGetProcAddress(const char *procName)
|
||||
GLXLibrary::xGetProcAddress(const char* procName)
|
||||
{
|
||||
BEFORE_GLX_CALL;
|
||||
void* result = sGLXLibrary.xGetProcAddressInternal(procName);
|
||||
@ -577,8 +577,8 @@ GLXLibrary::xGetProcAddress(const char *procName)
|
||||
GLXFBConfig*
|
||||
GLXLibrary::xChooseFBConfig(Display* display,
|
||||
int screen,
|
||||
const int *attrib_list,
|
||||
int *nelements)
|
||||
const int* attrib_list,
|
||||
int* nelements)
|
||||
{
|
||||
BEFORE_GLX_CALL;
|
||||
GLXFBConfig* result = xChooseFBConfigInternal(display, screen, attrib_list, nelements);
|
||||
@ -589,7 +589,7 @@ GLXLibrary::xChooseFBConfig(Display* display,
|
||||
GLXFBConfig*
|
||||
GLXLibrary::xGetFBConfigs(Display* display,
|
||||
int screen,
|
||||
int *nelements)
|
||||
int* nelements)
|
||||
{
|
||||
BEFORE_GLX_CALL;
|
||||
GLXFBConfig* result = xGetFBConfigsInternal(display, screen, nelements);
|
||||
@ -613,10 +613,10 @@ GLXLibrary::xCreateNewContext(Display* display,
|
||||
}
|
||||
|
||||
int
|
||||
GLXLibrary::xGetFBConfigAttrib(Display *display,
|
||||
GLXLibrary::xGetFBConfigAttrib(Display* display,
|
||||
GLXFBConfig config,
|
||||
int attribute,
|
||||
int *value)
|
||||
int* value)
|
||||
{
|
||||
BEFORE_GLX_CALL;
|
||||
int result = xGetFBConfigAttribInternal(display, config,
|
||||
@ -626,48 +626,48 @@ GLXLibrary::xGetFBConfigAttrib(Display *display,
|
||||
}
|
||||
|
||||
void
|
||||
GLXLibrary::xSwapBuffers(Display *display, GLXDrawable drawable)
|
||||
GLXLibrary::xSwapBuffers(Display* display, GLXDrawable drawable)
|
||||
{
|
||||
BEFORE_GLX_CALL;
|
||||
xSwapBuffersInternal(display, drawable);
|
||||
AFTER_GLX_CALL;
|
||||
}
|
||||
|
||||
const char *
|
||||
GLXLibrary::xQueryExtensionsString(Display *display,
|
||||
const char*
|
||||
GLXLibrary::xQueryExtensionsString(Display* display,
|
||||
int screen)
|
||||
{
|
||||
BEFORE_GLX_CALL;
|
||||
const char *result = xQueryExtensionsStringInternal(display, screen);
|
||||
const char* result = xQueryExtensionsStringInternal(display, screen);
|
||||
AFTER_GLX_CALL;
|
||||
return result;
|
||||
}
|
||||
|
||||
const char *
|
||||
GLXLibrary::xGetClientString(Display *display,
|
||||
const char*
|
||||
GLXLibrary::xGetClientString(Display* display,
|
||||
int screen)
|
||||
{
|
||||
BEFORE_GLX_CALL;
|
||||
const char *result = xGetClientStringInternal(display, screen);
|
||||
const char* result = xGetClientStringInternal(display, screen);
|
||||
AFTER_GLX_CALL;
|
||||
return result;
|
||||
}
|
||||
|
||||
const char *
|
||||
GLXLibrary::xQueryServerString(Display *display,
|
||||
const char*
|
||||
GLXLibrary::xQueryServerString(Display* display,
|
||||
int screen, int name)
|
||||
{
|
||||
BEFORE_GLX_CALL;
|
||||
const char *result = xQueryServerStringInternal(display, screen, name);
|
||||
const char* result = xQueryServerStringInternal(display, screen, name);
|
||||
AFTER_GLX_CALL;
|
||||
return result;
|
||||
}
|
||||
|
||||
GLXPixmap
|
||||
GLXLibrary::xCreatePixmap(Display *display,
|
||||
GLXLibrary::xCreatePixmap(Display* display,
|
||||
GLXFBConfig config,
|
||||
Pixmap pixmap,
|
||||
const int *attrib_list)
|
||||
const int* attrib_list)
|
||||
{
|
||||
BEFORE_GLX_CALL;
|
||||
GLXPixmap result = xCreatePixmapInternal(display, config,
|
||||
@ -677,7 +677,7 @@ GLXLibrary::xCreatePixmap(Display *display,
|
||||
}
|
||||
|
||||
GLXPixmap
|
||||
GLXLibrary::xCreateGLXPixmapWithConfig(Display *display,
|
||||
GLXLibrary::xCreateGLXPixmapWithConfig(Display* display,
|
||||
GLXFBConfig config,
|
||||
Pixmap pixmap)
|
||||
{
|
||||
@ -688,7 +688,7 @@ GLXLibrary::xCreateGLXPixmapWithConfig(Display *display,
|
||||
}
|
||||
|
||||
void
|
||||
GLXLibrary::xDestroyPixmap(Display *display, GLXPixmap pixmap)
|
||||
GLXLibrary::xDestroyPixmap(Display* display, GLXPixmap pixmap)
|
||||
{
|
||||
BEFORE_GLX_CALL;
|
||||
xDestroyPixmapInternal(display, pixmap);
|
||||
@ -696,9 +696,9 @@ GLXLibrary::xDestroyPixmap(Display *display, GLXPixmap pixmap)
|
||||
}
|
||||
|
||||
Bool
|
||||
GLXLibrary::xQueryVersion(Display *display,
|
||||
int *major,
|
||||
int *minor)
|
||||
GLXLibrary::xQueryVersion(Display* display,
|
||||
int* major,
|
||||
int* minor)
|
||||
{
|
||||
BEFORE_GLX_CALL;
|
||||
Bool result = xQueryVersionInternal(display, major, minor);
|
||||
@ -707,10 +707,10 @@ GLXLibrary::xQueryVersion(Display *display,
|
||||
}
|
||||
|
||||
void
|
||||
GLXLibrary::xBindTexImage(Display *display,
|
||||
GLXLibrary::xBindTexImage(Display* display,
|
||||
GLXDrawable drawable,
|
||||
int buffer,
|
||||
const int *attrib_list)
|
||||
const int* attrib_list)
|
||||
{
|
||||
BEFORE_GLX_CALL;
|
||||
xBindTexImageInternal(display, drawable, buffer, attrib_list);
|
||||
@ -718,7 +718,7 @@ GLXLibrary::xBindTexImage(Display *display,
|
||||
}
|
||||
|
||||
void
|
||||
GLXLibrary::xReleaseTexImage(Display *display,
|
||||
GLXLibrary::xReleaseTexImage(Display* display,
|
||||
GLXDrawable drawable,
|
||||
int buffer)
|
||||
{
|
||||
@ -996,12 +996,12 @@ GLContextGLX::GLContextGLX(
|
||||
const SurfaceCaps& caps,
|
||||
GLContext* shareContext,
|
||||
bool isOffscreen,
|
||||
Display *aDisplay,
|
||||
Display* aDisplay,
|
||||
GLXDrawable aDrawable,
|
||||
GLXContext aContext,
|
||||
bool aDeleteDrawable,
|
||||
bool aDoubleBuffered,
|
||||
gfxXlibSurface *aPixmap,
|
||||
gfxXlibSurface* aPixmap,
|
||||
ContextProfile profile)
|
||||
: GLContext(flags, caps, shareContext, isOffscreen),
|
||||
mContext(aContext),
|
||||
@ -1019,14 +1019,14 @@ GLContextGLX::GLContextGLX(
|
||||
}
|
||||
|
||||
|
||||
static GLContextGLX *
|
||||
static GLContextGLX*
|
||||
GetGlobalContextGLX()
|
||||
{
|
||||
return static_cast<GLContextGLX*>(GLContextProviderGLX::GetGlobalContext());
|
||||
}
|
||||
|
||||
static bool
|
||||
AreCompatibleVisuals(Visual *one, Visual *two)
|
||||
AreCompatibleVisuals(Visual* one, Visual* two)
|
||||
{
|
||||
if (one->c_class != two->c_class) {
|
||||
return false;
|
||||
@ -1077,7 +1077,7 @@ GLContextProviderGLX::CreateWrappingExisting(void* aContext, void* aSurface)
|
||||
}
|
||||
|
||||
already_AddRefed<GLContext>
|
||||
GLContextProviderGLX::CreateForWindow(nsIWidget *aWidget, bool aForceAccelerated)
|
||||
GLContextProviderGLX::CreateForWindow(nsIWidget* aWidget, bool aForceAccelerated)
|
||||
{
|
||||
if (!sGLXLibrary.EnsureInitialized()) {
|
||||
return nullptr;
|
||||
@ -1090,7 +1090,7 @@ GLContextProviderGLX::CreateForWindow(nsIWidget *aWidget, bool aForceAccelerated
|
||||
// performance might be suboptimal. But using the existing visual
|
||||
// is a relatively safe intermediate step.
|
||||
|
||||
Display *display = (Display*)aWidget->GetNativeData(NS_NATIVE_DISPLAY);
|
||||
Display* display = (Display*)aWidget->GetNativeData(NS_NATIVE_DISPLAY);
|
||||
if (!display) {
|
||||
NS_ERROR("X Display required for GLX Context provider");
|
||||
return nullptr;
|
||||
@ -1224,7 +1224,7 @@ GLContextGLX::FindFBConfigForWindow(Display* display, int screen, Window window,
|
||||
}
|
||||
if (sGLXLibrary.IsATI()) {
|
||||
int depth;
|
||||
Visual *visual;
|
||||
Visual* visual;
|
||||
FindVisualAndDepth(display, visid, &visual, &depth);
|
||||
if (depth == windowAttrs.depth &&
|
||||
AreCompatibleVisuals(windowAttrs.visual, visual)) {
|
||||
|
@ -26,7 +26,7 @@ using namespace mozilla::gfx;
|
||||
WGLLibrary sWGLLib;
|
||||
|
||||
HWND
|
||||
WGLLibrary::CreateDummyWindow(HDC *aWindowDC)
|
||||
WGLLibrary::CreateDummyWindow(HDC* aWindowDC)
|
||||
{
|
||||
WNDCLASSW wc;
|
||||
if (!GetClassInfoW(GetModuleHandle(nullptr), L"GLContextWGLClass", &wc)) {
|
||||
@ -177,24 +177,24 @@ WGLLibrary::EnsureInitialized()
|
||||
}
|
||||
|
||||
GLLibraryLoader::SymLoadStruct extensionsSymbols[] = {
|
||||
{ (PRFuncPtr *) &fGetExtensionsString, { "wglGetExtensionsStringARB", nullptr} },
|
||||
{ (PRFuncPtr*) &fGetExtensionsString, { "wglGetExtensionsStringARB", nullptr} },
|
||||
{ nullptr, { nullptr } }
|
||||
};
|
||||
|
||||
GLLibraryLoader::SymLoadStruct robustnessSymbols[] = {
|
||||
{ (PRFuncPtr *) &fCreateContextAttribs, { "wglCreateContextAttribsARB", nullptr} },
|
||||
{ (PRFuncPtr*) &fCreateContextAttribs, { "wglCreateContextAttribsARB", nullptr} },
|
||||
{ nullptr, { nullptr } }
|
||||
};
|
||||
|
||||
GLLibraryLoader::SymLoadStruct dxInteropSymbols[] = {
|
||||
{ (PRFuncPtr *)&fDXSetResourceShareHandle,{ "wglDXSetResourceShareHandleNV", nullptr } },
|
||||
{ (PRFuncPtr *)&fDXOpenDevice, { "wglDXOpenDeviceNV", nullptr } },
|
||||
{ (PRFuncPtr *)&fDXCloseDevice, { "wglDXCloseDeviceNV", nullptr } },
|
||||
{ (PRFuncPtr *)&fDXRegisterObject, { "wglDXRegisterObjectNV", nullptr } },
|
||||
{ (PRFuncPtr *)&fDXUnregisterObject, { "wglDXUnregisterObjectNV", nullptr } },
|
||||
{ (PRFuncPtr *)&fDXObjectAccess, { "wglDXObjectAccessNV", nullptr } },
|
||||
{ (PRFuncPtr *)&fDXLockObjects, { "wglDXLockObjectsNV", nullptr } },
|
||||
{ (PRFuncPtr *)&fDXUnlockObjects, { "wglDXUnlockObjectsNV", nullptr } },
|
||||
{ (PRFuncPtr*)&fDXSetResourceShareHandle,{ "wglDXSetResourceShareHandleNV", nullptr } },
|
||||
{ (PRFuncPtr*)&fDXOpenDevice, { "wglDXOpenDeviceNV", nullptr } },
|
||||
{ (PRFuncPtr*)&fDXCloseDevice, { "wglDXCloseDeviceNV", nullptr } },
|
||||
{ (PRFuncPtr*)&fDXRegisterObject, { "wglDXRegisterObjectNV", nullptr } },
|
||||
{ (PRFuncPtr*)&fDXUnregisterObject, { "wglDXUnregisterObjectNV", nullptr } },
|
||||
{ (PRFuncPtr*)&fDXObjectAccess, { "wglDXObjectAccessNV", nullptr } },
|
||||
{ (PRFuncPtr*)&fDXLockObjects, { "wglDXLockObjectsNV", nullptr } },
|
||||
{ (PRFuncPtr*)&fDXUnlockObjects, { "wglDXUnlockObjectsNV", nullptr } },
|
||||
{ nullptr, { nullptr } }
|
||||
};
|
||||
|
||||
@ -392,7 +392,7 @@ GetMaxSize(HDC hDC, int format, IntSize& size)
|
||||
int query[] = {LOCAL_WGL_MAX_PBUFFER_WIDTH_ARB, LOCAL_WGL_MAX_PBUFFER_HEIGHT_ARB};
|
||||
int result[2];
|
||||
|
||||
// (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int* piAttributes, int *piValues)
|
||||
// (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int* piAttributes, int* piValues)
|
||||
if (!sWGLLib.fGetPixelFormatAttribiv(hDC, format, 0, 2, query, result))
|
||||
return false;
|
||||
|
||||
@ -430,7 +430,7 @@ GLContextProviderWGL::CreateWrappingExisting(void*, void*)
|
||||
}
|
||||
|
||||
already_AddRefed<GLContext>
|
||||
GLContextProviderWGL::CreateForWindow(nsIWidget *aWidget, bool aForceAccelerated)
|
||||
GLContextProviderWGL::CreateForWindow(nsIWidget* aWidget, bool aForceAccelerated)
|
||||
{
|
||||
if (!sWGLLib.EnsureInitialized()) {
|
||||
return nullptr;
|
||||
@ -447,7 +447,7 @@ GLContextProviderWGL::CreateForWindow(nsIWidget *aWidget, bool aForceAccelerated
|
||||
SetPixelFormat(dc, sWGLLib.GetWindowPixelFormat(), nullptr);
|
||||
HGLRC context;
|
||||
|
||||
GLContextWGL *shareContext = GetGlobalContextWGL();
|
||||
GLContextWGL* shareContext = GetGlobalContextWGL();
|
||||
|
||||
if (sWGLLib.HasRobustness()) {
|
||||
int attribs[] = {
|
||||
@ -493,7 +493,7 @@ GLContextProviderWGL::CreateForWindow(nsIWidget *aWidget, bool aForceAccelerated
|
||||
|
||||
static already_AddRefed<GLContextWGL>
|
||||
CreatePBufferOffscreenContext(CreateContextFlags flags, const IntSize& aSize,
|
||||
GLContextWGL *aShareContext)
|
||||
GLContextWGL* aShareContext)
|
||||
{
|
||||
WGLLibrary& wgl = sWGLLib;
|
||||
|
||||
@ -587,7 +587,7 @@ static already_AddRefed<GLContextWGL>
|
||||
CreateWindowOffscreenContext()
|
||||
{
|
||||
// CreateWindowOffscreenContext must return a global-shared context
|
||||
GLContextWGL *shareContext = GetGlobalContextWGL();
|
||||
GLContextWGL* shareContext = GetGlobalContextWGL();
|
||||
if (!shareContext) {
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -79,9 +79,9 @@ struct GLContextSymbols
|
||||
PFNGLCLEARSTENCILPROC fClearStencil;
|
||||
typedef void (GLAPIENTRY * PFNGLCOLORMASKPROC) (realGLboolean red, realGLboolean green, realGLboolean blue, realGLboolean alpha);
|
||||
PFNGLCOLORMASKPROC fColorMask;
|
||||
typedef void (GLAPIENTRY * PFNGLCOMPRESSEDTEXIMAGE2D) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *pixels);
|
||||
typedef void (GLAPIENTRY * PFNGLCOMPRESSEDTEXIMAGE2D) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* pixels);
|
||||
PFNGLCOMPRESSEDTEXIMAGE2D fCompressedTexImage2D;
|
||||
typedef void (GLAPIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE2D) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *pixels);
|
||||
typedef void (GLAPIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE2D) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* pixels);
|
||||
PFNGLCOMPRESSEDTEXSUBIMAGE2D fCompressedTexSubImage2D;
|
||||
typedef void (GLAPIENTRY * PFNGLCULLFACEPROC) (GLenum mode);
|
||||
PFNGLCULLFACEPROC fCullFace;
|
||||
@ -101,7 +101,7 @@ struct GLContextSymbols
|
||||
PFNGLDRAWBUFFERPROC fDrawBuffer;
|
||||
typedef void (GLAPIENTRY * PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum* bufs);
|
||||
PFNGLDRAWBUFFERSPROC fDrawBuffers;
|
||||
typedef void (GLAPIENTRY * PFNGLDRAWELEMENTSPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
|
||||
typedef void (GLAPIENTRY * PFNGLDRAWELEMENTSPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices);
|
||||
PFNGLDRAWELEMENTSPROC fDrawElements;
|
||||
typedef void (GLAPIENTRY * PFNGLENABLEPROC) (GLenum);
|
||||
PFNGLENABLEPROC fEnable;
|
||||
@ -123,11 +123,11 @@ struct GLContextSymbols
|
||||
PFNGLGETATTACHEDSHADERSPROC fGetAttachedShaders;
|
||||
typedef GLint (GLAPIENTRY * PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar* name);
|
||||
PFNGLGETATTRIBLOCATIONPROC fGetAttribLocation;
|
||||
typedef void (GLAPIENTRY * PFNGLGETINTEGERVPROC) (GLenum pname, GLint *params);
|
||||
typedef void (GLAPIENTRY * PFNGLGETINTEGERVPROC) (GLenum pname, GLint* params);
|
||||
PFNGLGETINTEGERVPROC fGetIntegerv;
|
||||
typedef void (GLAPIENTRY * PFNGLGETFLOATVPROC) (GLenum pname, GLfloat *params);
|
||||
typedef void (GLAPIENTRY * PFNGLGETFLOATVPROC) (GLenum pname, GLfloat* params);
|
||||
PFNGLGETFLOATVPROC fGetFloatv;
|
||||
typedef void (GLAPIENTRY * PFNGLGETBOOLEANBPROC) (GLenum pname, realGLboolean *params);
|
||||
typedef void (GLAPIENTRY * PFNGLGETBOOLEANBPROC) (GLenum pname, realGLboolean* params);
|
||||
PFNGLGETBOOLEANBPROC fGetBooleanv;
|
||||
typedef void (GLAPIENTRY * PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint* params);
|
||||
PFNGLGETBUFFERPARAMETERIVPROC fGetBufferParameteriv;
|
||||
@ -161,11 +161,11 @@ struct GLContextSymbols
|
||||
PFNGLGETSTRINGPROC fGetString;
|
||||
typedef void (GLAPIENTRY * PFNGLGETTEXIMAGEPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLvoid* image);
|
||||
PFNGLGETTEXIMAGEPROC fGetTexImage;
|
||||
typedef void (GLAPIENTRY * PFNGLGETTEXLEVELPARAMETERIVPROC) (GLenum target, GLint level, GLenum pname, GLint *params);
|
||||
typedef void (GLAPIENTRY * PFNGLGETTEXLEVELPARAMETERIVPROC) (GLenum target, GLint level, GLenum pname, GLint* params);
|
||||
PFNGLGETTEXLEVELPARAMETERIVPROC fGetTexLevelParameteriv;
|
||||
typedef void (GLAPIENTRY * PFNGLGETTEXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
|
||||
typedef void (GLAPIENTRY * PFNGLGETTEXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat* params);
|
||||
PFNGLGETTEXPARAMETERFVPROC fGetTexParameterfv;
|
||||
typedef void (GLAPIENTRY * PFNGLGETTEXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
|
||||
typedef void (GLAPIENTRY * PFNGLGETTEXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint* params);
|
||||
PFNGLGETTEXPARAMETERIVPROC fGetTexParameteriv;
|
||||
typedef void (GLAPIENTRY * PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat* params);
|
||||
PFNGLGETUNIFORMFVPROC fGetUniformfv;
|
||||
@ -207,7 +207,7 @@ struct GLContextSymbols
|
||||
PFNGLPOLYGONOFFSETPROC fPolygonOffset;
|
||||
typedef void (GLAPIENTRY * PFNGLREADBUFFERPROC) (GLenum);
|
||||
PFNGLREADBUFFERPROC fReadBuffer;
|
||||
typedef void (GLAPIENTRY * PFNGLREADPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
|
||||
typedef void (GLAPIENTRY * PFNGLREADPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);
|
||||
PFNGLREADPIXELSPROC fReadPixels;
|
||||
typedef void (GLAPIENTRY * PFNGLSAMPLECOVERAGEPROC) (GLclampf value, realGLboolean invert);
|
||||
PFNGLSAMPLECOVERAGEPROC fSampleCoverage;
|
||||
@ -223,11 +223,11 @@ struct GLContextSymbols
|
||||
PFNGLSTENCILOPPROC fStencilOp;
|
||||
typedef void (GLAPIENTRY * PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
|
||||
PFNGLSTENCILOPSEPARATEPROC fStencilOpSeparate;
|
||||
typedef void (GLAPIENTRY * PFNGLTEXIMAGE2DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
|
||||
typedef void (GLAPIENTRY * PFNGLTEXIMAGE2DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
|
||||
PFNGLTEXIMAGE2DPROC fTexImage2D;
|
||||
typedef void (GLAPIENTRY * PFNGLTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels);
|
||||
PFNGLTEXSUBIMAGE2DPROC fTexSubImage2D;
|
||||
typedef void (GLAPIENTRY * PFNGLTEXTURERANGEAPPLEPROC) (GLenum target, GLsizei length, GLvoid *pointer);
|
||||
typedef void (GLAPIENTRY * PFNGLTEXTURERANGEAPPLEPROC) (GLenum target, GLsizei length, GLvoid* pointer);
|
||||
PFNGLTEXTURERANGEAPPLEPROC fTextureRangeAPPLE;
|
||||
typedef void (GLAPIENTRY * PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0);
|
||||
PFNGLUNIFORM1FPROC fUniform1f;
|
||||
@ -417,7 +417,7 @@ struct GLContextSymbols
|
||||
PFNGLGENBUFFERSPROC fGenBuffers;
|
||||
typedef void (GLAPIENTRY * PFNGLGENQUERIESPROC) (GLsizei n, GLuint* queries);
|
||||
PFNGLGENQUERIESPROC fGenQueries;
|
||||
typedef void (GLAPIENTRY * PFNGLGENTEXTURESPROC) (GLsizei n, GLuint *textures);
|
||||
typedef void (GLAPIENTRY * PFNGLGENTEXTURESPROC) (GLsizei n, GLuint* textures);
|
||||
PFNGLGENTEXTURESPROC fGenTextures;
|
||||
typedef void (GLAPIENTRY * PFNGLGENFRAMEBUFFERS) (GLsizei n, GLuint* ids);
|
||||
PFNGLGENFRAMEBUFFERS fGenFramebuffers;
|
||||
@ -468,9 +468,9 @@ struct GLContextSymbols
|
||||
PFNGLCLIENTWAITSYNC fClientWaitSync;
|
||||
typedef void (GLAPIENTRY * PFNGLWAITSYNC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
|
||||
PFNGLWAITSYNC fWaitSync;
|
||||
typedef void (GLAPIENTRY * PFNGLGETINTEGER64V) (GLenum pname, GLint64 *params);
|
||||
typedef void (GLAPIENTRY * PFNGLGETINTEGER64V) (GLenum pname, GLint64* params);
|
||||
PFNGLGETINTEGER64V fGetInteger64v;
|
||||
typedef void (GLAPIENTRY * PFNGLGETSYNCIV) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
|
||||
typedef void (GLAPIENTRY * PFNGLGETSYNCIV) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values);
|
||||
PFNGLGETSYNCIV fGetSynciv;
|
||||
|
||||
// OES_egl_image
|
||||
@ -580,9 +580,9 @@ struct GLContextSymbols
|
||||
PFNGLFLUSHMAPPEDBUFFERRANGEPROC fFlushMappedBufferRange;
|
||||
|
||||
// sampler_object
|
||||
typedef void (GLAPIENTRY * PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers);
|
||||
typedef void (GLAPIENTRY * PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint* samplers);
|
||||
PFNGLGENSAMPLERSPROC fGenSamplers;
|
||||
typedef void (GLAPIENTRY * PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers);
|
||||
typedef void (GLAPIENTRY * PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint* samplers);
|
||||
PFNGLDELETESAMPLERSPROC fDeleteSamplers;
|
||||
typedef realGLboolean (GLAPIENTRY * PFNGLISSAMPLERPROC) (GLuint sampler);
|
||||
PFNGLISSAMPLERPROC fIsSampler;
|
||||
@ -590,15 +590,15 @@ struct GLContextSymbols
|
||||
PFNGLBINDSAMPLERPROC fBindSampler;
|
||||
typedef void (GLAPIENTRY * PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param);
|
||||
PFNGLSAMPLERPARAMETERIPROC fSamplerParameteri;
|
||||
typedef void (GLAPIENTRY * PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param);
|
||||
typedef void (GLAPIENTRY * PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint* param);
|
||||
PFNGLSAMPLERPARAMETERIVPROC fSamplerParameteriv;
|
||||
typedef void (GLAPIENTRY * PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param);
|
||||
PFNGLSAMPLERPARAMETERFPROC fSamplerParameterf;
|
||||
typedef void (GLAPIENTRY * PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat *param);
|
||||
typedef void (GLAPIENTRY * PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat* param);
|
||||
PFNGLSAMPLERPARAMETERFVPROC fSamplerParameterfv;
|
||||
typedef void (GLAPIENTRY * PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params);
|
||||
typedef void (GLAPIENTRY * PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint* params);
|
||||
PFNGLGETSAMPLERPARAMETERIVPROC fGetSamplerParameteriv;
|
||||
typedef void (GLAPIENTRY * PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params);
|
||||
typedef void (GLAPIENTRY * PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat* params);
|
||||
PFNGLGETSAMPLERPARAMETERFVPROC fGetSamplerParameterfv;
|
||||
|
||||
// texture_storage
|
||||
|
@ -35,7 +35,7 @@ MOZ_THREAD_LOCAL(EGLContext) GLLibraryEGL::sCurrentContext;
|
||||
#endif
|
||||
|
||||
// should match the order of EGLExtensions, and be null-terminated.
|
||||
static const char *sEGLExtensionNames[] = {
|
||||
static const char* sEGLExtensionNames[] = {
|
||||
"EGL_KHR_image_base",
|
||||
"EGL_KHR_image_pixmap",
|
||||
"EGL_KHR_gl_texture_2D_image",
|
||||
@ -672,7 +672,7 @@ GLLibraryEGL::DumpEGLConfigs()
|
||||
{
|
||||
int nc = 0;
|
||||
fGetConfigs(mEGLDisplay, nullptr, 0, &nc);
|
||||
EGLConfig *ec = new EGLConfig[nc];
|
||||
EGLConfig* ec = new EGLConfig[nc];
|
||||
fGetConfigs(mEGLDisplay, ec, nc, &nc);
|
||||
|
||||
for (int i = 0; i < nc; ++i) {
|
||||
|
@ -251,7 +251,7 @@ public:
|
||||
return b;
|
||||
}
|
||||
|
||||
EGLContext fCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list)
|
||||
EGLContext fCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint* attrib_list)
|
||||
{
|
||||
BEFORE_GL_CALL;
|
||||
EGLContext ctx = mSymbols.fCreateContext(dpy, config, share_context, attrib_list);
|
||||
@ -267,7 +267,7 @@ public:
|
||||
return b;
|
||||
}
|
||||
|
||||
EGLSurface fCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list)
|
||||
EGLSurface fCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint* attrib_list)
|
||||
{
|
||||
BEFORE_GL_CALL;
|
||||
EGLSurface surf = mSymbols.fCreateWindowSurface(dpy, config, win, attrib_list);
|
||||
@ -275,7 +275,7 @@ public:
|
||||
return surf;
|
||||
}
|
||||
|
||||
EGLSurface fCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list)
|
||||
EGLSurface fCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, const EGLint* attrib_list)
|
||||
{
|
||||
BEFORE_GL_CALL;
|
||||
EGLSurface surf = mSymbols.fCreatePbufferSurface(dpy, config, attrib_list);
|
||||
@ -283,7 +283,7 @@ public:
|
||||
return surf;
|
||||
}
|
||||
|
||||
EGLSurface fCreatePixmapSurface(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list)
|
||||
EGLSurface fCreatePixmapSurface(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint* attrib_list)
|
||||
{
|
||||
BEFORE_GL_CALL;
|
||||
EGLSurface surf = mSymbols.fCreatePixmapSurface(dpy, config, pixmap, attrib_list);
|
||||
@ -307,7 +307,7 @@ public:
|
||||
return b;
|
||||
}
|
||||
|
||||
EGLBoolean fChooseConfig(EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config)
|
||||
EGLBoolean fChooseConfig(EGLDisplay dpy, const EGLint* attrib_list, EGLConfig* configs, EGLint config_size, EGLint* num_config)
|
||||
{
|
||||
BEFORE_GL_CALL;
|
||||
EGLBoolean b = mSymbols.fChooseConfig(dpy, attrib_list, configs, config_size, num_config);
|
||||
@ -323,7 +323,7 @@ public:
|
||||
return i;
|
||||
}
|
||||
|
||||
EGLBoolean fGetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value)
|
||||
EGLBoolean fGetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint* value)
|
||||
{
|
||||
BEFORE_GL_CALL;
|
||||
EGLBoolean b = mSymbols.fGetConfigAttrib(dpy, config, attribute, value);
|
||||
@ -331,7 +331,7 @@ public:
|
||||
return b;
|
||||
}
|
||||
|
||||
EGLBoolean fGetConfigs(EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config)
|
||||
EGLBoolean fGetConfigs(EGLDisplay dpy, EGLConfig* configs, EGLint config_size, EGLint* num_config)
|
||||
{
|
||||
BEFORE_GL_CALL;
|
||||
EGLBoolean b = mSymbols.fGetConfigs(dpy, configs, config_size, num_config);
|
||||
@ -347,7 +347,7 @@ public:
|
||||
return b;
|
||||
}
|
||||
|
||||
EGLCastToRelevantPtr fGetProcAddress(const char *procname)
|
||||
EGLCastToRelevantPtr fGetProcAddress(const char* procname)
|
||||
{
|
||||
BEFORE_GL_CALL;
|
||||
EGLCastToRelevantPtr p = mSymbols.fGetProcAddress(procname);
|
||||
@ -384,7 +384,7 @@ public:
|
||||
return b;
|
||||
}
|
||||
|
||||
EGLBoolean fQueryContext(EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value)
|
||||
EGLBoolean fQueryContext(EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint* value)
|
||||
{
|
||||
BEFORE_GL_CALL;
|
||||
EGLBoolean b = mSymbols.fQueryContext(dpy, ctx, attribute, value);
|
||||
@ -408,7 +408,7 @@ public:
|
||||
return b;
|
||||
}
|
||||
|
||||
EGLImage fCreateImage(EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list)
|
||||
EGLImage fCreateImage(EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint* attrib_list)
|
||||
{
|
||||
BEFORE_GL_CALL;
|
||||
EGLImage i = mSymbols.fCreateImage(dpy, ctx, target, buffer, attrib_list);
|
||||
@ -425,7 +425,7 @@ public:
|
||||
}
|
||||
|
||||
// New extension which allow us to lock texture and get raw image pointer
|
||||
EGLBoolean fLockSurface(EGLDisplay dpy, EGLSurface surface, const EGLint *attrib_list)
|
||||
EGLBoolean fLockSurface(EGLDisplay dpy, EGLSurface surface, const EGLint* attrib_list)
|
||||
{
|
||||
BEFORE_GL_CALL;
|
||||
EGLBoolean b = mSymbols.fLockSurface(dpy, surface, attrib_list);
|
||||
@ -441,7 +441,7 @@ public:
|
||||
return b;
|
||||
}
|
||||
|
||||
EGLBoolean fQuerySurface(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value)
|
||||
EGLBoolean fQuerySurface(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint* value)
|
||||
{
|
||||
BEFORE_GL_CALL;
|
||||
EGLBoolean b = mSymbols.fQuerySurface(dpy, surface, attribute, value);
|
||||
@ -449,7 +449,7 @@ public:
|
||||
return b;
|
||||
}
|
||||
|
||||
EGLBoolean fQuerySurfacePointerANGLE(EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value)
|
||||
EGLBoolean fQuerySurfacePointerANGLE(EGLDisplay dpy, EGLSurface surface, EGLint attribute, void** value)
|
||||
{
|
||||
BEFORE_GL_CALL;
|
||||
EGLBoolean b = mSymbols.fQuerySurfacePointerANGLE(dpy, surface, attribute, value);
|
||||
@ -457,7 +457,7 @@ public:
|
||||
return b;
|
||||
}
|
||||
|
||||
EGLSync fCreateSync(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list)
|
||||
EGLSync fCreateSync(EGLDisplay dpy, EGLenum type, const EGLint* attrib_list)
|
||||
{
|
||||
BEFORE_GL_CALL;
|
||||
EGLSync ret = mSymbols.fCreateSync(dpy, type, attrib_list);
|
||||
@ -481,7 +481,7 @@ public:
|
||||
return ret;
|
||||
}
|
||||
|
||||
EGLBoolean fGetSyncAttrib(EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLint *value)
|
||||
EGLBoolean fGetSyncAttrib(EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLint* value)
|
||||
{
|
||||
BEFORE_GL_CALL;
|
||||
EGLBoolean b = mSymbols.fGetSyncAttrib(dpy, sync, attribute, value);
|
||||
@ -541,9 +541,9 @@ public:
|
||||
void DumpEGLConfigs();
|
||||
|
||||
struct {
|
||||
typedef EGLDisplay (GLAPIENTRY * pfnGetDisplay)(void *display_id);
|
||||
typedef EGLDisplay (GLAPIENTRY * pfnGetDisplay)(void* display_id);
|
||||
pfnGetDisplay fGetDisplay;
|
||||
typedef EGLDisplay(GLAPIENTRY * pfnGetPlatformDisplayEXT)(EGLenum platform, void *native_display, const EGLint *attrib_list);
|
||||
typedef EGLDisplay(GLAPIENTRY * pfnGetPlatformDisplayEXT)(EGLenum platform, void* native_display, const EGLint* attrib_list);
|
||||
pfnGetPlatformDisplayEXT fGetPlatformDisplayEXT;
|
||||
typedef EGLBoolean (GLAPIENTRY * pfnTerminate)(EGLDisplay dpy);
|
||||
pfnTerminate fTerminate;
|
||||
@ -555,31 +555,31 @@ public:
|
||||
pfnMakeCurrent fMakeCurrent;
|
||||
typedef EGLBoolean (GLAPIENTRY * pfnDestroyContext)(EGLDisplay dpy, EGLContext ctx);
|
||||
pfnDestroyContext fDestroyContext;
|
||||
typedef EGLContext (GLAPIENTRY * pfnCreateContext)(EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list);
|
||||
typedef EGLContext (GLAPIENTRY * pfnCreateContext)(EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint* attrib_list);
|
||||
pfnCreateContext fCreateContext;
|
||||
typedef EGLBoolean (GLAPIENTRY * pfnDestroySurface)(EGLDisplay dpy, EGLSurface surface);
|
||||
pfnDestroySurface fDestroySurface;
|
||||
typedef EGLSurface (GLAPIENTRY * pfnCreateWindowSurface)(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list);
|
||||
typedef EGLSurface (GLAPIENTRY * pfnCreateWindowSurface)(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint* attrib_list);
|
||||
pfnCreateWindowSurface fCreateWindowSurface;
|
||||
typedef EGLSurface (GLAPIENTRY * pfnCreatePbufferSurface)(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list);
|
||||
typedef EGLSurface (GLAPIENTRY * pfnCreatePbufferSurface)(EGLDisplay dpy, EGLConfig config, const EGLint* attrib_list);
|
||||
pfnCreatePbufferSurface fCreatePbufferSurface;
|
||||
typedef EGLSurface (GLAPIENTRY * pfnCreatePixmapSurface)(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list);
|
||||
typedef EGLSurface (GLAPIENTRY * pfnCreatePixmapSurface)(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint* attrib_list);
|
||||
pfnCreatePixmapSurface fCreatePixmapSurface;
|
||||
typedef EGLBoolean (GLAPIENTRY * pfnBindAPI)(EGLenum api);
|
||||
pfnBindAPI fBindAPI;
|
||||
typedef EGLBoolean (GLAPIENTRY * pfnInitialize)(EGLDisplay dpy, EGLint *major, EGLint *minor);
|
||||
typedef EGLBoolean (GLAPIENTRY * pfnInitialize)(EGLDisplay dpy, EGLint* major, EGLint* minor);
|
||||
pfnInitialize fInitialize;
|
||||
typedef EGLBoolean (GLAPIENTRY * pfnChooseConfig)(EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config);
|
||||
typedef EGLBoolean (GLAPIENTRY * pfnChooseConfig)(EGLDisplay dpy, const EGLint* attrib_list, EGLConfig* configs, EGLint config_size, EGLint* num_config);
|
||||
pfnChooseConfig fChooseConfig;
|
||||
typedef EGLint (GLAPIENTRY * pfnGetError)(void);
|
||||
pfnGetError fGetError;
|
||||
typedef EGLBoolean (GLAPIENTRY * pfnGetConfigAttrib)(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value);
|
||||
typedef EGLBoolean (GLAPIENTRY * pfnGetConfigAttrib)(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint* value);
|
||||
pfnGetConfigAttrib fGetConfigAttrib;
|
||||
typedef EGLBoolean (GLAPIENTRY * pfnGetConfigs)(EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config);
|
||||
typedef EGLBoolean (GLAPIENTRY * pfnGetConfigs)(EGLDisplay dpy, EGLConfig* configs, EGLint config_size, EGLint* num_config);
|
||||
pfnGetConfigs fGetConfigs;
|
||||
typedef EGLBoolean (GLAPIENTRY * pfnWaitNative)(EGLint engine);
|
||||
pfnWaitNative fWaitNative;
|
||||
typedef EGLCastToRelevantPtr (GLAPIENTRY * pfnGetProcAddress)(const char *procname);
|
||||
typedef EGLCastToRelevantPtr (GLAPIENTRY * pfnGetProcAddress)(const char* procname);
|
||||
pfnGetProcAddress fGetProcAddress;
|
||||
typedef EGLBoolean (GLAPIENTRY * pfnSwapBuffers)(EGLDisplay dpy, EGLSurface surface);
|
||||
pfnSwapBuffers fSwapBuffers;
|
||||
@ -590,35 +590,35 @@ public:
|
||||
pfnQueryString fQueryString;
|
||||
pfnQueryString fQueryStringImplementationANDROID;
|
||||
typedef EGLBoolean (GLAPIENTRY * pfnQueryContext)(EGLDisplay dpy, EGLContext ctx,
|
||||
EGLint attribute, EGLint *value);
|
||||
EGLint attribute, EGLint* value);
|
||||
pfnQueryContext fQueryContext;
|
||||
typedef EGLBoolean (GLAPIENTRY * pfnBindTexImage)(EGLDisplay, EGLSurface surface, EGLint buffer);
|
||||
pfnBindTexImage fBindTexImage;
|
||||
typedef EGLBoolean (GLAPIENTRY * pfnReleaseTexImage)(EGLDisplay, EGLSurface surface, EGLint buffer);
|
||||
pfnReleaseTexImage fReleaseTexImage;
|
||||
typedef EGLImage (GLAPIENTRY * pfnCreateImage)(EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
|
||||
typedef EGLImage (GLAPIENTRY * pfnCreateImage)(EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint* attrib_list);
|
||||
pfnCreateImage fCreateImage;
|
||||
typedef EGLBoolean (GLAPIENTRY * pfnDestroyImage)(EGLDisplay dpy, EGLImage image);
|
||||
pfnDestroyImage fDestroyImage;
|
||||
|
||||
// New extension which allow us to lock texture and get raw image pointer
|
||||
typedef EGLBoolean (GLAPIENTRY * pfnLockSurface)(EGLDisplay dpy, EGLSurface surface, const EGLint *attrib_list);
|
||||
typedef EGLBoolean (GLAPIENTRY * pfnLockSurface)(EGLDisplay dpy, EGLSurface surface, const EGLint* attrib_list);
|
||||
pfnLockSurface fLockSurface;
|
||||
typedef EGLBoolean (GLAPIENTRY * pfnUnlockSurface)(EGLDisplay dpy, EGLSurface surface);
|
||||
pfnUnlockSurface fUnlockSurface;
|
||||
typedef EGLBoolean (GLAPIENTRY * pfnQuerySurface)(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value);
|
||||
typedef EGLBoolean (GLAPIENTRY * pfnQuerySurface)(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint* value);
|
||||
pfnQuerySurface fQuerySurface;
|
||||
|
||||
typedef EGLBoolean (GLAPIENTRY * pfnQuerySurfacePointerANGLE)(EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value);
|
||||
typedef EGLBoolean (GLAPIENTRY * pfnQuerySurfacePointerANGLE)(EGLDisplay dpy, EGLSurface surface, EGLint attribute, void** value);
|
||||
pfnQuerySurfacePointerANGLE fQuerySurfacePointerANGLE;
|
||||
|
||||
typedef EGLSync (GLAPIENTRY * pfnCreateSync)(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
|
||||
typedef EGLSync (GLAPIENTRY * pfnCreateSync)(EGLDisplay dpy, EGLenum type, const EGLint* attrib_list);
|
||||
pfnCreateSync fCreateSync;
|
||||
typedef EGLBoolean (GLAPIENTRY * pfnDestroySync)(EGLDisplay dpy, EGLSync sync);
|
||||
pfnDestroySync fDestroySync;
|
||||
typedef EGLint (GLAPIENTRY * pfnClientWaitSync)(EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout);
|
||||
pfnClientWaitSync fClientWaitSync;
|
||||
typedef EGLBoolean (GLAPIENTRY * pfnGetSyncAttrib)(EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLint *value);
|
||||
typedef EGLBoolean (GLAPIENTRY * pfnGetSyncAttrib)(EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLint* value);
|
||||
pfnGetSyncAttrib fGetSyncAttrib;
|
||||
typedef EGLint (GLAPIENTRY * pfnDupNativeFenceFDANDROID)(EGLDisplay dpy, EGLSync sync);
|
||||
pfnDupNativeFenceFDANDROID fDupNativeFenceFDANDROID;
|
||||
|
@ -10,7 +10,7 @@ namespace mozilla {
|
||||
namespace gl {
|
||||
|
||||
bool
|
||||
GLLibraryLoader::OpenLibrary(const char *library)
|
||||
GLLibraryLoader::OpenLibrary(const char* library)
|
||||
{
|
||||
PRLibSpec lspec;
|
||||
lspec.type = PR_LibSpec_Pathname;
|
||||
@ -24,9 +24,9 @@ GLLibraryLoader::OpenLibrary(const char *library)
|
||||
}
|
||||
|
||||
bool
|
||||
GLLibraryLoader::LoadSymbols(const SymLoadStruct *firstStruct,
|
||||
GLLibraryLoader::LoadSymbols(const SymLoadStruct* firstStruct,
|
||||
bool tryplatform,
|
||||
const char *prefix,
|
||||
const char* prefix,
|
||||
bool warnOnFailure)
|
||||
{
|
||||
return LoadSymbols(mLibrary,
|
||||
@ -37,8 +37,8 @@ GLLibraryLoader::LoadSymbols(const SymLoadStruct *firstStruct,
|
||||
}
|
||||
|
||||
PRFuncPtr
|
||||
GLLibraryLoader::LookupSymbol(PRLibrary *lib,
|
||||
const char *sym,
|
||||
GLLibraryLoader::LookupSymbol(PRLibrary* lib,
|
||||
const char* sym,
|
||||
PlatformLookupFunction lookupFunction)
|
||||
{
|
||||
PRFuncPtr res = 0;
|
||||
@ -55,7 +55,7 @@ GLLibraryLoader::LookupSymbol(PRLibrary *lib,
|
||||
|
||||
// finally just try finding it in the process
|
||||
if (!res) {
|
||||
PRLibrary *leakedLibRef;
|
||||
PRLibrary* leakedLibRef;
|
||||
res = PR_FindFunctionSymbolAndLibrary(sym, &leakedLibRef);
|
||||
}
|
||||
|
||||
@ -63,16 +63,16 @@ GLLibraryLoader::LookupSymbol(PRLibrary *lib,
|
||||
}
|
||||
|
||||
bool
|
||||
GLLibraryLoader::LoadSymbols(PRLibrary *lib,
|
||||
const SymLoadStruct *firstStruct,
|
||||
GLLibraryLoader::LoadSymbols(PRLibrary* lib,
|
||||
const SymLoadStruct* firstStruct,
|
||||
PlatformLookupFunction lookupFunction,
|
||||
const char *prefix,
|
||||
const char* prefix,
|
||||
bool warnOnFailure)
|
||||
{
|
||||
char sbuf[MAX_SYMBOL_LENGTH * 2];
|
||||
int failCount = 0;
|
||||
|
||||
const SymLoadStruct *ss = firstStruct;
|
||||
const SymLoadStruct* ss = firstStruct;
|
||||
while (ss->symPointer) {
|
||||
*ss->symPointer = 0;
|
||||
|
||||
@ -80,7 +80,7 @@ GLLibraryLoader::LoadSymbols(PRLibrary *lib,
|
||||
if (ss->symNames[i] == nullptr)
|
||||
break;
|
||||
|
||||
const char *s = ss->symNames[i];
|
||||
const char* s = ss->symNames[i];
|
||||
if (prefix && *prefix != 0) {
|
||||
strcpy(sbuf, prefix);
|
||||
strcat(sbuf, ss->symNames[i]);
|
||||
|
@ -21,9 +21,9 @@ namespace gl {
|
||||
class GLLibraryLoader
|
||||
{
|
||||
public:
|
||||
bool OpenLibrary(const char *library);
|
||||
bool OpenLibrary(const char* library);
|
||||
|
||||
typedef PRFuncPtr (GLAPIENTRY * PlatformLookupFunction) (const char *);
|
||||
typedef PRFuncPtr (GLAPIENTRY * PlatformLookupFunction) (const char*);
|
||||
|
||||
enum {
|
||||
MAX_SYMBOL_NAMES = 6,
|
||||
@ -31,25 +31,25 @@ public:
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
PRFuncPtr *symPointer;
|
||||
const char *symNames[MAX_SYMBOL_NAMES];
|
||||
PRFuncPtr* symPointer;
|
||||
const char* symNames[MAX_SYMBOL_NAMES];
|
||||
} SymLoadStruct;
|
||||
|
||||
bool LoadSymbols(const SymLoadStruct *firstStruct,
|
||||
bool LoadSymbols(const SymLoadStruct* firstStruct,
|
||||
bool tryplatform = false,
|
||||
const char *prefix = nullptr,
|
||||
const char* prefix = nullptr,
|
||||
bool warnOnFailure = true);
|
||||
|
||||
/*
|
||||
* Static version of the functions in this class
|
||||
*/
|
||||
static PRFuncPtr LookupSymbol(PRLibrary *lib,
|
||||
const char *symname,
|
||||
static PRFuncPtr LookupSymbol(PRLibrary* lib,
|
||||
const char* symname,
|
||||
PlatformLookupFunction lookupFunction = nullptr);
|
||||
static bool LoadSymbols(PRLibrary *lib,
|
||||
const SymLoadStruct *firstStruct,
|
||||
static bool LoadSymbols(PRLibrary* lib,
|
||||
const SymLoadStruct* firstStruct,
|
||||
PlatformLookupFunction lookupFunction = nullptr,
|
||||
const char *prefix = nullptr,
|
||||
const char* prefix = nullptr,
|
||||
bool warnOnFailure = true);
|
||||
protected:
|
||||
GLLibraryLoader() {
|
||||
@ -57,7 +57,7 @@ protected:
|
||||
mLookupFunc = nullptr;
|
||||
}
|
||||
|
||||
PRLibrary *mLibrary;
|
||||
PRLibrary* mLibrary;
|
||||
PlatformLookupFunction mLookupFunc;
|
||||
};
|
||||
|
||||
|
@ -246,7 +246,7 @@ public:
|
||||
* otherwise.
|
||||
*/
|
||||
bool ReadPixels(GLint x, GLint y, GLsizei width, GLsizei height,
|
||||
GLenum format, GLenum type, GLvoid *pixels);
|
||||
GLenum format, GLenum type, GLvoid* pixels);
|
||||
|
||||
// Morph changes the factory used to create surfaces.
|
||||
void Morph(UniquePtr<SurfaceFactory> newFactory);
|
||||
|
@ -84,7 +84,7 @@ TextureImage::Create(GLContext* gl,
|
||||
}
|
||||
|
||||
bool
|
||||
TextureImage::UpdateFromDataSource(gfx::DataSourceSurface *aSurface,
|
||||
TextureImage::UpdateFromDataSource(gfx::DataSourceSurface* aSurface,
|
||||
const nsIntRegion* aDestRegion,
|
||||
const gfx::IntPoint* aSrcPoint)
|
||||
{
|
||||
@ -117,7 +117,7 @@ TextureImage::UpdateUploadSize(size_t amount)
|
||||
|
||||
BasicTextureImage::~BasicTextureImage()
|
||||
{
|
||||
GLContext *ctx = mGLContext;
|
||||
GLContext* ctx = mGLContext;
|
||||
if (ctx->IsDestroyed() || !ctx->IsOwningThreadCurrent()) {
|
||||
ctx = ctx->GetSharedContext();
|
||||
}
|
||||
|
@ -168,7 +168,7 @@ public:
|
||||
* aFrom - offset in the source to update from
|
||||
*/
|
||||
virtual bool DirectUpdate(gfx::DataSourceSurface* aSurf, const nsIntRegion& aRegion, const gfx::IntPoint& aFrom = gfx::IntPoint(0,0)) = 0;
|
||||
bool UpdateFromDataSource(gfx::DataSourceSurface *aSurf,
|
||||
bool UpdateFromDataSource(gfx::DataSourceSurface* aSurf,
|
||||
const nsIntRegion* aDstRegion = nullptr,
|
||||
const gfx::IntPoint* aSrcOffset = nullptr);
|
||||
|
||||
|
@ -74,14 +74,14 @@ typedef void* EGLImage;
|
||||
typedef int EGLint;
|
||||
typedef unsigned int EGLBoolean;
|
||||
typedef unsigned int EGLenum;
|
||||
typedef void *EGLConfig;
|
||||
typedef void *EGLContext;
|
||||
typedef void *EGLDisplay;
|
||||
typedef void *EGLSurface;
|
||||
typedef void *EGLClientBuffer;
|
||||
typedef void *EGLCastToRelevantPtr;
|
||||
typedef void *EGLImage;
|
||||
typedef void *EGLSync;
|
||||
typedef void* EGLConfig;
|
||||
typedef void* EGLContext;
|
||||
typedef void* EGLDisplay;
|
||||
typedef void* EGLSurface;
|
||||
typedef void* EGLClientBuffer;
|
||||
typedef void* EGLCastToRelevantPtr;
|
||||
typedef void* EGLImage;
|
||||
typedef void* EGLSync;
|
||||
typedef uint64_t EGLTime;
|
||||
|
||||
#define EGL_NO_CONTEXT ((EGLContext)0)
|
||||
|
@ -81,8 +81,8 @@ CopyAndPadTextureData(const GLvoid* srcBuffer,
|
||||
GLsizei dstWidth, GLsizei dstHeight,
|
||||
GLsizei stride, GLint pixelsize)
|
||||
{
|
||||
unsigned char *rowDest = static_cast<unsigned char*>(dstBuffer);
|
||||
const unsigned char *source = static_cast<const unsigned char*>(srcBuffer);
|
||||
unsigned char* rowDest = static_cast<unsigned char*>(dstBuffer);
|
||||
const unsigned char* source = static_cast<const unsigned char*>(srcBuffer);
|
||||
|
||||
for (GLsizei h = 0; h < srcHeight; ++h) {
|
||||
memcpy(rowDest, source, srcWidth * pixelsize);
|
||||
@ -176,7 +176,7 @@ TexSubImage2DWithUnpackSubimageGLES(GLContext* gl,
|
||||
1,
|
||||
format,
|
||||
type,
|
||||
(const unsigned char *)pixels+(height-1)*stride);
|
||||
(const unsigned char*)pixels+(height-1)*stride);
|
||||
gl->fPixelStorei(LOCAL_GL_UNPACK_ALIGNMENT, 4);
|
||||
}
|
||||
|
||||
@ -193,9 +193,9 @@ TexSubImage2DWithoutUnpackSubimage(GLContext* gl,
|
||||
// isn't supported. We make a copy of the texture data we're using,
|
||||
// such that we're using the whole row of data in the copy. This turns
|
||||
// out to be more efficient than uploading row-by-row; see bug 698197.
|
||||
unsigned char *newPixels = new unsigned char[width*height*pixelsize];
|
||||
unsigned char *rowDest = newPixels;
|
||||
const unsigned char *rowSource = (const unsigned char *)pixels;
|
||||
unsigned char* newPixels = new unsigned char[width*height*pixelsize];
|
||||
unsigned char* rowDest = newPixels;
|
||||
const unsigned char* rowSource = (const unsigned char*)pixels;
|
||||
for (int h = 0; h < height; h++) {
|
||||
memcpy(rowDest, rowSource, width*pixelsize);
|
||||
rowDest += width*pixelsize;
|
||||
@ -220,7 +220,7 @@ TexSubImage2DWithoutUnpackSubimage(GLContext* gl,
|
||||
}
|
||||
|
||||
static void
|
||||
TexSubImage2DHelper(GLContext *gl,
|
||||
TexSubImage2DHelper(GLContext* gl,
|
||||
GLenum target, GLint level,
|
||||
GLint xoffset, GLint yoffset,
|
||||
GLsizei width, GLsizei height, GLsizei stride,
|
||||
@ -274,11 +274,11 @@ TexSubImage2DHelper(GLContext *gl,
|
||||
}
|
||||
|
||||
static void
|
||||
TexImage2DHelper(GLContext *gl,
|
||||
TexImage2DHelper(GLContext* gl,
|
||||
GLenum target, GLint level, GLint internalformat,
|
||||
GLsizei width, GLsizei height, GLsizei stride,
|
||||
GLint pixelsize, GLint border, GLenum format,
|
||||
GLenum type, const GLvoid *pixels)
|
||||
GLenum type, const GLvoid* pixels)
|
||||
{
|
||||
if (gl->IsGLES()) {
|
||||
|
||||
@ -562,7 +562,7 @@ UploadImageDataToTexture(GLContext* gl,
|
||||
// The inital data pointer is at the top left point of the region's
|
||||
// bounding rectangle. We need to find the offset of this rect
|
||||
// within the region and adjust the data pointer accordingly.
|
||||
unsigned char *rectData =
|
||||
unsigned char* rectData =
|
||||
aData + DataOffset(rect.TopLeft() - topLeft, aStride, aFormat);
|
||||
|
||||
NS_ASSERTION(textureInited || (rect.x == 0 && rect.y == 0),
|
||||
|
@ -71,7 +71,7 @@ UploadImageDataToTexture(GLContext* gl,
|
||||
*/
|
||||
gfx::SurfaceFormat
|
||||
UploadSurfaceToTexture(GLContext* gl,
|
||||
gfx::DataSourceSurface *aSurface,
|
||||
gfx::DataSourceSurface* aSurface,
|
||||
const nsIntRegion& aDstRegion,
|
||||
GLuint& aTexture,
|
||||
size_t* aOutUploadSize = nullptr,
|
||||
|
@ -11,11 +11,11 @@ typedef realGLboolean GLboolean;
|
||||
|
||||
// stuff from glx.h
|
||||
#include "X11/Xlib.h"
|
||||
typedef struct __GLXcontextRec *GLXContext;
|
||||
typedef struct __GLXcontextRec* GLXContext;
|
||||
typedef XID GLXPixmap;
|
||||
typedef XID GLXDrawable;
|
||||
/* GLX 1.3 and later */
|
||||
typedef struct __GLXFBConfigRec *GLXFBConfig;
|
||||
typedef struct __GLXFBConfigRec* GLXFBConfig;
|
||||
typedef XID GLXFBConfigID;
|
||||
typedef XID GLXContextID;
|
||||
typedef XID GLXWindow;
|
||||
@ -67,59 +67,59 @@ public:
|
||||
{}
|
||||
|
||||
void xDestroyContext(Display* display, GLXContext context);
|
||||
Bool xMakeCurrent(Display* display,
|
||||
GLXDrawable drawable,
|
||||
Bool xMakeCurrent(Display* display,
|
||||
GLXDrawable drawable,
|
||||
GLXContext context);
|
||||
|
||||
GLXContext xGetCurrentContext();
|
||||
static void* xGetProcAddress(const char *procName);
|
||||
GLXFBConfig* xChooseFBConfig(Display* display,
|
||||
int screen,
|
||||
const int *attrib_list,
|
||||
int *nelements);
|
||||
GLXFBConfig* xGetFBConfigs(Display* display,
|
||||
int screen,
|
||||
int *nelements);
|
||||
GLXContext xCreateNewContext(Display* display,
|
||||
GLXFBConfig config,
|
||||
int render_type,
|
||||
GLXContext share_list,
|
||||
static void* xGetProcAddress(const char* procName);
|
||||
GLXFBConfig* xChooseFBConfig(Display* display,
|
||||
int screen,
|
||||
const int* attrib_list,
|
||||
int* nelements);
|
||||
GLXFBConfig* xGetFBConfigs(Display* display,
|
||||
int screen,
|
||||
int* nelements);
|
||||
GLXContext xCreateNewContext(Display* display,
|
||||
GLXFBConfig config,
|
||||
int render_type,
|
||||
GLXContext share_list,
|
||||
Bool direct);
|
||||
int xGetFBConfigAttrib(Display *display,
|
||||
int xGetFBConfigAttrib(Display* display,
|
||||
GLXFBConfig config,
|
||||
int attribute,
|
||||
int *value);
|
||||
void xSwapBuffers(Display *display, GLXDrawable drawable);
|
||||
const char * xQueryExtensionsString(Display *display,
|
||||
int screen);
|
||||
const char * xGetClientString(Display *display,
|
||||
int screen);
|
||||
const char * xQueryServerString(Display *display,
|
||||
int screen, int name);
|
||||
GLXPixmap xCreatePixmap(Display *display,
|
||||
int* value);
|
||||
void xSwapBuffers(Display* display, GLXDrawable drawable);
|
||||
const char* xQueryExtensionsString(Display* display,
|
||||
int screen);
|
||||
const char* xGetClientString(Display* display,
|
||||
int screen);
|
||||
const char* xQueryServerString(Display* display,
|
||||
int screen, int name);
|
||||
GLXPixmap xCreatePixmap(Display* display,
|
||||
GLXFBConfig config,
|
||||
Pixmap pixmap,
|
||||
const int *attrib_list);
|
||||
GLXPixmap xCreateGLXPixmapWithConfig(Display *display,
|
||||
const int* attrib_list);
|
||||
GLXPixmap xCreateGLXPixmapWithConfig(Display* display,
|
||||
GLXFBConfig config,
|
||||
Pixmap pixmap);
|
||||
void xDestroyPixmap(Display *display, GLXPixmap pixmap);
|
||||
Bool xQueryVersion(Display *display,
|
||||
int *major,
|
||||
int *minor);
|
||||
void xBindTexImage(Display *display,
|
||||
void xDestroyPixmap(Display* display, GLXPixmap pixmap);
|
||||
Bool xQueryVersion(Display* display,
|
||||
int* major,
|
||||
int* minor);
|
||||
void xBindTexImage(Display* display,
|
||||
GLXDrawable drawable,
|
||||
int buffer,
|
||||
const int *attrib_list);
|
||||
void xReleaseTexImage(Display *display,
|
||||
const int* attrib_list);
|
||||
void xReleaseTexImage(Display* display,
|
||||
GLXDrawable drawable,
|
||||
int buffer);
|
||||
void xWaitGL();
|
||||
void xWaitX();
|
||||
|
||||
GLXContext xCreateContextAttribs(Display* display,
|
||||
GLXFBConfig config,
|
||||
GLXContext share_list,
|
||||
GLXContext xCreateContextAttribs(Display* display,
|
||||
GLXFBConfig config,
|
||||
GLXContext share_list,
|
||||
Bool direct,
|
||||
const int* attrib_list);
|
||||
|
||||
@ -143,7 +143,7 @@ public:
|
||||
bool GLXVersionCheck(int aMajor, int aMinor);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
typedef void (GLAPIENTRY * PFNGLXDESTROYCONTEXTPROC) (Display*,
|
||||
GLXContext);
|
||||
PFNGLXDESTROYCONTEXTPROC xDestroyContextInternal;
|
||||
@ -153,89 +153,89 @@ private:
|
||||
PFNGLXMAKECURRENTPROC xMakeCurrentInternal;
|
||||
typedef GLXContext (GLAPIENTRY * PFNGLXGETCURRENTCONTEXT) ();
|
||||
PFNGLXGETCURRENTCONTEXT xGetCurrentContextInternal;
|
||||
typedef void* (GLAPIENTRY * PFNGLXGETPROCADDRESSPROC) (const char *);
|
||||
typedef void* (GLAPIENTRY * PFNGLXGETPROCADDRESSPROC) (const char*);
|
||||
PFNGLXGETPROCADDRESSPROC xGetProcAddressInternal;
|
||||
typedef GLXFBConfig* (GLAPIENTRY * PFNGLXCHOOSEFBCONFIG) (Display *,
|
||||
typedef GLXFBConfig* (GLAPIENTRY * PFNGLXCHOOSEFBCONFIG) (Display*,
|
||||
int,
|
||||
const int *,
|
||||
int *);
|
||||
const int*,
|
||||
int*);
|
||||
PFNGLXCHOOSEFBCONFIG xChooseFBConfigInternal;
|
||||
typedef GLXFBConfig* (GLAPIENTRY * PFNGLXGETFBCONFIGS) (Display *,
|
||||
typedef GLXFBConfig* (GLAPIENTRY * PFNGLXGETFBCONFIGS) (Display*,
|
||||
int,
|
||||
int *);
|
||||
int*);
|
||||
PFNGLXGETFBCONFIGS xGetFBConfigsInternal;
|
||||
typedef GLXContext (GLAPIENTRY * PFNGLXCREATENEWCONTEXT) (Display *,
|
||||
typedef GLXContext (GLAPIENTRY * PFNGLXCREATENEWCONTEXT) (Display*,
|
||||
GLXFBConfig,
|
||||
int,
|
||||
GLXContext,
|
||||
Bool);
|
||||
PFNGLXCREATENEWCONTEXT xCreateNewContextInternal;
|
||||
typedef int (GLAPIENTRY * PFNGLXGETFBCONFIGATTRIB) (Display *,
|
||||
typedef int (GLAPIENTRY * PFNGLXGETFBCONFIGATTRIB) (Display*,
|
||||
GLXFBConfig,
|
||||
int,
|
||||
int *);
|
||||
int*);
|
||||
PFNGLXGETFBCONFIGATTRIB xGetFBConfigAttribInternal;
|
||||
|
||||
typedef void (GLAPIENTRY * PFNGLXSWAPBUFFERS) (Display *,
|
||||
typedef void (GLAPIENTRY * PFNGLXSWAPBUFFERS) (Display*,
|
||||
GLXDrawable);
|
||||
PFNGLXSWAPBUFFERS xSwapBuffersInternal;
|
||||
typedef const char * (GLAPIENTRY * PFNGLXQUERYEXTENSIONSSTRING) (Display *,
|
||||
int);
|
||||
typedef const char* (GLAPIENTRY * PFNGLXQUERYEXTENSIONSSTRING) (Display*,
|
||||
int);
|
||||
PFNGLXQUERYEXTENSIONSSTRING xQueryExtensionsStringInternal;
|
||||
typedef const char * (GLAPIENTRY * PFNGLXGETCLIENTSTRING) (Display *,
|
||||
int);
|
||||
typedef const char* (GLAPIENTRY * PFNGLXGETCLIENTSTRING) (Display*,
|
||||
int);
|
||||
PFNGLXGETCLIENTSTRING xGetClientStringInternal;
|
||||
typedef const char * (GLAPIENTRY * PFNGLXQUERYSERVERSTRING) (Display *,
|
||||
int,
|
||||
int);
|
||||
typedef const char* (GLAPIENTRY * PFNGLXQUERYSERVERSTRING) (Display*,
|
||||
int,
|
||||
int);
|
||||
PFNGLXQUERYSERVERSTRING xQueryServerStringInternal;
|
||||
|
||||
typedef GLXPixmap (GLAPIENTRY * PFNGLXCREATEPIXMAP) (Display *,
|
||||
typedef GLXPixmap (GLAPIENTRY * PFNGLXCREATEPIXMAP) (Display*,
|
||||
GLXFBConfig,
|
||||
Pixmap,
|
||||
const int *);
|
||||
const int*);
|
||||
PFNGLXCREATEPIXMAP xCreatePixmapInternal;
|
||||
typedef GLXPixmap (GLAPIENTRY * PFNGLXCREATEGLXPIXMAPWITHCONFIG)
|
||||
(Display *,
|
||||
(Display*,
|
||||
GLXFBConfig,
|
||||
Pixmap);
|
||||
PFNGLXCREATEGLXPIXMAPWITHCONFIG xCreateGLXPixmapWithConfigInternal;
|
||||
typedef void (GLAPIENTRY * PFNGLXDESTROYPIXMAP) (Display *,
|
||||
typedef void (GLAPIENTRY * PFNGLXDESTROYPIXMAP) (Display*,
|
||||
GLXPixmap);
|
||||
PFNGLXDESTROYPIXMAP xDestroyPixmapInternal;
|
||||
typedef Bool (GLAPIENTRY * PFNGLXQUERYVERSION) (Display *,
|
||||
int *,
|
||||
int *);
|
||||
typedef Bool (GLAPIENTRY * PFNGLXQUERYVERSION) (Display*,
|
||||
int*,
|
||||
int*);
|
||||
PFNGLXQUERYVERSION xQueryVersionInternal;
|
||||
|
||||
typedef void (GLAPIENTRY * PFNGLXBINDTEXIMAGE) (Display *,
|
||||
typedef void (GLAPIENTRY * PFNGLXBINDTEXIMAGE) (Display*,
|
||||
GLXDrawable,
|
||||
int,
|
||||
const int *);
|
||||
const int*);
|
||||
PFNGLXBINDTEXIMAGE xBindTexImageInternal;
|
||||
|
||||
typedef void (GLAPIENTRY * PFNGLXRELEASETEXIMAGE) (Display *,
|
||||
typedef void (GLAPIENTRY * PFNGLXRELEASETEXIMAGE) (Display*,
|
||||
GLXDrawable,
|
||||
int);
|
||||
PFNGLXRELEASETEXIMAGE xReleaseTexImageInternal;
|
||||
|
||||
typedef void (GLAPIENTRY * PFNGLXWAITGL) ();
|
||||
PFNGLXWAITGL xWaitGLInternal;
|
||||
|
||||
|
||||
typedef void (GLAPIENTRY * PFNGLXWAITX) ();
|
||||
PFNGLXWAITGL xWaitXInternal;
|
||||
|
||||
typedef GLXContext (GLAPIENTRY * PFNGLXCREATECONTEXTATTRIBS) (Display *,
|
||||
typedef GLXContext (GLAPIENTRY * PFNGLXCREATECONTEXTATTRIBS) (Display*,
|
||||
GLXFBConfig,
|
||||
GLXContext,
|
||||
Bool,
|
||||
const int *);
|
||||
const int*);
|
||||
PFNGLXCREATECONTEXTATTRIBS xCreateContextAttribsInternal;
|
||||
|
||||
typedef int (GLAPIENTRY *PFNGLXGETVIDEOSYNCSGI) (unsigned int *count);
|
||||
typedef int (GLAPIENTRY * PFNGLXGETVIDEOSYNCSGI) (unsigned int* count);
|
||||
PFNGLXGETVIDEOSYNCSGI xGetVideoSyncInternal;
|
||||
|
||||
typedef int (GLAPIENTRY *PFNGLXWAITVIDEOSYNCSGI) (int divisor, int remainder, unsigned int *count);
|
||||
typedef int (GLAPIENTRY * PFNGLXWAITVIDEOSYNCSGI) (int divisor, int remainder, unsigned int* count);
|
||||
PFNGLXWAITVIDEOSYNCSGI xWaitVideoSyncInternal;
|
||||
|
||||
#ifdef DEBUG
|
||||
@ -255,7 +255,7 @@ private:
|
||||
bool mClientIsMesa;
|
||||
int mGLXMajorVersion;
|
||||
int mGLXMinorVersion;
|
||||
PRLibrary *mOGLLibrary;
|
||||
PRLibrary* mOGLLibrary;
|
||||
};
|
||||
|
||||
// a global GLXLibrary instance
|
||||
|
@ -43,7 +43,7 @@ public:
|
||||
GLint x, GLint y, GLsizei width, GLsizei height,
|
||||
GLint border) override;
|
||||
virtual bool ReadPixels(GLint x, GLint y, GLsizei width, GLsizei height,
|
||||
GLenum format, GLenum type, GLvoid *pixels) override;
|
||||
GLenum format, GLenum type, GLvoid* pixels) override;
|
||||
|
||||
virtual GLuint ProdTexture() override {
|
||||
return mProdTex;
|
||||
@ -53,7 +53,7 @@ public:
|
||||
return LOCAL_GL_TEXTURE_RECTANGLE_ARB;
|
||||
}
|
||||
|
||||
static SharedSurface_IOSurface* Cast(SharedSurface *surf) {
|
||||
static SharedSurface_IOSurface* Cast(SharedSurface* surf) {
|
||||
MOZ_ASSERT(surf->mType == SharedSurfaceType::IOSurface);
|
||||
return static_cast<SharedSurface_IOSurface*>(surf);
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ private:
|
||||
};
|
||||
|
||||
already_AddRefed<TextureImage>
|
||||
CreateTextureImageCGL(GLContext *gl,
|
||||
CreateTextureImageCGL(GLContext* gl,
|
||||
const gfx::IntSize& aSize,
|
||||
TextureImage::ContentType aContentType,
|
||||
GLenum aWrapMode,
|
||||
@ -46,7 +46,7 @@ CreateTextureImageCGL(GLContext *gl,
|
||||
TextureImage::ImageFormat aImageFormat);
|
||||
|
||||
already_AddRefed<TextureImage>
|
||||
TileGenFuncCGL(GLContext *gl,
|
||||
TileGenFuncCGL(GLContext* gl,
|
||||
const gfx::IntSize& aSize,
|
||||
TextureImage::ContentType aContentType,
|
||||
TextureImage::Flags aFlags);
|
||||
|
@ -79,7 +79,7 @@ CreateTextureImageCGL(GLContext* gl,
|
||||
}
|
||||
|
||||
already_AddRefed<TextureImage>
|
||||
TileGenFuncCGL(GLContext *gl,
|
||||
TileGenFuncCGL(GLContext* gl,
|
||||
const IntSize& aSize,
|
||||
TextureImage::ContentType aContentType,
|
||||
TextureImage::Flags aFlags)
|
||||
|
@ -310,7 +310,7 @@ TextureImageEGL::DestroyEGLSurface(void)
|
||||
}
|
||||
|
||||
already_AddRefed<TextureImage>
|
||||
CreateTextureImageEGL(GLContext *gl,
|
||||
CreateTextureImageEGL(GLContext* gl,
|
||||
const gfx::IntSize& aSize,
|
||||
TextureImage::ContentType aContentType,
|
||||
GLenum aWrapMode,
|
||||
@ -322,7 +322,7 @@ CreateTextureImageEGL(GLContext *gl,
|
||||
}
|
||||
|
||||
already_AddRefed<TextureImage>
|
||||
TileGenFuncEGL(GLContext *gl,
|
||||
TileGenFuncEGL(GLContext* gl,
|
||||
const gfx::IntSize& aSize,
|
||||
TextureImage::ContentType aContentType,
|
||||
TextureImage::Flags aFlags,
|
||||
|
@ -78,7 +78,7 @@ protected:
|
||||
};
|
||||
|
||||
already_AddRefed<TextureImage>
|
||||
CreateTextureImageEGL(GLContext *gl,
|
||||
CreateTextureImageEGL(GLContext* gl,
|
||||
const gfx::IntSize& aSize,
|
||||
TextureImage::ContentType aContentType,
|
||||
GLenum aWrapMode,
|
||||
@ -86,7 +86,7 @@ CreateTextureImageEGL(GLContext *gl,
|
||||
TextureImage::ImageFormat aImageFormat);
|
||||
|
||||
already_AddRefed<TextureImage>
|
||||
TileGenFuncEGL(GLContext *gl,
|
||||
TileGenFuncEGL(GLContext* gl,
|
||||
const gfx::IntSize& aSize,
|
||||
TextureImage::ContentType aContentType,
|
||||
TextureImage::Flags aFlags,
|
||||
|
@ -53,23 +53,23 @@ public:
|
||||
typedef BOOL (WINAPI * PFNWGLRELEASETEXIMAGEPROC) (HANDLE hPbuffer, int iBuffer);
|
||||
PFNWGLRELEASETEXIMAGEPROC fReleaseTexImage;
|
||||
|
||||
typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATPROC) (HDC hdc, const int* piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
|
||||
typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATPROC) (HDC hdc, const int* piAttribIList, const FLOAT* pfAttribFList, UINT nMaxFormats, int* piFormats, UINT* nNumFormats);
|
||||
PFNWGLCHOOSEPIXELFORMATPROC fChoosePixelFormat;
|
||||
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int* piAttributes, int *piValues);
|
||||
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int* piAttributes, int* piValues);
|
||||
PFNWGLGETPIXELFORMATATTRIBIVPROC fGetPixelFormatAttribiv;
|
||||
|
||||
typedef const char * (WINAPI * PFNWGLGETEXTENSIONSSTRINGPROC) (HDC hdc);
|
||||
typedef const char* (WINAPI * PFNWGLGETEXTENSIONSSTRINGPROC) (HDC hdc);
|
||||
PFNWGLGETEXTENSIONSSTRINGPROC fGetExtensionsString;
|
||||
|
||||
typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSPROC) (HDC hdc, HGLRC hShareContext, const int *attribList);
|
||||
typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSPROC) (HDC hdc, HGLRC hShareContext, const int* attribList);
|
||||
PFNWGLCREATECONTEXTATTRIBSPROC fCreateContextAttribs;
|
||||
|
||||
// WGL_NV_DX_interop:
|
||||
// BOOL wglDXSetResourceShareHandleNV(void *dxObject, HANDLE shareHandle);
|
||||
// BOOL wglDXSetResourceShareHandleNV(void* dxObject, HANDLE shareHandle);
|
||||
typedef BOOL (WINAPI * PFNWGLDXSETRESOURCESHAREHANDLEPROC) (void* dxObject, HANDLE shareHandle);
|
||||
PFNWGLDXSETRESOURCESHAREHANDLEPROC fDXSetResourceShareHandle;
|
||||
|
||||
// HANDLE wglDXOpenDeviceNV(void *dxDevice);
|
||||
// HANDLE wglDXOpenDeviceNV(void* dxDevice);
|
||||
typedef HANDLE (WINAPI * PFNWGLDXOPENDEVICEPROC) (void* dxDevice);
|
||||
PFNWGLDXOPENDEVICEPROC fDXOpenDevice;
|
||||
|
||||
@ -77,7 +77,7 @@ public:
|
||||
typedef BOOL (WINAPI * PFNWGLDXCLOSEDEVICEPROC) (HANDLE hDevice);
|
||||
PFNWGLDXCLOSEDEVICEPROC fDXCloseDevice;
|
||||
|
||||
// HANDLE wglDXRegisterObjectNV(HANDLE hDevice, void *dxObject, GLuint name, GLenum type, GLenum access);
|
||||
// HANDLE wglDXRegisterObjectNV(HANDLE hDevice, void* dxObject, GLuint name, GLenum type, GLenum access);
|
||||
typedef HANDLE (WINAPI * PFNWGLDXREGISTEROBJECTPROC) (HANDLE hDevice, void* dxObject, GLuint name, GLenum type, GLenum access);
|
||||
PFNWGLDXREGISTEROBJECTPROC fDXRegisterObject;
|
||||
|
||||
@ -89,16 +89,16 @@ public:
|
||||
typedef BOOL (WINAPI * PFNWGLDXOBJECTACCESSPROC) (HANDLE hObject, GLenum access);
|
||||
PFNWGLDXOBJECTACCESSPROC fDXObjectAccess;
|
||||
|
||||
// BOOL wglDXLockObjectsNV(HANDLE hDevice, GLint count, HANDLE *hObjects);
|
||||
// BOOL wglDXLockObjectsNV(HANDLE hDevice, GLint count, HANDLE* hObjects);
|
||||
typedef BOOL (WINAPI * PFNWGLDXLOCKOBJECTSPROC) (HANDLE hDevice, GLint count, HANDLE* hObjects);
|
||||
PFNWGLDXLOCKOBJECTSPROC fDXLockObjects;
|
||||
|
||||
// BOOL wglDXUnlockObjectsNV(HANDLE hDevice, GLint count, HANDLE *hObjects);
|
||||
// BOOL wglDXUnlockObjectsNV(HANDLE hDevice, GLint count, HANDLE* hObjects);
|
||||
typedef BOOL (WINAPI * PFNWGLDXUNLOCKOBJECTSPROC) (HANDLE hDevice, GLint count, HANDLE* hObjects);
|
||||
PFNWGLDXUNLOCKOBJECTSPROC fDXUnlockObjects;
|
||||
|
||||
bool EnsureInitialized();
|
||||
HWND CreateDummyWindow(HDC *aWindowDC = nullptr);
|
||||
HWND CreateDummyWindow(HDC* aWindowDC = nullptr);
|
||||
|
||||
bool HasRobustness() const { return mHasRobustness; }
|
||||
bool HasDXInterop() const { return mHasDXInterop; }
|
||||
@ -108,11 +108,11 @@ public:
|
||||
HDC GetWindowDC() const {return mWindowDC; }
|
||||
HGLRC GetWindowGLContext() const {return mWindowGLContext; }
|
||||
int GetWindowPixelFormat() const { return mWindowPixelFormat; }
|
||||
PRLibrary *GetOGLLibrary() { return mOGLLibrary; }
|
||||
PRLibrary* GetOGLLibrary() { return mOGLLibrary; }
|
||||
|
||||
private:
|
||||
bool mInitialized;
|
||||
PRLibrary *mOGLLibrary;
|
||||
PRLibrary* mOGLLibrary;
|
||||
bool mHasRobustness;
|
||||
bool mHasDXInterop;
|
||||
bool mHasDXInterop2;
|
||||
|
Loading…
Reference in New Issue
Block a user