[Bf-blender-cvs] [6c450f5] soc-2014-viewport_context: Cleanup: whitespace
Campbell Barton
noreply at git.blender.org
Thu Jul 24 14:57:23 CEST 2014
Commit: 6c450f57dbae0d95d355b9af54e7c03919d234fe
Author: Campbell Barton
Date: Thu Jul 24 22:56:58 2014 +1000
Branches: soc-2014-viewport_context
https://developer.blender.org/rB6c450f57dbae0d95d355b9af54e7c03919d234fe
Cleanup: whitespace
===================================================================
M intern/ghost/intern/GHOST_Context.h
M intern/ghost/intern/GHOST_ContextCGL.mm
M intern/ghost/intern/GHOST_ContextEGL.cpp
M intern/ghost/intern/GHOST_ContextGLX.cpp
M intern/ghost/intern/GHOST_ContextNone.cpp
M intern/ghost/intern/GHOST_ContextWGL.cpp
===================================================================
diff --git a/intern/ghost/intern/GHOST_Context.h b/intern/ghost/intern/GHOST_Context.h
index 511dfa1..d845796 100644
--- a/intern/ghost/intern/GHOST_Context.h
+++ b/intern/ghost/intern/GHOST_Context.h
@@ -155,9 +155,7 @@ GLenum glew_chk(GLenum error, const char *file, int line, const char *text);
#endif
-
#ifdef _WIN32
-
bool win32_chk(bool result, const char *file = NULL, int line = 0, const char *text = NULL);
# ifndef NDEBUG
@@ -165,8 +163,7 @@ bool win32_chk(bool result, const char *file = NULL, int line = 0, const char *t
# else
# define WIN32_CHK(x) win32_chk(x)
# endif
-
-#endif
+#endif /* _WIN32 */
#define _CASE_CODE_RETURN_STR(code) case code: return #code;
diff --git a/intern/ghost/intern/GHOST_ContextCGL.mm b/intern/ghost/intern/GHOST_ContextCGL.mm
index 491d7a9..711258a 100644
--- a/intern/ghost/intern/GHOST_ContextCGL.mm
+++ b/intern/ghost/intern/GHOST_ContextCGL.mm
@@ -39,11 +39,9 @@
#endif
#include <vector>
-
#include <cassert>
-
NSOpenGLContext *GHOST_ContextCGL::s_sharedOpenGLContext = nil;
int GHOST_ContextCGL::s_sharedCount = 0;
@@ -73,7 +71,6 @@ GHOST_ContextCGL::GHOST_ContextCGL(
}
-
GHOST_ContextCGL::~GHOST_ContextCGL()
{
if (m_openGLContext != nil) {
@@ -95,7 +92,6 @@ GHOST_ContextCGL::~GHOST_ContextCGL()
}
-
GHOST_TSuccess GHOST_ContextCGL::swapBuffers()
{
if (m_openGLContext != nil) {
@@ -110,7 +106,6 @@ GHOST_TSuccess GHOST_ContextCGL::swapBuffers()
}
-
GHOST_TSuccess GHOST_ContextCGL::setSwapInterval(int interval)
{
if (m_openGLContext != nil) {
@@ -125,7 +120,6 @@ GHOST_TSuccess GHOST_ContextCGL::setSwapInterval(int interval)
}
-
GHOST_TSuccess GHOST_ContextCGL::getSwapInterval(int &intervalOut)
{
if (m_openGLContext != nil) {
@@ -147,7 +141,6 @@ GHOST_TSuccess GHOST_ContextCGL::getSwapInterval(int &intervalOut)
}
-
GHOST_TSuccess GHOST_ContextCGL::activateDrawingContext()
{
if (m_openGLContext != nil) {
@@ -165,7 +158,6 @@ GHOST_TSuccess GHOST_ContextCGL::activateDrawingContext()
}
-
GHOST_TSuccess GHOST_ContextCGL::updateDrawingContext()
{
if (m_openGLContext != nil) {
@@ -180,7 +172,6 @@ GHOST_TSuccess GHOST_ContextCGL::updateDrawingContext()
}
-
static void makeAttribList(
std::vector<NSOpenGLPixelFormatAttribute>& attribs,
bool stereoVisual,
@@ -246,7 +237,6 @@ static void makeAttribList(
}
-
GHOST_TSuccess GHOST_ContextCGL::initializeDrawingContext()
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
@@ -351,7 +341,6 @@ error:
}
-
GHOST_TSuccess GHOST_ContextCGL::releaseNativeHandles()
{
GHOST_TSuccess success = ((m_openGLContext != s_sharedOpenGLContext) ||
diff --git a/intern/ghost/intern/GHOST_ContextEGL.cpp b/intern/ghost/intern/GHOST_ContextEGL.cpp
index af1405a..d935816 100644
--- a/intern/ghost/intern/GHOST_ContextEGL.cpp
+++ b/intern/ghost/intern/GHOST_ContextEGL.cpp
@@ -127,7 +127,6 @@ static const char *get_egl_error_message_string(EGLenum error)
}
-
static bool egl_chk(bool result, const char *file = NULL, int line = 0, const char *text = NULL)
{
if (!result) {
@@ -161,7 +160,6 @@ static bool egl_chk(bool result, const char *file = NULL, int line = 0, const ch
#endif
-
static inline bool bindAPI(EGLenum api)
{
if (eglewContext != NULL && EGLEW_VERSION_1_2)
@@ -171,13 +169,11 @@ static inline bool bindAPI(EGLenum api)
}
-
#if defined(WITH_GL_ANGLE)
HMODULE GHOST_ContextEGL::s_d3dcompiler = NULL;
#endif
-
EGLContext GHOST_ContextEGL::s_gl_sharedContext = EGL_NO_CONTEXT;
EGLint GHOST_ContextEGL::s_gl_sharedCount = 0;
@@ -206,7 +202,6 @@ T &choose_api(EGLenum api, T &a, T &b, T &c)
}
-
GHOST_ContextEGL::GHOST_ContextEGL(
bool stereoVisual,
GHOST_TUns16 numOfAASamples,
@@ -240,7 +235,6 @@ GHOST_ContextEGL::GHOST_ContextEGL(
}
-
GHOST_ContextEGL::~GHOST_ContextEGL()
{
if (m_display != EGL_NO_DISPLAY) {
@@ -274,14 +268,12 @@ GHOST_ContextEGL::~GHOST_ContextEGL()
}
-
GHOST_TSuccess GHOST_ContextEGL::swapBuffers()
{
return EGL_CHK(::eglSwapBuffers(m_display, m_surface)) ? GHOST_kSuccess : GHOST_kFailure;
}
-
GHOST_TSuccess GHOST_ContextEGL::setSwapInterval(int interval)
{
if (EGLEW_VERSION_1_1) {
@@ -300,7 +292,6 @@ GHOST_TSuccess GHOST_ContextEGL::setSwapInterval(int interval)
}
-
GHOST_TSuccess GHOST_ContextEGL::getSwapInterval(int &intervalOut)
{
intervalOut = m_swap_interval; // XXX jwilkins: make sure there is no way to query this?
@@ -309,7 +300,6 @@ GHOST_TSuccess GHOST_ContextEGL::getSwapInterval(int &intervalOut)
}
-
GHOST_TSuccess GHOST_ContextEGL::activateDrawingContext()
{
if (m_display) {
@@ -326,7 +316,6 @@ GHOST_TSuccess GHOST_ContextEGL::activateDrawingContext()
}
-
void GHOST_ContextEGL::initContextEGLEW()
{
eglewContext = new EGLEWContext;
@@ -339,7 +328,6 @@ void GHOST_ContextEGL::initContextEGLEW()
}
-
static std::set<std::string> split(const std::string s, char delim = ' ')
{
std::set<std::string> elems;
@@ -353,7 +341,6 @@ static std::set<std::string> split(const std::string s, char delim = ' ')
}
-
static const std::string &api_string(EGLenum api)
{
static const std::string a("OpenGL");
@@ -636,7 +623,6 @@ error:
}
-
GHOST_TSuccess GHOST_ContextEGL::releaseNativeHandles()
{
m_nativeWindow = NULL;
diff --git a/intern/ghost/intern/GHOST_ContextGLX.cpp b/intern/ghost/intern/GHOST_ContextGLX.cpp
index f8ac809..38d6e61 100644
--- a/intern/ghost/intern/GHOST_ContextGLX.cpp
+++ b/intern/ghost/intern/GHOST_ContextGLX.cpp
@@ -41,16 +41,13 @@
#include <cstring>
-
GLXEWContext *glxewContext = NULL;
-
GLXContext GHOST_ContextGLX::s_sharedContext = None;
int GHOST_ContextGLX::s_sharedCount = 0;
-
GHOST_ContextGLX::GHOST_ContextGLX(
bool stereoVisual,
GHOST_TUns16 numOfAASamples,
@@ -78,7 +75,6 @@ GHOST_ContextGLX::GHOST_ContextGLX(
}
-
GHOST_ContextGLX::~GHOST_ContextGLX()
{
if (m_display != NULL) {
@@ -107,7 +103,6 @@ GHOST_ContextGLX::~GHOST_ContextGLX()
}
-
GHOST_TSuccess GHOST_ContextGLX::swapBuffers()
{
::glXSwapBuffers(m_display, m_window);
@@ -116,7 +111,6 @@ GHOST_TSuccess GHOST_ContextGLX::swapBuffers()
}
-
GHOST_TSuccess GHOST_ContextGLX::activateDrawingContext()
{
if (m_display) {
@@ -131,7 +125,6 @@ GHOST_TSuccess GHOST_ContextGLX::activateDrawingContext()
}
-
void GHOST_ContextGLX::initContextGLXEW()
{
glxewContext = new GLXEWContext;
@@ -144,7 +137,6 @@ void GHOST_ContextGLX::initContextGLXEW()
}
-
GHOST_TSuccess GHOST_ContextGLX::initializeDrawingContext()
{
/* Set up the minimum atrributes that we require and see if
@@ -307,7 +299,6 @@ GHOST_TSuccess GHOST_ContextGLX::initializeDrawingContext()
}
-
GHOST_TSuccess GHOST_ContextGLX::releaseNativeHandles()
{
m_window = 0;
@@ -329,7 +320,6 @@ GHOST_TSuccess GHOST_ContextGLX::setSwapInterval(int interval)
}
-
GHOST_TSuccess GHOST_ContextGLX::getSwapInterval(int &intervalOut)
{
if (GLXEW_EXT_swap_control) {
diff --git a/intern/ghost/intern/GHOST_ContextNone.cpp b/intern/ghost/intern/GHOST_ContextNone.cpp
index 528376a..8685cda 100644
--- a/intern/ghost/intern/GHOST_ContextNone.cpp
+++ b/intern/ghost/intern/GHOST_ContextNone.cpp
@@ -33,42 +33,36 @@
#include "GHOST_ContextNone.h"
-
GHOST_TSuccess GHOST_ContextNone::swapBuffers()
{
return GHOST_kSuccess;
}
-
GHOST_TSuccess GHOST_ContextNone::activateDrawingContext()
{
return GHOST_kSuccess;
}
-
GHOST_TSuccess GHOST_ContextNone::updateDrawingContext()
{
return GHOST_kSuccess;
}
-
GHOST_TSuccess GHOST_ContextNone::initializeDrawingContext()
{
return GHOST_kSuccess;
}
-
GHOST_TSuccess GHOST_ContextNone::releaseNativeHandles()
{
return GHOST_kSuccess;
}
-
GHOST_TSuccess GHOST_ContextNone::setSwapInterval(int interval)
{
m_swapInterval = interval;
@@ -77,7 +71,6 @@ GHOST_TSuccess GHOST_ContextNone::setSwapInterval(int interval)
}
-
GHOST_TSuccess GHOST_ContextNone::getSwapInterval(int &intervalOut)
{
intervalOut = m_swapInterval;
diff --git a/intern/ghost/intern/GHOST_ContextWGL.cpp b/intern/ghost/intern/GHOST_ContextWGL.cpp
index a8be185..7dcc82d 100644
--- a/intern/ghost/intern/GHOST_ContextWGL.cpp
+++ b/intern/ghost/intern/GHOST_ContextWGL.cpp
@@ -41,14 +41,12 @@
WGLEWContext *wglewContext = NULL;
-
HGLRC GHOST_ContextWGL::s_sharedHGLRC = NULL;
int GHOST_ContextWGL::s_sharedCount = 0;
bool GHOST_ContextWGL::s_singleContextMode = false;
-
/* Intel videocards don't work fine with multiple contexts and
* have to share the same context for all windows.
* But if we just share context for all windows it could work incorrect
@@ -60,7 +58,6 @@ static bool is_crappy_intel_card()
}
-
GHOST_ContextWGL::GHOST_ContextWGL(
bool stereoVisual,
GHOST_TUns16 numOfAASamples,
@@ -93,7 +90,6 @@ GHOST_ContextWGL::GHOST_ContextWGL(
}
-
GHOST_ContextWGL::~GHOST_ContextWGL()
{
if (m_hGLRC != NULL) {
@@ -122,14 +118,12 @@ GHOST_ContextWGL::~GHOST_ContextWGL()
}
-
GHOST_TSuccess GHOST_ContextWGL::swapBuffers()
{
return WIN32_CHK(::SwapBuffers(m_hDC)) ? GHOST_kSuccess : GHOST_kFailure;
}
-
GHOST_TSuccess GHOST_ContextWGL::setSwapInterval(int interval)
{
if (WGLEW_EXT_swap_control)
@@ -139,7 +133,6 @@ GHOST_TSuccess GHOST_ContextWGL::setSwapInterval(int interval)
}
-
GHOST_TSuccess GHOST_ContextWGL::getSwapInterval(int &intervalOut)
{
if (WGLEW_EXT_swap_control) {
@@ -152,7 +145,6 @@ GHOST_TSuccess GHOST_ContextWGL::getSwapInterval(int &intervalOut)
}
-
GHOST_TSuccess GHOST_ContextWGL::activateDrawingContext()
{
if (WIN32_CHK(::wglMakeCurrent(m_hDC, m_hGLRC))) {
@@ -165,10 +157,9 @@ GHOST_TSuccess GHOST_ContextWGL::activateDrawingContext()
}
-
/* Ron Fosner's code for weighting pixel formats and forcing software.
- * See http://www.opengl.org/resources/faq/technical/weight.cpp */
-
+ * See http://www.opengl.org/resources/faq/technical/weight.cpp
+ */
static int weight_pixel_format(PIXELFORMATDESCRIPTOR &pfd)
{
int weight = 0;
@@ -213,7 +204,6 @@ static int weight_pixel_format(PIXELFORMATDESCRIPTOR &pfd)
}
-
/*
* A modification of Ro
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list