diff options
author | Alexander von Gluck IV <[email protected]> | 2013-10-28 12:56:43 -0500 |
---|---|---|
committer | Alexander von Gluck IV <[email protected]> | 2013-10-29 15:27:43 -0500 |
commit | 9a9fb94ca99e05195f1faa747397bd26fb8f7cca (patch) | |
tree | 922ab460c563c6d69fee64f0827215b82f4c880d /src/gallium/targets/haiku-softpipe/SoftwareRenderer.cpp | |
parent | 439dd0e20a3ec5b95487d7ddeb0a8f91781b7b00 (diff) |
haiku-softpipe: Minor cleanup and color space fixes
* Use more consistant data sources
* Fix improper color space assignments
* Remove unnecessary comments and code
* Drop unnecessary round_up function (this was leftover
from moving winsys code out of renderer)
Acked-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/targets/haiku-softpipe/SoftwareRenderer.cpp')
-rw-r--r-- | src/gallium/targets/haiku-softpipe/SoftwareRenderer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/targets/haiku-softpipe/SoftwareRenderer.cpp b/src/gallium/targets/haiku-softpipe/SoftwareRenderer.cpp index ced22566a09..fa71dd764e0 100644 --- a/src/gallium/targets/haiku-softpipe/SoftwareRenderer.cpp +++ b/src/gallium/targets/haiku-softpipe/SoftwareRenderer.cpp @@ -116,9 +116,7 @@ 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; } if (fBitmap && cs == fColorSpace && fNewWidth == fWidth @@ -179,8 +177,10 @@ SoftwareRenderer::SwapBuffers(bool vsync) ERROR("%s: Bitmap size doesn't match size!\n", __func__); return; } - uint8 bytesPerPixel = fInfo->bits_per_pixel / 8; + uint32 bytesPerRow = fBitmap->BytesPerRow(); + uint8 bytesPerPixel = bytesPerRow / fBitmap->Bounds().IntegerWidth(); + for (uint32 i = 0; i < fInfo->clip_list_count; i++) { clipping_rect *clip = &fInfo->clip_list[i]; int32 height = clip->bottom - clip->top + 1; |