summaryrefslogtreecommitdiff
path: root/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx')
-rw-r--r--src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx
index fc63f727a..4ad9d5509 100644
--- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx
+++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx
@@ -687,15 +687,16 @@ void Fl_GDI_Printer_Graphics_Driver::draw_pixmap(Fl_Pixmap *pxm, int XP, int YP,
void Fl_GDI_Graphics_Driver::cache(Fl_Pixmap *img) {
Fl_Image_Surface *surf = new Fl_Image_Surface(img->data_w(), img->data_h());
Fl_Surface_Device::push_current(surf);
- uchar *bitmap = 0;
- Fl_Surface_Device::surface()->driver()->mask_bitmap(&bitmap);
+ uchar **pbitmap = surf->driver()->mask_bitmap();
+ *pbitmap = 0;
fl_draw_pixmap(img->data(), 0, 0, FL_BLACK);
*Fl_Graphics_Driver::pixmap_bg_color(img) = Fl_WinAPI_System_Driver::win_pixmap_bg_color; // computed by fl_draw_pixmap()
- Fl_Surface_Device::surface()->driver()->mask_bitmap(0);
+ uchar *bitmap = *pbitmap;
if (bitmap) {
- *Fl_Graphics_Driver::mask(img) = (fl_uintptr_t)fl_create_bitmask(img->data_w(), img->data_h(), bitmap);
+ *Fl_Graphics_Driver::mask(img) = (fl_uintptr_t)create_bitmask(img->data_w(), img->data_h(), bitmap);
delete[] bitmap;
}
+ *pbitmap = 0;
Fl_Surface_Device::pop_current();
Fl_Offscreen id = surf->get_offscreen_before_delete();
delete surf;