summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2017-12-19 12:56:24 +0000
committerManolo Gouy <Manolo>2017-12-19 12:56:24 +0000
commit5a579962a627a258e725e3b51652f8fe45359619 (patch)
tree0dc1b8be441be7745720f1cee9908a8b84ccafa2 /src
parent52d4fef69839d1aa3e843a281c739b46d78a0330 (diff)
Fix Fl_GDI_Graphics_Driver::uncache(Fl_RGB_Image*,...) that did not delete correctly the cached offscreen object.
This bug was detected by a test program that rotates an SVG image. But it's not related to SVG, and concerns any Fl_RGB_Image on the WIN32 platform. It was introduced when image support was modified according to the driver model. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12600 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Graphics_Driver.cxx1
-rw-r--r--src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx4
2 files changed, 2 insertions, 3 deletions
diff --git a/src/Fl_Graphics_Driver.cxx b/src/Fl_Graphics_Driver.cxx
index eb3c48c27..ea330f17a 100644
--- a/src/Fl_Graphics_Driver.cxx
+++ b/src/Fl_Graphics_Driver.cxx
@@ -181,7 +181,6 @@ int Fl_Graphics_Driver::start_image(Fl_Image *img, int XP, int YP, int WP, int H
/** Support function for image drawing */
void Fl_Graphics_Driver::uncache_pixmap(fl_uintptr_t p) {
- fl_delete_offscreen((Fl_Offscreen)p);
}
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx
index 350381d9e..e6d471b0b 100644
--- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx
+++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx
@@ -3,7 +3,7 @@
//
// WIN32 image drawing code for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2016 by Bill Spitzak and others.
+// Copyright 1998-2017 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -559,7 +559,7 @@ int Fl_GDI_Graphics_Driver::draw_scaled(Fl_Image *img, int XP, int YP, int WP, i
void Fl_GDI_Graphics_Driver::uncache(Fl_RGB_Image*, fl_uintptr_t &id_, fl_uintptr_t &mask_)
{
if (id_) {
- fl_delete_offscreen((Fl_Offscreen)id_);
+ DeleteObject((Fl_Offscreen)id_);
id_ = 0;
}