mesa: Always check color space before deciding to reconfigure

* Gives a slight performance boost
* Variable name cleanup
This commit is contained in:
Alexander von Gluck IV
2012-01-12 17:54:03 -06:00
parent 3df3057e3c
commit 0c99c75edf
@@ -366,19 +366,18 @@ MesaSoftwareRenderer::LockGL()
_mesa_make_current(fContext, &fFrameBuffer->base, &fFrameBuffer->base); _mesa_make_current(fContext, &fFrameBuffer->base, &fFrameBuffer->base);
color_space cs = B_RGBA32; color_space colorSpace = BScreen(GLView()->Window()).ColorSpace();
BAutolock lock(fInfoLocker); BAutolock lock(fInfoLocker);
if (fDirectModeEnabled && fInfo != NULL) { if (fDirectModeEnabled && fInfo != NULL) {
cs = BScreen(GLView()->Window()).ColorSpace();
fNewWidth = fInfo->window_bounds.right fNewWidth = fInfo->window_bounds.right
- fInfo->window_bounds.left + 1; - fInfo->window_bounds.left + 1;
fNewHeight = fInfo->window_bounds.bottom fNewHeight = fInfo->window_bounds.bottom
- fInfo->window_bounds.top + 1; - fInfo->window_bounds.top + 1;
} }
if (cs != fColorSpace) { if (fColorSpace != colorSpace) {
fColorSpace = cs; fColorSpace = colorSpace;
_SetupRenderBuffer(fFrontRenderBuffer, fColorSpace); _SetupRenderBuffer(fFrontRenderBuffer, fColorSpace);
if (fBackRenderBuffer->active) if (fBackRenderBuffer->active)
_SetupRenderBuffer(fBackRenderBuffer, fColorSpace); _SetupRenderBuffer(fBackRenderBuffer, fColorSpace);