mesa: Always check color space before deciding to reconfigure
* Gives a slight performance boost * Variable name cleanup
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user