--- a/gfx/gl/AndroidNativeWindow.cpp
+++ b/gfx/gl/AndroidNativeWindow.cpp
@@ -126,20 +126,20 @@ private:
pfnANativeWindow_fromSurface fANativeWindow_fromSurface;
typedef void (*pfnANativeWindow_release)(void* window);
pfnANativeWindow_release fANativeWindow_release;
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);
pfnANativeWindow_getFormat fANativeWindow_getFormat;
typedef int32_t (*pfnANativeWindow_getWidth)(void* window);
pfnANativeWindow_getWidth fANativeWindow_getWidth;
@@ -242,17 +242,17 @@ AndroidNativeWindow::Lock(void** out_bit
// The format of the buffer. One of WINDOW_FORMAT_*
int32_t format;
// The actual bits.
void* bits;
// Do not touch.
uint32_t reserved[6];
- } ANativeWindow_Buffer;
+ } ANativeWindow_Buffer;
ANativeWindow_Buffer buffer;
if (!sLibrary->ANativeWindow_lock(mWindow, &buffer, nullptr)) {
ALOG("Failed to lock");
return false;
}
--- a/gfx/gl/GLBlitHelper.cpp
+++ b/gfx/gl/GLBlitHelper.cpp
@@ -231,18 +231,18 @@ GLBlitHelper::InitTexQuadProgram(BlitTyp
gl_FragColor.b = y + cb * 2.01723; \n\
gl_FragColor.a = 1.0; \n\
} \n\
";
#endif
bool success = false;
- GLuint *programPtr;
- GLuint *fragShaderPtr;
+ GLuint* programPtr;
+ GLuint* fragShaderPtr;
const char* fragShaderSource;
switch (target) {
case ConvertEGLImage:
case BlitTex2D:
programPtr = &mTex2DBlit_Program;
fragShaderPtr = &mTex2DBlit_FragShader;
fragShaderSource = kTex2DBlit_FragShaderSource;
break;
--- a/gfx/gl/GLContext.cpp
+++ b/gfx/gl/GLContext.cpp
@@ -429,17 +429,17 @@ GLContext::GLContext(const SurfaceCaps&
mMaxViewportDims[1] = 0;
mOwningThreadId = PlatformThread::CurrentId();
}
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);
tip->ReportOutstandingNames();
} else {
ReportOutstandingNames();
}
#endif
@@ -1518,18 +1518,18 @@ GLContext::LoadMoreSymbols(const char* p
CORE_SYMBOL(GetInternalformativ),
END_SYMBOLS
};
fnLoadForFeature(symbols, GLFeature::internalformat_query);
}
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);
}
if (IsExtensionSupported(KHR_debug)) {
const SymLoadStruct symbols[] = {
{ (PRFuncPtr*) &mSymbols.fDebugMessageControl, { "DebugMessageControl", "DebugMessageControlKHR", nullptr } },
@@ -1796,38 +1796,39 @@ GLContext::InitExtensions()
void
GLContext::PlatformStartup()
{
RegisterStrongMemoryReporter(new GfxTexturesReporter());
}
// 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;
/*
* It takes a bit of care to be fool-proof about parsing the
* OpenGL extensions string. Don't be fooled by sub-strings,
* etc.
*/
start = extensions;
for (;;) {
- where = (GLubyte *) strstr((const char *) start, extension);
+ where = (GLubyte*) strstr((const char*) start, extension);
if (!where) {
break;
}
terminator = where + strlen(extension);
if (where == start || *(where - 1) == ' ') {
if (*terminator == ' ' || *terminator == '\0') {
return true;
}
@@ -2205,69 +2206,69 @@ GLContext::AssertNotPassingStackBufferTo
bool isStackAddress = pageDistance <= 1;
MOZ_ASSERT(!isStackAddress,
"Please don't pass stack arrays to the GL. "
"Consider using HeapCopyOfStackArray. "
"See bug 1005658.");
}
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]));
}
}
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]));
}
}
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]));
}
}
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]));
}
}
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]));
}
}
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];
// name 0 can be ignored
if (name == 0)
continue;
for (uint32_t i = 0; i < aArray.Length(); ++i) {
@@ -2275,90 +2276,90 @@ RemoveNamesFromArray(GLContext *aOrigin,
aArray.RemoveElementAt(i);
break;
}
}
}
}
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)
aArray[i].originDeleted = true;
}
}
void
-GLContext::SharedContextDestroyed(GLContext *aChild)
+GLContext::SharedContextDestroyed(GLContext* aChild)
{
MarkContextDestroyedInArray(aChild, mTrackedPrograms);
MarkContextDestroyedInArray(aChild, mTrackedShaders);
MarkContextDestroyedInArray(aChild, mTrackedTextures);
MarkContextDestroyedInArray(aChild, mTrackedFramebuffers);
MarkContextDestroyedInArray(aChild, mTrackedRenderbuffers);
MarkContextDestroyedInArray(aChild, mTrackedBuffers);
MarkContextDestroyedInArray(aChild, mTrackedQueries);
}
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;
printf_stderr("%s:\n", title);
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)
printf_stderr("\n");
printf_stderr(" [%p - %s] ", copy[i].origin, copy[i].originDeleted ? "deleted" : "live");
lastContext = copy[i].origin;
}
printf_stderr("%d ", copy[i].name);
@@ -2502,33 +2503,33 @@ GLContext::FlushIfHeavyGLCallsSinceLastF
/*static*/ bool
GLContext::ShouldDumpExts()
{
return gfxEnv::GlDumpExtensions();
}
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)
return false;
// aWantedString preceded by alpha character
if (occurrence != aString && isalpha(*(occurrence-1)))
return false;
// aWantedVendor followed by alpha character
- const char *afterOccurrence = occurrence + strlen(aWantedString);
+ const char* afterOccurrence = occurrence + strlen(aWantedString);
if (isalpha(*afterOccurrence))
return false;
return true;
}
/*static*/ bool
GLContext::ShouldSpew()
--- a/gfx/gl/GLContext.h
+++ b/gfx/gl/GLContext.h
@@ -758,19 +758,19 @@ private:
GLErrorToString(err), err);
if (DebugMode() & DebugAbortOnError)
MOZ_CRASH("MOZ_GL_DEBUG_ABORT_ON_ERROR");
}
}
}
- GLContext *TrackingContext()
+ GLContext* TrackingContext()
{
- GLContext *tip = this;
+ GLContext* tip = this;
while (tip->mSharedContext)
tip = tip->mSharedContext;
return tip;
}
static void AssertNotPassingStackBufferToTheGL(const void* ptr);
#ifdef MOZ_WIDGET_ANDROID
@@ -1014,25 +1014,25 @@ public:
}
void fColorMask(realGLboolean red, realGLboolean green, realGLboolean blue, realGLboolean alpha) {
BEFORE_GL_CALL;
mSymbols.fColorMask(red, green, blue, alpha);
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);
AFTER_GL_CALL;
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);
AFTER_GL_CALL;
mHeavyGLCallsSinceLastFlush = true;
}
void fCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x,
@@ -1116,30 +1116,30 @@ public:
private:
void raw_fDrawArrays(GLenum mode, GLint first, GLsizei count) {
BEFORE_GL_CALL;
mSymbols.fDrawArrays(mode, first, count);
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;
}
public:
void fDrawArrays(GLenum mode, GLint first, GLsizei count) {
BeforeGLDrawCall();
raw_fDrawArrays(mode, first, count);
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();
}
void fEnable(GLenum capability) {
BEFORE_GL_CALL;
mSymbols.fEnable(capability);
@@ -1216,17 +1216,17 @@ private:
mSymbols.fGetIntegerv(pname, params);
AFTER_GL_CALL;
}
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));
}
void fGetFloatv(GLenum pname, GLfloat* params) {
BEFORE_GL_CALL;
mSymbols.fGetFloatv(pname, params);
AFTER_GL_CALL;
}
@@ -1305,29 +1305,29 @@ public:
void fTexParameterf(GLenum target, GLenum pname, GLfloat param) {
BEFORE_GL_CALL;
mSymbols.fTexParameterf(target, pname, param);
AFTER_GL_CALL;
}
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);
mSymbols.fGetTexLevelParameteriv(target, level, pname, params);
AFTER_GL_CALL;
}
void fGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params) {
@@ -1454,17 +1454,17 @@ public:
}
void fLoadIdentity() {
BEFORE_GL_CALL;
mSymbols.fLoadIdentity();
AFTER_GL_CALL;
}
- void fLoadMatrixf(const GLfloat *matrix) {
+ void fLoadMatrixf(const GLfloat* matrix) {
BEFORE_GL_CALL;
mSymbols.fLoadMatrixf(matrix);
AFTER_GL_CALL;
}
void fMatrixMode(GLenum mode) {
BEFORE_GL_CALL;
mSymbols.fMatrixMode(mode);
@@ -1472,17 +1472,17 @@ public:
}
void fPixelStorei(GLenum pname, GLint param) {
BEFORE_GL_CALL;
mSymbols.fPixelStorei(pname, param);
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);
AFTER_GL_CALL;
}
void fPointParameterf(GLenum pname, GLfloat param) {
BEFORE_GL_CALL;
@@ -1511,17 +1511,17 @@ public:
}
void fReadBuffer(GLenum mode) {
BEFORE_GL_CALL;
mSymbols.fReadBuffer(mode);
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);
AFTER_GL_CALL;
mHeavyGLCallsSinceLastFlush = true;
}
void fReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format,
@@ -1594,33 +1594,33 @@ public:
}
void fTexGenf(GLenum coord, GLenum pname, GLfloat param) {
BEFORE_GL_CALL;
mSymbols.fTexGenf(coord, pname, param);
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);
AFTER_GL_CALL;
mHeavyGLCallsSinceLastFlush = true;
}
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.
level = -1;
width = -1;
height = -1;
border = -1;
}
@@ -2059,17 +2059,17 @@ public:
} else {
raw_fClearDepth(v);
}
}
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;
}
realGLboolean fUnmapBuffer(GLenum target) {
BEFORE_GL_CALL;
ASSERT_SYMBOL_PRESENT(fUnmapBuffer);
realGLboolean ret = mSymbols.fUnmapBuffer(target);
@@ -2261,24 +2261,24 @@ public:
void fWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout) {
BEFORE_GL_CALL;
ASSERT_SYMBOL_PRESENT(fWaitSync);
mSymbols.fWaitSync(sync, flags, timeout);
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);
AFTER_GL_CALL;
}
// -----------------------------------------------------------------------------
@@ -2792,25 +2792,25 @@ public:
void fBindVertexArray(GLuint array)
{
BEFORE_GL_CALL;
ASSERT_SYMBOL_PRESENT(fBindVertexArray);
mSymbols.fBindVertexArray(array);
AFTER_GL_CALL;
}
- void fDeleteVertexArrays(GLsizei n, const GLuint *arrays)
+ void fDeleteVertexArrays(GLsizei n, const GLuint* arrays)
{
BEFORE_GL_CALL;
ASSERT_SYMBOL_PRESENT(fDeleteVertexArrays);
mSymbols.fDeleteVertexArrays(n, arrays);
AFTER_GL_CALL;
}
- void fGenVertexArrays(GLsizei n, GLuint *arrays)
+ void fGenVertexArrays(GLsizei n, GLuint* arrays)
{
BEFORE_GL_CALL;
ASSERT_SYMBOL_PRESENT(fGenVertexArrays);
mSymbols.fGenVertexArrays(n, arrays);
AFTER_GL_CALL;
}
realGLboolean fIsVertexArray(GLuint array)
@@ -2926,25 +2926,25 @@ public:
mSymbols.fFlushMappedBufferRange(target, offset, length);
AFTER_GL_CALL;
}
// -----------------------------------------------------------------------------
// 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);
mSymbols.fGenSamplers(count, samplers);
AFTER_GL_CALL;
}
- void fDeleteSamplers(GLsizei count, const GLuint *samplers)
+ void fDeleteSamplers(GLsizei count, const GLuint* samplers)
{
BEFORE_GL_CALL;
ASSERT_SYMBOL_PRESENT(fDeleteSamplers);
mSymbols.fDeleteSamplers(count, samplers);
AFTER_GL_CALL;
}
realGLboolean fIsSampler(GLuint sampler)
@@ -2967,49 +2967,49 @@ public:
void fSamplerParameteri(GLuint sampler, GLenum pname, GLint param)
{
BEFORE_GL_CALL;
ASSERT_SYMBOL_PRESENT(fSamplerParameteri);
mSymbols.fSamplerParameteri(sampler, pname, param);
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);
mSymbols.fSamplerParameteriv(sampler, pname, param);
AFTER_GL_CALL;
}
void fSamplerParameterf(GLuint sampler, GLenum pname, GLfloat param)
{
BEFORE_GL_CALL;
ASSERT_SYMBOL_PRESENT(fSamplerParameterf);
mSymbols.fSamplerParameterf(sampler, pname, param);
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);
mSymbols.fSamplerParameterfv(sampler, pname, param);
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);
mSymbols.fGetSamplerParameteriv(sampler, pname, params);
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);
mSymbols.fGetSamplerParameterfv(sampler, pname, params);
AFTER_GL_CALL;
}
@@ -3230,17 +3230,17 @@ public:
virtual void ReleaseSurface() {}
bool IsDestroyed() {
// MarkDestroyed will mark all these as null.
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
* executing thread.
*/
bool IsOwningThreadCurrent();
static void PlatformStartup();
@@ -3338,18 +3338,18 @@ public:
void ForceDirtyScreen();
void CleanDirtyScreen();
virtual GLenum GetPreferredARGB32Format() const { return LOCAL_GL_RGBA; }
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; }
public:
std::map<GLuint, SharedSurface*> mFBOMapping;
enum {
DebugEnabled = 1 << 0,
@@ -3569,44 +3569,44 @@ public:
BEFORE_GL_CALL;
mSymbols.fViewport(x, y, width, height);
AFTER_GL_CALL;
}
#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 SharedContextDestroyed(GLContext *aChild);
+ 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 ReportOutstandingNames();
struct NamedResource {
NamedResource()
: 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;
// for sorting
bool operator<(const NamedResource& aOther) const {
if (intptr_t(origin) < intptr_t(aOther.origin))
return true;
if (name < aOther.name)
@@ -3635,17 +3635,17 @@ protected:
public:
void FlushIfHeavyGLCallsSinceLastFlush();
static bool ShouldSpew();
static bool ShouldDumpExts();
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);
template<size_t N>
bool
MarkBitfieldByString(const nsACString& str, const char* const (&markStrList)[N],
std::bitset<N>* const out_markList)
--- a/gfx/gl/GLContextCGL.h
+++ b/gfx/gl/GLContextCGL.h
@@ -19,17 +19,17 @@ typedef void NSOpenGLContext;
namespace mozilla {
namespace gl {
class GLContextCGL : public GLContext
{
friend class GLContextProviderCGL;
- NSOpenGLContext *mContext;
+ NSOpenGLContext* mContext;
public:
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(GLContextCGL, override)
GLContextCGL(const SurfaceCaps& caps, NSOpenGLContext* context,
bool isOffscreen, ContextProfile profile);
~GLContextCGL();
--- a/gfx/gl/GLContextEGL.h
+++ b/gfx/gl/GLContextEGL.h
@@ -15,17 +15,17 @@ namespace gl {
class GLContextEGL : public GLContext
{
friend class TextureImageEGL;
static already_AddRefed<GLContextEGL>
CreateGLContext(CreateContextFlags flags,
const SurfaceCaps& caps,
- GLContextEGL *shareContext,
+ GLContextEGL* shareContext,
bool isOffscreen,
EGLConfig config,
EGLSurface surface,
nsACString& aFailureId);
public:
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(GLContextEGL, override)
GLContextEGL(const SurfaceCaps& caps,
@@ -85,28 +85,28 @@ public:
virtual void ReleaseSurface() override;
virtual bool SetupLookupFunction() override;
virtual bool SwapBuffers() override;
// 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;
}
EGLDisplay GetEGLDisplay() const {
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>
CreateEGLPBufferOffscreenContext(CreateContextFlags flags,
const gfx::IntSize& size,
const SurfaceCaps& minCaps,
nsACString& aFailureId);
--- a/gfx/gl/GLContextGLX.h
+++ b/gfx/gl/GLContextGLX.h
@@ -68,26 +68,26 @@ public:
virtual Maybe<gfx::IntSize> GetTargetSize() override;
private:
friend class GLContextProviderGLX;
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);
GLXContext mContext;
- Display *mDisplay;
+ Display* mDisplay;
GLXDrawable mDrawable;
bool mDeleteDrawable;
bool mDoubleBuffered;
GLXLibrary* mGLX;
RefPtr<gfxXlibSurface> mPixmap;
bool mOwnsContext;
--- a/gfx/gl/GLContextProviderCGL.mm
+++ b/gfx/gl/GLContextProviderCGL.mm
@@ -60,17 +60,17 @@ public:
bool UseDoubleBufferedWindows() const {
MOZ_ASSERT(mInitialized);
return mUseDoubleBufferedWindows;
}
private:
bool mInitialized;
bool mUseDoubleBufferedWindows;
- PRLibrary *mOGLLibrary;
+ PRLibrary* mOGLLibrary;
};
CGLLibrary sCGLLibrary;
GLContextCGL::GLContextCGL(const SurfaceCaps& caps, NSOpenGLContext* context,
bool isOffscreen, ContextProfile profile)
: GLContext(caps, nullptr, isOffscreen)
, mContext(context)
@@ -229,17 +229,17 @@ CreateWithFormat(const NSOpenGLPixelForm
shareContext:nullptr];
[format release];
return context;
}
already_AddRefed<GLContext>
-GLContextProviderCGL::CreateForWindow(nsIWidget *aWidget, bool aForceAccelerated)
+GLContextProviderCGL::CreateForWindow(nsIWidget* aWidget, bool aForceAccelerated)
{
if (!sCGLLibrary.EnsureInitialized()) {
return nullptr;
}
#ifdef EMULATE_VM
if (aForceAccelerated) {
return nullptr;
--- a/gfx/gl/GLContextProviderEGL.cpp
+++ b/gfx/gl/GLContextProviderEGL.cpp
@@ -447,17 +447,17 @@ GLContextEGL::SwapBuffers()
} else {
return false;
}
}
// hold a reference to the given surface
// for the lifetime of this context.
void
-GLContextEGL::HoldSurface(gfxASurface *aSurf) {
+GLContextEGL::HoldSurface(gfxASurface* aSurf) {
mThebesSurface = aSurf;
}
/* static */ EGLSurface
GLContextEGL::CreateSurfaceForWindow(nsIWidget* aWidget)
{
nsCString discardFailureId;
if (!sEGLLibrary.EnsureInitialized(false, discardFailureId)) {
@@ -485,17 +485,17 @@ GLContextEGL::DestroySurface(EGLSurface
if (aSurface != EGL_NO_SURFACE) {
sEGLLibrary.fDestroySurface(EGL_DISPLAY(), aSurface);
}
}
already_AddRefed<GLContextEGL>
GLContextEGL::CreateGLContext(CreateContextFlags flags,
const SurfaceCaps& caps,
- GLContextEGL *shareContext,
+ GLContextEGL* shareContext,
bool isOffscreen,
EGLConfig config,
EGLSurface surface,
nsACString& aFailureId)
{
if (sEGLLibrary.fBindAPI(LOCAL_EGL_OPENGL_ES_API) == LOCAL_EGL_FALSE) {
aFailureId = NS_LITERAL_CSTRING("FEATURE_FAILURE_EGL_ES");
NS_WARNING("Failed to bind API to GLES!");
@@ -767,17 +767,17 @@ GLContextProviderEGL::CreateWrappingExis
return glContext.forget();
}
return nullptr;
}
already_AddRefed<GLContext>
-GLContextProviderEGL::CreateForWindow(nsIWidget *aWidget, bool aForceAccelerated)
+GLContextProviderEGL::CreateForWindow(nsIWidget* aWidget, bool aForceAccelerated)
{
nsCString discardFailureId;
if (!sEGLLibrary.EnsureInitialized(false, discardFailureId)) {
MOZ_CRASH("GFX: Failed to load EGL library 3!\n");
return nullptr;
}
bool doubleBuffered = true;
--- a/gfx/gl/GLContextProviderGLX.cpp
+++ b/gfx/gl/GLContextProviderGLX.cpp
@@ -1,17 +1,17 @@
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#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
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include "mozilla/MathAlgorithms.h"
@@ -175,50 +175,50 @@ GLXLibrary::EnsureInitialized()
{ nullptr, { nullptr } }
};
if (!GLLibraryLoader::LoadSymbols(mOGLLibrary, &symbols[0])) {
NS_WARNING("Couldn't find required entry point in OpenGL shared library");
return false;
}
- Display *display = DefaultXDisplay();
+ Display* display = DefaultXDisplay();
int screen = DefaultScreen(display);
if (!xQueryVersion(display, &mGLXMajorVersion, &mGLXMinorVersion)) {
mGLXMajorVersion = 0;
mGLXMinorVersion = 0;
return false;
}
if (!GLXVersionCheck(1, 1))
// 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).
if (!HasExtension(extensionsStr, "GLX_SGIX_fbconfig")) {
return false;
}
sym13 = symbols13_ext;
} else {
sym13 = symbols13;
}
if (!GLLibraryLoader::LoadSymbols(mOGLLibrary, sym13)) {
NS_WARNING("Couldn't find required entry point in OpenGL shared library");
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).
if (!HasExtension(extensionsStr, "GLX_ARB_get_proc_address")) {
return false;
}
sym14 = symbols14_ext;
} else {
@@ -294,18 +294,18 @@ GLXLibrary::SupportsVideoSync()
GLXPixmap
GLXLibrary::CreatePixmap(gfxASurface* aSurface)
{
if (!SupportsTextureFromPixmap(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;
}
const XRenderDirectFormat& direct = format->direct;
int alphaSize = FloorLog2(direct.alphaMask + 1);
NS_ASSERTION((1 << alphaSize) - 1 == direct.alphaMask,
"Unexpected render format with non-adjacent alpha bits");
@@ -313,17 +313,17 @@ GLXLibrary::CreatePixmap(gfxASurface* aS
LOCAL_GLX_DRAWABLE_TYPE, LOCAL_GLX_PIXMAP_BIT,
LOCAL_GLX_ALPHA_SIZE, alphaSize,
(alphaSize ? LOCAL_GLX_BIND_TO_TEXTURE_RGBA_EXT
: LOCAL_GLX_BIND_TO_TEXTURE_RGB_EXT), True,
LOCAL_GLX_RENDER_TYPE, LOCAL_GLX_RGBA_BIT,
None };
int numConfigs = 0;
- Display *display = xs->XDisplay();
+ Display* display = xs->XDisplay();
int xscreen = DefaultScreen(display);
ScopedXFree<GLXFBConfig> cfgs(xChooseFBConfig(display,
xscreen,
attribs,
&numConfigs));
// Find an fbconfig that matches the pixel format used on the Pixmap.
@@ -336,17 +336,17 @@ GLXLibrary::CreatePixmap(gfxASurface* aS
static_cast<unsigned long>(direct.blueMask) << direct.blue;
// This is true if the Pixmap has bits for alpha or unused bits.
bool haveNonColorBits =
~(redMask | greenMask | blueMask) != -1UL << format->depth;
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 ||
visual->c_class != TrueColor ||
visual->red_mask != redMask ||
visual->green_mask != greenMask ||
visual->blue_mask != blueMask ) {
continue;
@@ -479,19 +479,19 @@ GLXLibrary::UpdateTexImage(Display* aDis
}
ReleaseTexImage(aDisplay, aPixmap);
BindTexImage(aDisplay, 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;
}
return 0;
}
void
@@ -561,40 +561,40 @@ GLXLibrary::xGetCurrentContext()
{
BEFORE_GLX_CALL;
GLXContext result = xGetCurrentContextInternal();
AFTER_GLX_CALL;
return result;
}
/* static */ void*
-GLXLibrary::xGetProcAddress(const char *procName)
+GLXLibrary::xGetProcAddress(const char* procName)
{
BEFORE_GLX_CALL;
void* result = sGLXLibrary.xGetProcAddressInternal(procName);
AFTER_GLX_CALL;
return result;
}
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);
AFTER_GLX_CALL;
return result;
}
GLXFBConfig*
GLXLibrary::xGetFBConfigs(Display* display,
int screen,
- int *nelements)
+ int* nelements)
{
BEFORE_GLX_CALL;
GLXFBConfig* result = xGetFBConfigsInternal(display, screen, nelements);
AFTER_GLX_CALL;
return result;
}
GLXContext
@@ -608,122 +608,122 @@ GLXLibrary::xCreateNewContext(Display* d
GLXContext result = xCreateNewContextInternal(display, config,
render_type,
share_list, direct);
AFTER_GLX_CALL;
return result;
}
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,
attribute, value);
AFTER_GLX_CALL;
return result;
}
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,
pixmap, attrib_list);
AFTER_GLX_CALL;
return result;
}
GLXPixmap
-GLXLibrary::xCreateGLXPixmapWithConfig(Display *display,
+GLXLibrary::xCreateGLXPixmapWithConfig(Display* display,
GLXFBConfig config,
Pixmap pixmap)
{
BEFORE_GLX_CALL;
GLXPixmap result = xCreateGLXPixmapWithConfigInternal(display, config, pixmap);
AFTER_GLX_CALL;
return result;
}
void
-GLXLibrary::xDestroyPixmap(Display *display, GLXPixmap pixmap)
+GLXLibrary::xDestroyPixmap(Display* display, GLXPixmap pixmap)
{
BEFORE_GLX_CALL;
xDestroyPixmapInternal(display, pixmap);
AFTER_GLX_CALL;
}
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);
AFTER_GLX_CALL;
return result;
}
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);
AFTER_GLX_CALL;
}
void
-GLXLibrary::xReleaseTexImage(Display *display,
+GLXLibrary::xReleaseTexImage(Display* display,
GLXDrawable drawable,
int buffer)
{
BEFORE_GLX_CALL;
xReleaseTexImageInternal(display, drawable, buffer);
AFTER_GLX_CALL;
}
@@ -1004,22 +1004,22 @@ GLContextGLX::RestoreDrawable()
{
return mGLX->xMakeCurrent(mDisplay, mDrawable, mContext);
}
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(caps, shareContext, isOffscreen),//aDeleteDrawable ? true : false, aShareContext, ),
mContext(aContext),
mDisplay(aDisplay),
mDrawable(aDrawable),
mDeleteDrawable(aDeleteDrawable),
mDoubleBuffered(aDoubleBuffered),
mGLX(&sGLXLibrary),
@@ -1027,24 +1027,24 @@ GLContextGLX::GLContextGLX(
mOwnsContext(true)
{
MOZ_ASSERT(mGLX);
// See 899855
SetProfileVersion(profile, 200);
}
-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;
}
if (one->red_mask != two->red_mask ||
one->green_mask != two->green_mask ||
one->blue_mask != two->blue_mask) {
@@ -1085,30 +1085,30 @@ GLContextProviderGLX::CreateWrappingExis
return glContext.forget();
}
return nullptr;
}
already_AddRefed<GLContext>
-GLContextProviderGLX::CreateForWindow(nsIWidget *aWidget, bool aForceAccelerated)
+GLContextProviderGLX::CreateForWindow(nsIWidget* aWidget, bool aForceAccelerated)
{
if (!sGLXLibrary.EnsureInitialized()) {
return nullptr;
}
// Currently, we take whatever Visual the window already has, and
// try to create an fbconfig for that visual. This isn't
// necessarily what we want in the long run; an fbconfig may not
// be available for the existing visual, or if it is, the GL
// 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;
}
int xscreen = DefaultScreen(display);
Window window = GET_NATIVE_WINDOW(aWidget);
@@ -1116,17 +1116,17 @@ GLContextProviderGLX::CreateForWindow(ns
GLXFBConfig config;
int visid;
if (!GLContextGLX::FindFBConfigForWindow(display, xscreen, window, &cfgs,
&config, &visid))
{
return nullptr;
}
- GLContextGLX *shareContext = GetGlobalContextGLX();
+ GLContextGLX* shareContext = GetGlobalContextGLX();
SurfaceCaps caps = SurfaceCaps::Any();
RefPtr<GLContextGLX> glContext = GLContextGLX::CreateGLContext(caps,
shareContext,
false,
display,
window,
config,
@@ -1237,17 +1237,17 @@ GLContextGLX::FindFBConfigForWindow(Disp
for (int i = 0; i < numConfigs; i++) {
int visid = None;
sGLXLibrary.xGetFBConfigAttrib(display, cfgs[i], LOCAL_GLX_VISUAL_ID, &visid);
if (!visid) {
continue;
}
if (sGLXLibrary.IsATI()) {
int depth;
- Visual *visual;
+ Visual* visual;
FindVisualAndDepth(display, visid, &visual, &depth);
if (depth == windowAttrs.depth &&
AreCompatibleVisuals(windowAttrs.visual, visual)) {
*out_config = cfgs[i];
*out_visid = visid;
return true;
}
} else {
--- a/gfx/gl/GLContextProviderWGL.cpp
+++ b/gfx/gl/GLContextProviderWGL.cpp
@@ -21,17 +21,17 @@
namespace mozilla {
namespace gl {
using namespace mozilla::gfx;
WGLLibrary sWGLLib;
HWND
-WGLLibrary::CreateDummyWindow(HDC *aWindowDC)
+WGLLibrary::CreateDummyWindow(HDC* aWindowDC)
{
WNDCLASSW wc;
if (!GetClassInfoW(GetModuleHandle(nullptr), L"GLContextWGLClass", &wc)) {
ZeroMemory(&wc, sizeof(WNDCLASSW));
wc.style = CS_OWNDC;
wc.hInstance = GetModuleHandle(nullptr);
wc.lpfnWndProc = DefWindowProc;
wc.lpszClassName = L"GLContextWGLClass";
@@ -172,34 +172,34 @@ WGLLibrary::EnsureInitialized()
}
if (!GLLibraryLoader::LoadSymbols(mOGLLibrary, &pixFmtSymbols[0], lookupFunc)) {
// this isn't an error, just means that we don't have the pixel format extension
fChoosePixelFormat = nullptr;
}
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 } }
};
if (GLLibraryLoader::LoadSymbols(mOGLLibrary, &extensionsSymbols[0], lookupFunc))
{
const char* extString = fGetExtensionsString(mWindowDC);
MOZ_ASSERT(extString);
MOZ_ASSERT(HasExtension(extString, "WGL_ARB_extensions_string"));
@@ -396,17 +396,17 @@ GLContextWGL::SetupLookupFunction()
}
static bool
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;
size.width = result[0];
size.height = result[1];
return true;
}
@@ -434,34 +434,34 @@ GetGlobalContextWGL()
already_AddRefed<GLContext>
GLContextProviderWGL::CreateWrappingExisting(void*, void*)
{
return nullptr;
}
already_AddRefed<GLContext>
-GLContextProviderWGL::CreateForWindow(nsIWidget *aWidget, bool aForceAccelerated)
+GLContextProviderWGL::CreateForWindow(nsIWidget* aWidget, bool aForceAccelerated)
{
if (!sWGLLib.EnsureInitialized()) {
return nullptr;
}
/**
* We need to make sure we call SetPixelFormat -after- calling
* EnsureInitialized, otherwise it can load/unload the dll and
* wglCreateContext will fail.
*/
HDC dc = (HDC)aWidget->GetNativeData(NS_NATIVE_GRAPHIC);
SetPixelFormat(dc, sWGLLib.GetWindowPixelFormat(), nullptr);
HGLRC context;
- GLContextWGL *shareContext = GetGlobalContextWGL();
+ GLContextWGL* shareContext = GetGlobalContextWGL();
if (sWGLLib.HasRobustness()) {
int attribs[] = {
LOCAL_WGL_CONTEXT_FLAGS_ARB, LOCAL_WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB,
LOCAL_WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB, LOCAL_WGL_LOSE_CONTEXT_ON_RESET_ARB,
0
};
@@ -496,17 +496,17 @@ GLContextProviderWGL::CreateForWindow(ns
glContext->SetIsDoubleBuffered(true);
return glContext.forget();
}
static already_AddRefed<GLContextWGL>
CreatePBufferOffscreenContext(const IntSize& aSize,
- GLContextWGL *aShareContext)
+ GLContextWGL* aShareContext)
{
WGLLibrary& wgl = sWGLLib;
#define A1(_a,_x) do { _a.AppendElement(_x); } while(0)
#define A2(_a,_x,_y) do { _a.AppendElement(_x); _a.AppendElement(_y); } while(0)
nsTArray<int> attrs;
@@ -590,17 +590,17 @@ CreatePBufferOffscreenContext(const IntS
return glContext.forget();
}
static already_AddRefed<GLContextWGL>
CreateWindowOffscreenContext()
{
// CreateWindowOffscreenContext must return a global-shared context
- GLContextWGL *shareContext = GetGlobalContextWGL();
+ GLContextWGL* shareContext = GetGlobalContextWGL();
if (!shareContext) {
return nullptr;
}
HDC dc;
HWND win = sWGLLib.CreateDummyWindow(&dc);
if (!win) {
return nullptr;
--- a/gfx/gl/GLContextSymbols.h
+++ b/gfx/gl/GLContextSymbols.h
@@ -74,19 +74,19 @@ struct GLContextSymbols
typedef void (GLAPIENTRY * PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint* value);
PFNGLCLEARBUFFERUIVPROC fClearBufferuiv;
typedef void (GLAPIENTRY * PFNGLCLEARCOLORPROC) (GLfloat, GLfloat, GLfloat, GLfloat);
PFNGLCLEARCOLORPROC fClearColor;
typedef void (GLAPIENTRY * PFNGLCLEARSTENCILPROC) (GLint);
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;
typedef void (GLAPIENTRY * PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);
PFNGLDETACHSHADERPROC fDetachShader;
typedef void (GLAPIENTRY * PFNGLDEPTHFUNCPROC) (GLenum);
PFNGLDEPTHFUNCPROC fDepthFunc;
typedef void (GLAPIENTRY * PFNGLDEPTHMASKPROC) (realGLboolean);
@@ -96,17 +96,17 @@ struct GLContextSymbols
typedef void (GLAPIENTRY * PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint);
PFNGLDISABLEVERTEXATTRIBARRAYPROC fDisableVertexAttribArray;
typedef void (GLAPIENTRY * PFNGLDRAWARRAYSPROC) (GLenum mode, GLint first, GLsizei count);
PFNGLDRAWARRAYSPROC fDrawArrays;
typedef void (GLAPIENTRY * PFNGLDRAWBUFFERPROC) (GLenum mode);
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;
typedef void (GLAPIENTRY * PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint);
PFNGLENABLEVERTEXATTRIBARRAYPROC fEnableVertexAttribArray;
typedef void (GLAPIENTRY * PFNGLFINISHPROC) (void);
PFNGLFINISHPROC fFinish;
typedef void (GLAPIENTRY * PFNGLENDQUERYPROC) (GLenum target);
@@ -118,21 +118,21 @@ struct GLContextSymbols
typedef void (GLAPIENTRY * PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei maxLength, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
PFNGLGETACTIVEATTRIBPROC fGetActiveAttrib;
typedef void (GLAPIENTRY * PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei maxLength, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
PFNGLGETACTIVEUNIFORMPROC fGetActiveUniform;
typedef void (GLAPIENTRY * PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei* count, GLuint* shaders);
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;
typedef void (GLAPIENTRY * PFNGLGENERATEMIPMAPPROC) (GLenum target);
PFNGLGENERATEMIPMAPPROC fGenerateMipmap;
typedef GLenum (GLAPIENTRY * PFNGLGETERRORPROC) (void);
PFNGLGETERRORPROC fGetError;
typedef void (GLAPIENTRY * PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint* param);
@@ -156,21 +156,21 @@ struct GLContextSymbols
typedef void (GLAPIENTRY * PFNGLTEXPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint* param);
PFNGLTEXPARAMETERIVPROC fTexParameteriv;
typedef void (GLAPIENTRY * PFNGLTEXPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat param);
PFNGLTEXPARAMETERFPROC fTexParameterf;
typedef GLubyte* (GLAPIENTRY * PFNGLGETSTRINGPROC) (GLenum);
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;
typedef void (GLAPIENTRY * PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint* params);
PFNGLGETUNIFORMIVPROC fGetUniformiv;
typedef void (GLAPIENTRY * PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint* params);
PFNGLGETUNIFORMUIVPROC fGetUniformuiv;
typedef GLint (GLAPIENTRY * PFNGLGETUNIFORMLOCATIONPROC) (GLint programObj, const GLchar* name);
@@ -202,37 +202,37 @@ struct GLContextSymbols
typedef void (GLAPIENTRY * PFNGLPIXELSTOREIPROC) (GLenum pname, GLint param);
PFNGLPIXELSTOREIPROC fPixelStorei;
typedef void (GLAPIENTRY * PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param);
PFNGLPOINTPARAMETERFPROC fPointParameterf;
typedef void (GLAPIENTRY * PFNGLPOLYGONOFFSETPROC) (GLfloat factor, GLfloat bias);
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;
typedef void (GLAPIENTRY * PFNGLSTENCILFUNCPROC) (GLenum func, GLint ref, GLuint mask);
PFNGLSTENCILFUNCPROC fStencilFunc;
typedef void (GLAPIENTRY * PFNGLSTENCILFUNCSEPARATEPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
PFNGLSTENCILFUNCSEPARATEPROC fStencilFuncSeparate;
typedef void (GLAPIENTRY * PFNGLSTENCILMASKPROC) (GLuint mask);
PFNGLSTENCILMASKPROC fStencilMask;
typedef void (GLAPIENTRY * PFNGLSTENCILMASKSEPARATEPROC) (GLenum, GLuint);
PFNGLSTENCILMASKSEPARATEPROC fStencilMaskSeparate;
typedef void (GLAPIENTRY * PFNGLSTENCILOPPROC) (GLenum fail, GLenum zfail, GLenum zpass);
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;
typedef void (GLAPIENTRY * PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat* value);
PFNGLUNIFORM1FVPROC fUniform1fv;
typedef void (GLAPIENTRY * PFNGLUNIFORM1IPROC) (GLint location, GLint v0);
PFNGLUNIFORM1IPROC fUniform1i;
typedef void (GLAPIENTRY * PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint* value);
@@ -412,17 +412,17 @@ struct GLContextSymbols
typedef GLuint (GLAPIENTRY * PFNGLCREATEPROGRAMPROC) (void);
PFNGLCREATEPROGRAMPROC fCreateProgram;
typedef GLuint (GLAPIENTRY * PFNGLCREATESHADERPROC) (GLenum type);
PFNGLCREATESHADERPROC fCreateShader;
typedef void (GLAPIENTRY * PFNGLGENBUFFERSPROC) (GLsizei n, GLuint* buffers);
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;
typedef void (GLAPIENTRY * PFNGLGENRENDERBUFFERS) (GLsizei n, GLuint* ids);
PFNGLGENRENDERBUFFERS fGenRenderbuffers;
typedef void (GLAPIENTRY * PFNGLGENVERTEXARRAYS) (GLsizei n, GLuint* arrays);
PFNGLGENVERTEXARRAYS fGenVertexArrays;
@@ -463,19 +463,19 @@ struct GLContextSymbols
typedef realGLboolean (GLAPIENTRY * PFNGLISSYNC) (GLsync sync);
PFNGLISSYNC fIsSync;
typedef void (GLAPIENTRY * PFNGLDELETESYNC) (GLsync sync);
PFNGLDELETESYNC fDeleteSync;
typedef GLenum (GLAPIENTRY * PFNGLCLIENTWAITSYNC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
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
typedef void (GLAPIENTRY * PFNGLEGLIMAGETARGETTEXTURE2D)(GLenum target, GLeglImage image);
PFNGLEGLIMAGETARGETTEXTURE2D fEGLImageTargetTexture2D;
typedef void (GLAPIENTRY * PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGE)(GLenum target, GLeglImage image);
PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGE fEGLImageTargetRenderbufferStorage;
@@ -575,35 +575,35 @@ struct GLContextSymbols
// map_buffer_range
typedef void* (GLAPIENTRY * PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
PFNGLMAPBUFFERRANGEPROC fMapBufferRange;
typedef void (GLAPIENTRY * PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length);
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;
typedef void (GLAPIENTRY * PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler);
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
typedef void (GLAPIENTRY * PFNGLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
PFNGLTEXSTORAGE2DPROC fTexStorage2D;
typedef void (GLAPIENTRY * PFNGLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
PFNGLTEXSTORAGE3DPROC fTexStorage3D;
--- a/gfx/gl/GLLibraryEGL.cpp
+++ b/gfx/gl/GLLibraryEGL.cpp
@@ -30,17 +30,17 @@ namespace gl {
StaticMutex GLLibraryEGL::sMutex;
GLLibraryEGL sEGLLibrary;
#ifdef MOZ_B2G
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",
"EGL_KHR_lock_surface",
"EGL_ANGLE_surface_d3d_texture_2d_share_handle",
"EGL_EXT_create_context_robustness",
"EGL_KHR_image",
"EGL_KHR_fence_sync",
@@ -124,17 +124,17 @@ GetAndInitWARPDisplay(GLLibraryEGL& egl,
LOCAL_EGL_NONE };
EGLDisplay display = egl.fGetPlatformDisplayEXT(LOCAL_EGL_PLATFORM_ANGLE_ANGLE,
displayType,
attrib_list);
if (display == EGL_NO_DISPLAY) {
const EGLint err = egl.fGetError();
if (err != LOCAL_EGL_SUCCESS) {
- gfxCriticalError() << "Unexpected GL error: " << gfx::hexa(err);
+ gfxCriticalError() << "Unexpected GL error: " << gfx::hexa(err);
MOZ_CRASH("GFX: Unexpected GL error.");
}
return EGL_NO_DISPLAY;
}
if (!egl.fInitialize(display, nullptr, nullptr))
return EGL_NO_DISPLAY;
@@ -667,17 +667,17 @@ GLLibraryEGL::DumpEGLConfig(EGLConfig cf
#undef ATTR
}
void
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) {
printf_stderr ("========= EGL Config %d ========\n", i);
DumpEGLConfig(ec[i]);
}
delete [] ec;
--- a/gfx/gl/GLLibraryEGL.h
+++ b/gfx/gl/GLLibraryEGL.h
@@ -246,49 +246,49 @@ public:
EGLBoolean fDestroyContext(EGLDisplay dpy, EGLContext ctx)
{
BEFORE_GL_CALL;
EGLBoolean b = mSymbols.fDestroyContext(dpy, ctx);
AFTER_GL_CALL;
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);
AFTER_GL_CALL;
return ctx;
}
EGLBoolean fDestroySurface(EGLDisplay dpy, EGLSurface surface)
{
BEFORE_GL_CALL;
EGLBoolean b = mSymbols.fDestroySurface(dpy, surface);
AFTER_GL_CALL;
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);
AFTER_GL_CALL;
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);
AFTER_GL_CALL;
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);
AFTER_GL_CALL;
return surf;
}
EGLBoolean fBindAPI(EGLenum api)
@@ -302,57 +302,57 @@ public:
EGLBoolean fInitialize(EGLDisplay dpy, EGLint* major, EGLint* minor)
{
BEFORE_GL_CALL;
EGLBoolean b = mSymbols.fInitialize(dpy, major, minor);
AFTER_GL_CALL;
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);
AFTER_GL_CALL;
return b;
}
EGLint fGetError()
{
BEFORE_GL_CALL;
EGLint i = mSymbols.fGetError();
AFTER_GL_CALL;
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);
AFTER_GL_CALL;
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);
AFTER_GL_CALL;
return b;
}
EGLBoolean fWaitNative(EGLint engine)
{
BEFORE_GL_CALL;
EGLBoolean b = mSymbols.fWaitNative(engine);
AFTER_GL_CALL;
return b;
}
- EGLCastToRelevantPtr fGetProcAddress(const char *procname)
+ EGLCastToRelevantPtr fGetProcAddress(const char* procname)
{
BEFORE_GL_CALL;
EGLCastToRelevantPtr p = mSymbols.fGetProcAddress(procname);
AFTER_GL_CALL;
return p;
}
EGLBoolean fSwapBuffers(EGLDisplay dpy, EGLSurface surface)
@@ -379,17 +379,17 @@ public:
b = mSymbols.fQueryStringImplementationANDROID(dpy, name);
} else {
b = mSymbols.fQueryString(dpy, name);
}
AFTER_GL_CALL;
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);
AFTER_GL_CALL;
return b;
}
EGLBoolean fBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer)
@@ -403,66 +403,66 @@ public:
EGLBoolean fReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer)
{
BEFORE_GL_CALL;
EGLBoolean b = mSymbols.fReleaseTexImage(dpy, surface, buffer);
AFTER_GL_CALL;
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);
AFTER_GL_CALL;
return i;
}
EGLBoolean fDestroyImage(EGLDisplay dpy, EGLImage image)
{
BEFORE_GL_CALL;
EGLBoolean b = mSymbols.fDestroyImage(dpy, image);
AFTER_GL_CALL;
return b;
}
// 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);
AFTER_GL_CALL;
return b;
}
EGLBoolean fUnlockSurface(EGLDisplay dpy, EGLSurface surface)
{
BEFORE_GL_CALL;
EGLBoolean b = mSymbols.fUnlockSurface(dpy, surface);
AFTER_GL_CALL;
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);
AFTER_GL_CALL;
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);
AFTER_GL_CALL;
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);
AFTER_GL_CALL;
return ret;
}
EGLBoolean fDestroySync(EGLDisplay dpy, EGLSync sync)
@@ -476,17 +476,17 @@ public:
EGLint fClientWaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout)
{
BEFORE_GL_CALL;
EGLint ret = mSymbols.fClientWaitSync(dpy, sync, flags, timeout);
AFTER_GL_CALL;
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);
AFTER_GL_CALL;
return b;
}
EGLint fDupNativeFenceFDANDROID(EGLDisplay dpy, EGLSync sync)
@@ -536,94 +536,94 @@ public:
bool ReadbackEGLImage(EGLImage image, gfx::DataSourceSurface* out_surface);
bool EnsureInitialized(bool forceAccel, nsACString& aFailureId);
void DumpEGLConfig(EGLConfig cfg);
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;
typedef EGLSurface (GLAPIENTRY * pfnGetCurrentSurface)(EGLint);
pfnGetCurrentSurface fGetCurrentSurface;
typedef EGLContext (GLAPIENTRY * pfnGetCurrentContext)(void);
pfnGetCurrentContext fGetCurrentContext;
typedef EGLBoolean (GLAPIENTRY * pfnMakeCurrent)(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx);
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;
typedef EGLBoolean (GLAPIENTRY * pfnCopyBuffers)(EGLDisplay dpy, EGLSurface surface,
EGLNativePixmapType target);
pfnCopyBuffers fCopyBuffers;
typedef const GLubyte* (GLAPIENTRY * pfnQueryString)(EGLDisplay, EGLint name);
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;
} mSymbols;
#ifdef DEBUG
static void BeforeGLCall(const char* glFunction);
static void AfterGLCall(const char* glFunction);
--- a/gfx/gl/GLLibraryLoader.cpp
+++ b/gfx/gl/GLLibraryLoader.cpp
@@ -5,87 +5,87 @@
#include "GLLibraryLoader.h"
#include "nsDebug.h"
namespace mozilla {
namespace gl {
bool
-GLLibraryLoader::OpenLibrary(const char *library)
+GLLibraryLoader::OpenLibrary(const char* library)
{
PRLibSpec lspec;
lspec.type = PR_LibSpec_Pathname;
lspec.value.pathname = library;
mLibrary = PR_LoadLibraryWithFlags(lspec, PR_LD_LAZY | PR_LD_LOCAL);
if (!mLibrary)
return false;
return true;
}
bool
-GLLibraryLoader::LoadSymbols(const SymLoadStruct *firstStruct,
+GLLibraryLoader::LoadSymbols(const SymLoadStruct* firstStruct,
bool tryplatform,
- const char *prefix,
+ const char* prefix,
bool warnOnFailure)
{
return LoadSymbols(mLibrary,
firstStruct,
tryplatform ? mLookupFunc : nullptr,
prefix,
warnOnFailure);
}
PRFuncPtr
-GLLibraryLoader::LookupSymbol(PRLibrary *lib,
- const char *sym,
+GLLibraryLoader::LookupSymbol(PRLibrary* lib,
+ const char* sym,
PlatformLookupFunction lookupFunction)
{
PRFuncPtr res = 0;
// try finding it in the library directly, if we have one
if (lib) {
res = PR_FindFunctionSymbol(lib, sym);
}
// then try looking it up via the lookup symbol
if (!res && lookupFunction) {
res = lookupFunction(sym);
}
// finally just try finding it in the process
if (!res) {
- PRLibrary *leakedLibRef;
+ PRLibrary* leakedLibRef;
res = PR_FindFunctionSymbolAndLibrary(sym, &leakedLibRef);
}
return res;
}
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;
for (int i = 0; i < MAX_SYMBOL_NAMES; i++) {
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]);
s = sbuf;
}
PRFuncPtr p = LookupSymbol(lib, s, lookupFunction);
if (p) {
--- a/gfx/gl/GLLibraryLoader.h
+++ b/gfx/gl/GLLibraryLoader.h
@@ -16,52 +16,52 @@
#include "prlink.h"
namespace mozilla {
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,
MAX_SYMBOL_LENGTH = 128
};
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() {
mLibrary = nullptr;
mLookupFunc = nullptr;
}
- PRLibrary *mLibrary;
+ PRLibrary* mLibrary;
PlatformLookupFunction mLookupFunc;
};
} /* namespace gl */
} /* namespace mozilla */
#endif /* GLLIBRARYLOADER_H_ */
--- a/gfx/gl/GLScreenBuffer.h
+++ b/gfx/gl/GLScreenBuffer.h
@@ -241,17 +241,17 @@ public:
/**
* Attempts to read pixels from the current bound framebuffer, if
* it is backed by a SharedSurface.
*
* Returns true if the pixel data has been read back, false
* 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);
protected:
// Returns false on error or inability to resize.
bool Swap(const gfx::IntSize& size);
--- a/gfx/gl/GLTextureImage.cpp
+++ b/gfx/gl/GLTextureImage.cpp
@@ -70,17 +70,17 @@ TextureImage::Create(GLContext* gl,
TextureImage::ContentType contentType,
GLenum wrapMode,
TextureImage::Flags flags)
{
return CreateTextureImage(gl, size, contentType, wrapMode, flags);
}
bool
-TextureImage::UpdateFromDataSource(gfx::DataSourceSurface *aSurface,
+TextureImage::UpdateFromDataSource(gfx::DataSourceSurface* aSurface,
const nsIntRegion* aDestRegion,
const gfx::IntPoint* aSrcPoint)
{
nsIntRegion destRegion = aDestRegion ? *aDestRegion
: IntRect(0, 0,
aSurface->GetSize().width,
aSurface->GetSize().height);
gfx::IntPoint srcPoint = aSrcPoint ? *aSrcPoint
@@ -103,17 +103,17 @@ TextureImage::UpdateUploadSize(size_t am
GfxTexturesReporter::UpdateAmount(GfxTexturesReporter::MemoryFreed, mUploadSize);
}
mUploadSize = amount;
GfxTexturesReporter::UpdateAmount(GfxTexturesReporter::MemoryAllocated, mUploadSize);
}
BasicTextureImage::~BasicTextureImage()
{
- GLContext *ctx = mGLContext;
+ GLContext* ctx = mGLContext;
if (ctx->IsDestroyed() || !ctx->IsOwningThreadCurrent()) {
ctx = ctx->GetSharedContext();
}
// If we have a context, then we need to delete the texture;
// if we don't have a context (either real or shared),
// then they went away when the contex was deleted, because it
// was the only one that had access to it.
--- a/gfx/gl/GLTextureImage.h
+++ b/gfx/gl/GLTextureImage.h
@@ -164,17 +164,17 @@ public:
virtual void MarkValid() {}
/**
* aSurf - the source surface to update from
* aRegion - the region in this image to update
* 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);
virtual void BindTexture(GLenum aTextureUnit) = 0;
/**
* Returns the image format of the texture. Only valid after a matching
* BeginUpdate/EndUpdate pair have been called.
--- a/gfx/gl/GLTypes.h
+++ b/gfx/gl/GLTypes.h
@@ -69,24 +69,24 @@ typedef void (GLAPIENTRY *GLDEBUGPROC)(G
const GLchar* message,
const GLvoid* userParam);
// EGL types
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)
#define EGL_NO_DISPLAY ((EGLDisplay)0)
#define EGL_NO_SURFACE ((EGLSurface)0)
#define EGL_NO_CONFIG ((EGLConfig)nullptr)
#define EGL_NO_SYNC ((EGLSync)0)
#define EGL_NO_IMAGE ((EGLImage)0)
--- a/gfx/gl/GLUploadHelpers.cpp
+++ b/gfx/gl/GLUploadHelpers.cpp
@@ -76,18 +76,18 @@ static GLint GetAddressAlignment(ptrdiff
// padding out the edge pixels for filtering if necessary
static void
CopyAndPadTextureData(const GLvoid* srcBuffer,
GLvoid* dstBuffer,
GLsizei srcWidth, GLsizei srcHeight,
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);
rowDest += dstWidth * pixelsize;
source += stride;
}
GLsizei padHeight = srcHeight;
@@ -171,36 +171,36 @@ TexSubImage2DWithUnpackSubimageGLES(GLCo
gl->fTexSubImage2D(target,
level,
xoffset,
yoffset+height-1,
width,
1,
format,
type,
- (const unsigned char *)pixels+(height-1)*stride);
+ (const unsigned char*)pixels+(height-1)*stride);
gl->fPixelStorei(LOCAL_GL_UNPACK_ALIGNMENT, 4);
}
static void
TexSubImage2DWithoutUnpackSubimage(GLContext* gl,
GLenum target, GLint level,
GLint xoffset, GLint yoffset,
GLsizei width, GLsizei height,
GLsizei stride, GLint pixelsize,
GLenum format, GLenum type,
const GLvoid* pixels)
{
// Not using the whole row of texture data and GL_UNPACK_ROW_LENGTH
// 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;
rowSource += stride;
}
stride = width*pixelsize;
gl->fPixelStorei(LOCAL_GL_UNPACK_ALIGNMENT,
@@ -215,17 +215,17 @@ TexSubImage2DWithoutUnpackSubimage(GLCon
format,
type,
newPixels);
delete [] newPixels;
gl->fPixelStorei(LOCAL_GL_UNPACK_ALIGNMENT, 4);
}
static void
-TexSubImage2DHelper(GLContext *gl,
+TexSubImage2DHelper(GLContext* gl,
GLenum target, GLint level,
GLint xoffset, GLint yoffset,
GLsizei width, GLsizei height, GLsizei stride,
GLint pixelsize, GLenum format,
GLenum type, const GLvoid* pixels)
{
if (gl->IsGLES()) {
if (stride == width * pixelsize) {
@@ -269,21 +269,21 @@ TexSubImage2DHelper(GLContext *gl,
type,
pixels);
gl->fPixelStorei(LOCAL_GL_UNPACK_ROW_LENGTH, 0);
gl->fPixelStorei(LOCAL_GL_UNPACK_ALIGNMENT, 4);
}
}
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()) {
NS_ASSERTION(format == (GLenum)internalformat,
"format and internalformat not the same for glTexImage2D on GLES2");
if (!CanUploadNonPowerOfTwo(gl)
&& (stride != width * pixelsize
@@ -557,17 +557,17 @@ UploadImageDataToTexture(GLContext* gl,
*aOutUploadSize = 0;
}
for (auto iter = paintRegion.RectIter(); !iter.Done(); iter.Next()) {
const IntRect& rect = iter.Get();
// 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),
"Must be uploading to the origin when we don't have an existing texture");
if (textureInited && CanUploadSubTextures(gl)) {
TexSubImage2DHelper(gl,
aTextureTarget,
--- a/gfx/gl/GLUploadHelpers.h
+++ b/gfx/gl/GLUploadHelpers.h
@@ -66,17 +66,17 @@ UploadImageDataToTexture(GLContext* gl,
GLenum aTextureUnit = LOCAL_GL_TEXTURE0,
GLenum aTextureTarget = LOCAL_GL_TEXTURE_2D);
/**
* Convenience wrapper around UploadImageDataToTexture for gfx::DataSourceSurface's.
*/
gfx::SurfaceFormat
UploadSurfaceToTexture(GLContext* gl,
- gfx::DataSourceSurface *aSurface,
+ gfx::DataSourceSurface* aSurface,
const nsIntRegion& aDstRegion,
GLuint& aTexture,
size_t* aOutUploadSize = nullptr,
bool aNeedInit = false,
const gfx::IntPoint& aSrcPoint = gfx::IntPoint(0, 0),
bool aPixelBuffer = false,
GLenum aTextureUnit = LOCAL_GL_TEXTURE0,
GLenum aTextureTarget = LOCAL_GL_TEXTURE_2D);
--- a/gfx/gl/GLXLibrary.h
+++ b/gfx/gl/GLXLibrary.h
@@ -6,21 +6,21 @@
#ifndef GFX_GLXLIBRARY_H
#define GFX_GLXLIBRARY_H
#include "GLContextTypes.h"
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;
typedef XID GLXPbuffer;
// end of stuff from glx.h
#include "prenv.h"
struct PRLibrary;
@@ -62,69 +62,69 @@ public:
, mHasVideoSync(false)
, mIsATI(false), mIsNVIDIA(false)
, mClientIsMesa(false), mGLXMajorVersion(0)
, mGLXMinorVersion(0)
, mOGLLibrary(nullptr)
{}
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);
int xGetVideoSync(unsigned int* count);
int xWaitVideoSync(int divisor, int remainder, unsigned int* count);
bool EnsureInitialized();
@@ -138,109 +138,109 @@ public:
bool HasRobustness() { return mHasRobustness; }
bool HasCreateContextAttribs() { return mHasCreateContextAttribs; }
bool SupportsTextureFromPixmap(gfxASurface* aSurface);
bool SupportsVideoSync();
bool IsATI() { return mIsATI; }
bool GLXVersionCheck(int aMajor, int aMinor);
private:
-
+
typedef void (GLAPIENTRY * PFNGLXDESTROYCONTEXTPROC) (Display*,
GLXContext);
PFNGLXDESTROYCONTEXTPROC xDestroyContextInternal;
typedef Bool (GLAPIENTRY * PFNGLXMAKECURRENTPROC) (Display*,
GLXDrawable,
GLXContext);
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
void BeforeGLXCall();
void AfterGLXCall();
#endif
bool mInitialized;
@@ -250,17 +250,17 @@ private:
bool mHasRobustness;
bool mHasCreateContextAttribs;
bool mHasVideoSync;
bool mIsATI;
bool mIsNVIDIA;
bool mClientIsMesa;
int mGLXMajorVersion;
int mGLXMinorVersion;
- PRLibrary *mOGLLibrary;
+ PRLibrary* mOGLLibrary;
};
// a global GLXLibrary instance
extern GLXLibrary sGLXLibrary;
} /* namespace gl */
} /* namespace mozilla */
#endif /* GFX_GLXLIBRARY_H */
--- a/gfx/gl/SharedSurfaceIO.h
+++ b/gfx/gl/SharedSurfaceIO.h
@@ -38,27 +38,27 @@ public:
virtual void ProducerAcquireImpl() override {}
virtual void ProducerReleaseImpl() override;
virtual bool CopyTexImage2D(GLenum target, GLint level, GLenum internalformat,
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;
}
virtual GLenum ProdTextureTarget() const override {
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);
}
MacIOSurface* GetIOSurface() const {
return mIOSurf;
}
--- a/gfx/gl/TextureImageCGL.h
+++ b/gfx/gl/TextureImageCGL.h
@@ -34,25 +34,25 @@ protected:
private:
GLuint mPixelBuffer;
bool mBoundPixelBuffer;
};
already_AddRefed<TextureImage>
-CreateTextureImageCGL(GLContext *gl,
+CreateTextureImageCGL(GLContext* gl,
const gfx::IntSize& aSize,
TextureImage::ContentType aContentType,
GLenum aWrapMode,
TextureImage::Flags aFlags,
TextureImage::ImageFormat aImageFormat);
already_AddRefed<TextureImage>
-TileGenFuncCGL(GLContext *gl,
+TileGenFuncCGL(GLContext* gl,
const gfx::IntSize& aSize,
TextureImage::ContentType aContentType,
TextureImage::Flags aFlags);
} // namespace gl
} // namespace mozilla
#endif
--- a/gfx/gl/TextureImageCGL.mm
+++ b/gfx/gl/TextureImageCGL.mm
@@ -74,17 +74,17 @@ CreateTextureImageCGL(GLContext* gl,
return t.forget();
}
return CreateBasicTextureImage(gl, aSize, aContentType, aWrapMode,
aFlags);
}
already_AddRefed<TextureImage>
-TileGenFuncCGL(GLContext *gl,
+TileGenFuncCGL(GLContext* gl,
const IntSize& aSize,
TextureImage::ContentType aContentType,
TextureImage::Flags aFlags)
{
bool useNearestFilter = aFlags & TextureImage::UseNearestFilter;
gl->MakeCurrent();
GLuint texture;
--- a/gfx/gl/TextureImageEGL.cpp
+++ b/gfx/gl/TextureImageEGL.cpp
@@ -305,29 +305,29 @@ TextureImageEGL::DestroyEGLSurface(void)
if (!mSurface)
return;
sEGLLibrary.fDestroySurface(EGL_DISPLAY(), mSurface);
mSurface = nullptr;
}
already_AddRefed<TextureImage>
-CreateTextureImageEGL(GLContext *gl,
+CreateTextureImageEGL(GLContext* gl,
const gfx::IntSize& aSize,
TextureImage::ContentType aContentType,
GLenum aWrapMode,
TextureImage::Flags aFlags,
TextureImage::ImageFormat aImageFormat)
{
RefPtr<TextureImage> t = new gl::TiledTextureImage(gl, aSize, aContentType, aFlags, aImageFormat);
return t.forget();
}
already_AddRefed<TextureImage>
-TileGenFuncEGL(GLContext *gl,
+TileGenFuncEGL(GLContext* gl,
const gfx::IntSize& aSize,
TextureImage::ContentType aContentType,
TextureImage::Flags aFlags,
TextureImage::ImageFormat aImageFormat)
{
gl->MakeCurrent();
GLuint texture;
--- a/gfx/gl/TextureImageEGL.h
+++ b/gfx/gl/TextureImageEGL.h
@@ -73,25 +73,25 @@ protected:
EGLSurface mSurface;
EGLConfig mConfig;
TextureState mTextureState;
bool mBound;
};
already_AddRefed<TextureImage>
-CreateTextureImageEGL(GLContext *gl,
+CreateTextureImageEGL(GLContext* gl,
const gfx::IntSize& aSize,
TextureImage::ContentType aContentType,
GLenum aWrapMode,
TextureImage::Flags aFlags,
TextureImage::ImageFormat aImageFormat);
already_AddRefed<TextureImage>
-TileGenFuncEGL(GLContext *gl,
+TileGenFuncEGL(GLContext* gl,
const gfx::IntSize& aSize,
TextureImage::ContentType aContentType,
TextureImage::Flags aFlags,
TextureImage::ImageFormat aImageFormat);
} // namespace gl
} // namespace mozilla
--- a/gfx/gl/WGLLibrary.h
+++ b/gfx/gl/WGLLibrary.h
@@ -48,76 +48,76 @@ public:
typedef HDC (WINAPI * PFNWGLGETPBUFFERDCPROC) (HANDLE hPbuffer);
PFNWGLGETPBUFFERDCPROC fGetPbufferDC;
typedef BOOL (WINAPI * PFNWGLBINDTEXIMAGEPROC) (HANDLE hPbuffer, int iBuffer);
PFNWGLBINDTEXIMAGEPROC fBindTexImage;
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;
// BOOL wglDXCloseDeviceNV(HANDLE hDevice);
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;
// BOOL wglDXUnregisterObjectNV(HANDLE hDevice, HANDLE hObject);
typedef BOOL (WINAPI * PFNWGLDXUNREGISTEROBJECT) (HANDLE hDevice, HANDLE hObject);
PFNWGLDXUNREGISTEROBJECT fDXUnregisterObject;
// BOOL wglDXObjectAccessNV(HANDLE hObject, GLenum access);
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; }
bool HasDXInterop2() const { return mHasDXInterop2; }
bool IsInitialized() const { return mInitialized; }
HWND GetWindow() const { return mWindow; }
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;
HWND mWindow;
HDC mWindowDC;
HGLRC mWindowGLContext;
int mWindowPixelFormat;