[haiku-commits] haiku: hrev44918 - src/add-ons/opengl/swpipe

  • From: kallisti5@xxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 28 Nov 2012 16:25:22 +0100 (CET)

hrev44918 adds 1 changeset to branch 'master'
old head: b8bb5c500a84a25f7254902642e9f457ab5faa4d
new head: 47038ab6ef2f355cea100b2e9662bf4d181a996e
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=47038ab+%5Eb8bb5c5

----------------------------------------------------------------------------

47038ab: swpipe: General cleanup
  
  * Ensure context_id type is used constantly
  * Put typedef of var in for loops in statement
  * Clean up a few lines over 80
  * Thanks korli!

                          [ Alexander von Gluck IV <kallisti5@xxxxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev44918
Commit:      47038ab6ef2f355cea100b2e9662bf4d181a996e
URL:         http://cgit.haiku-os.org/haiku/commit/?id=47038ab
Author:      Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
Date:        Wed Nov 28 15:23:36 2012 UTC

----------------------------------------------------------------------------

2 files changed, 11 insertions(+), 11 deletions(-)
src/add-ons/opengl/swpipe/GalliumContext.cpp   | 12 +++++-------
src/add-ons/opengl/swpipe/SoftwareRenderer.cpp | 10 ++++++----

----------------------------------------------------------------------------

diff --git a/src/add-ons/opengl/swpipe/GalliumContext.cpp 
b/src/add-ons/opengl/swpipe/GalliumContext.cpp
index 6cc0198..0ebc111 100644
--- a/src/add-ons/opengl/swpipe/GalliumContext.cpp
+++ b/src/add-ons/opengl/swpipe/GalliumContext.cpp
@@ -135,6 +135,7 @@ round_up(unsigned n, unsigned multiple)
        return (n + multiple - 1) & ~(multiple - 1);
 }
 
+
 /* winsys hooks */
 
 
@@ -251,8 +252,7 @@ GalliumContext::GalliumContext(ulong options)
        CALLED();
 
        // Make all contexts a known value
-       context_id i;
-       for (i = 0; i < CONTEXT_MAX; i++)
+       for (context_id i = 0; i < CONTEXT_MAX; i++)
                fContext[i] = NULL;
 
        CreateScreen();
@@ -267,8 +267,7 @@ GalliumContext::~GalliumContext()
 
        // Destroy our contexts
        pipe_mutex_lock(fMutex);
-       uint32 i;
-       for (i = 0; i < CONTEXT_MAX; i++)
+       for (context_id i = 0; i < CONTEXT_MAX; i++)
                DestroyContext(i);
        pipe_mutex_unlock(fMutex);
 
@@ -457,8 +456,7 @@ GalliumContext::CreateContext(Bitmap *bitmap)
        context_id contextNext = -1;
 
        pipe_mutex_lock(fMutex);
-       context_id i;
-       for (i = 0; i < CONTEXT_MAX; i++) {
+       for (context_id i = 0; i < CONTEXT_MAX; i++) {
                if (fContext[i] == NULL) {
                        fContext[i] = context;
                        contextNext = i;
@@ -558,7 +556,7 @@ status_t
 GalliumContext::SwapBuffers(context_id contextID)
 {
        CALLED();
-       
+
        pipe_mutex_lock(fMutex);
        struct hgl_context *context = fContext[contextID];
        pipe_mutex_unlock(fMutex);
diff --git a/src/add-ons/opengl/swpipe/SoftwareRenderer.cpp 
b/src/add-ons/opengl/swpipe/SoftwareRenderer.cpp
index 2644d17..77cd669 100644
--- a/src/add-ons/opengl/swpipe/SoftwareRenderer.cpp
+++ b/src/add-ons/opengl/swpipe/SoftwareRenderer.cpp
@@ -75,7 +75,7 @@ SoftwareRenderer::SoftwareRenderer(BGLView *view, ulong 
options,
        fHeight = (GLint)b.IntegerHeight();
        fNewWidth = fWidth;
        fNewHeight = fHeight;
-       
+
        _AllocateBitmap();
 
        // Initialize the first "Haiku Software GL Pipe" context
@@ -116,8 +116,10 @@ SoftwareRenderer::LockGL()
 
        BAutolock lock(fInfoLocker);
        if (fDirectModeEnabled && fInfo != NULL) {
-               fNewWidth = fInfo->window_bounds.right - 
fInfo->window_bounds.left;// + 1;
-               fNewHeight = fInfo->window_bounds.bottom - 
fInfo->window_bounds.top;// + 1;
+               fNewWidth = fInfo->window_bounds.right - 
fInfo->window_bounds.left;
+                       // + 1;
+               fNewHeight = fInfo->window_bounds.bottom - 
fInfo->window_bounds.top;
+                       // + 1;
        }
 
        if (fBitmap && cs == fColorSpace && fNewWidth == fWidth
@@ -153,7 +155,7 @@ SoftwareRenderer::SwapBuffers(bool vsync)
 //     CALLED();
        if (!fBitmap)
                return;
-               
+
        BScreen screen(GLView()->Window());
 
        fContextObj->SwapBuffers(fContextID);


Other related posts:

  • » [haiku-commits] haiku: hrev44918 - src/add-ons/opengl/swpipe - kallisti5