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!
This commit is contained in:
@@ -135,6 +135,7 @@ round_up(unsigned n, unsigned multiple)
|
|||||||
return (n + multiple - 1) & ~(multiple - 1);
|
return (n + multiple - 1) & ~(multiple - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* winsys hooks */
|
/* winsys hooks */
|
||||||
|
|
||||||
|
|
||||||
@@ -251,8 +252,7 @@ GalliumContext::GalliumContext(ulong options)
|
|||||||
CALLED();
|
CALLED();
|
||||||
|
|
||||||
// Make all contexts a known value
|
// Make all contexts a known value
|
||||||
context_id i;
|
for (context_id i = 0; i < CONTEXT_MAX; i++)
|
||||||
for (i = 0; i < CONTEXT_MAX; i++)
|
|
||||||
fContext[i] = NULL;
|
fContext[i] = NULL;
|
||||||
|
|
||||||
CreateScreen();
|
CreateScreen();
|
||||||
@@ -267,8 +267,7 @@ GalliumContext::~GalliumContext()
|
|||||||
|
|
||||||
// Destroy our contexts
|
// Destroy our contexts
|
||||||
pipe_mutex_lock(fMutex);
|
pipe_mutex_lock(fMutex);
|
||||||
uint32 i;
|
for (context_id i = 0; i < CONTEXT_MAX; i++)
|
||||||
for (i = 0; i < CONTEXT_MAX; i++)
|
|
||||||
DestroyContext(i);
|
DestroyContext(i);
|
||||||
pipe_mutex_unlock(fMutex);
|
pipe_mutex_unlock(fMutex);
|
||||||
|
|
||||||
@@ -457,8 +456,7 @@ GalliumContext::CreateContext(Bitmap *bitmap)
|
|||||||
context_id contextNext = -1;
|
context_id contextNext = -1;
|
||||||
|
|
||||||
pipe_mutex_lock(fMutex);
|
pipe_mutex_lock(fMutex);
|
||||||
context_id i;
|
for (context_id i = 0; i < CONTEXT_MAX; i++) {
|
||||||
for (i = 0; i < CONTEXT_MAX; i++) {
|
|
||||||
if (fContext[i] == NULL) {
|
if (fContext[i] == NULL) {
|
||||||
fContext[i] = context;
|
fContext[i] = context;
|
||||||
contextNext = i;
|
contextNext = i;
|
||||||
|
|||||||
@@ -116,8 +116,10 @@ SoftwareRenderer::LockGL()
|
|||||||
|
|
||||||
BAutolock lock(fInfoLocker);
|
BAutolock lock(fInfoLocker);
|
||||||
if (fDirectModeEnabled && fInfo != NULL) {
|
if (fDirectModeEnabled && fInfo != NULL) {
|
||||||
fNewWidth = fInfo->window_bounds.right - fInfo->window_bounds.left;// + 1;
|
fNewWidth = fInfo->window_bounds.right - fInfo->window_bounds.left;
|
||||||
fNewHeight = fInfo->window_bounds.bottom - fInfo->window_bounds.top;// + 1;
|
// + 1;
|
||||||
|
fNewHeight = fInfo->window_bounds.bottom - fInfo->window_bounds.top;
|
||||||
|
// + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fBitmap && cs == fColorSpace && fNewWidth == fWidth
|
if (fBitmap && cs == fColorSpace && fNewWidth == fWidth
|
||||||
|
|||||||
Reference in New Issue
Block a user