[ros-bugs] [Bug 3082] draw/bitblt errors after CopyImage and StretchDIBits

ReactOS.Bugzilla at www.reactos.org ReactOS.Bugzilla at www.reactos.org
Tue Jul 8 21:54:46 CEST 2008


http://www.reactos.org/bugzilla/show_bug.cgi?id=3082


jimtabor <jimtabor at adsl-64-217-116-74.dsl.hstntx.swbell.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jimtabor at adsl-64-217-116-
                   |                            |74.dsl.hstntx.swbell.net




--- Comment #8 from jimtabor <jimtabor at adsl-64-217-116-74.dsl.hstntx.swbell.net>  2008-07-08 21:54:43 CET ---
Here is that patch GL was referring to:

Index: objects/dibobj.c
===================================================================
--- objects/dibobj.c    (revision 34369)
+++ objects/dibobj.c    (working copy)
@@ -1246,7 +1246,25 @@
  */
 INT FASTCALL DIB_GetDIBWidthBytes (INT width, INT depth)
 {
-  return ((width * depth + 31) & ~31) >> 3;
+//  return ((width * depth + 31) & ~31) >> 3;
+  int words;
+
+  switch(depth)
+  {
+     case 1:  words = (width + 31) / 32; break;
+     case 4:  words = (width + 7) / 8; break;
+     case 8:  words = (width + 3) / 4; break;
+     case 15:
+     case 16: words = (width + 1) / 2; break;
+     case 24: words = (width * 3 + 3)/4; break;
+
+     default:
+        DPRINT1("(%d): Unsupported depth\n", depth );
+    /* fall through */
+    case 32:
+        words = width;
+  }
+  return 4 * words;
 }


-- 
Configure bugmail: http://www.reactos.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the Ros-bugs mailing list