From b034a8a36cb8a141c484136cc33ef7a53c37f828 Mon Sep 17 00:00:00 2001 From: Rudolf Cornelissen Date: Tue, 2 May 2006 13:33:22 +0000 Subject: [PATCH] added relaying updated bytes_per_row to BBitmap's properties in case a bitmap was created in the graphics memory (ie: overlay bitmaps). Now not only a bitmap's size is updated, but also the bytes_per_row property itself. Axel, please review and correct as needed. Thanks. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17295 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/Bitmap.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/kits/interface/Bitmap.cpp b/src/kits/interface/Bitmap.cpp index 66035e3192..0cfffddfdc 100644 --- a/src/kits/interface/Bitmap.cpp +++ b/src/kits/interface/Bitmap.cpp @@ -979,6 +979,8 @@ BBitmap::_InitObject(BRect bounds, color_space colorSpace, uint32 flags, // the base pointer will now point to an overlay_client_data structure link.Read(&fBytesPerRow); size = fBytesPerRow * (bounds.IntegerHeight() + 1); + // bytes_per_row might be modified to match hardware constraints + bytesPerRow = fBytesPerRow; } if (fServerArea >= B_OK) {