- In BITMAP_CopyBitmap, also "copy" the palette of the source bitmap, instead of assuming the one created by GreCreateBitmapEx matches the bitmap bits we have copied.
Fixes broken colors on the firefox firstrun page
See issue #5902 for more details.
svn path=/trunk/; revision=50902
- Bitmap = SURFACE_LockSurface(hBitmap);
+ Bitmap = SURFACE_ShareLockSurface(hBitmap);
if (Bitmap == NULL)
{
return 0;
if (Bitmap == NULL)
{
return 0;
- resBitmap = SURFACE_LockSurface(res);
+ resBitmap = SURFACE_ShareLockSurface(res);
if (resBitmap)
{
IntSetBitmapBits(resBitmap, Bitmap->SurfObj.cjBits, Bitmap->SurfObj.pvBits);
if (resBitmap)
{
IntSetBitmapBits(resBitmap, Bitmap->SurfObj.cjBits, Bitmap->SurfObj.pvBits);
- SURFACE_UnlockSurface(resBitmap);
+ GDIOBJ_IncrementShareCount(&Bitmap->ppal->BaseObject);
+ GDIOBJ_ShareUnlockObjByPtr(&resBitmap->ppal->BaseObject);
+ resBitmap->ppal = Bitmap->ppal;
+ SURFACE_ShareUnlockSurface(resBitmap);
- SURFACE_UnlockSurface(Bitmap);
+ SURFACE_ShareUnlockSurface(Bitmap);