diff --git a/src/add-ons/opengl/swpipe/GalliumContext.cpp b/src/add-ons/opengl/swpipe/GalliumContext.cpp index 6cc01988cf..0ebc1113fd 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 2644d17539..77cd669742 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);