summaryrefslogtreecommitdiff
path: root/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx')
-rw-r--r--src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx
index ca3d74734..00d96ea42 100644
--- a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx
+++ b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx
@@ -251,12 +251,11 @@ static void pmProviderRelease (void *ctxt, const void *data, size_t size) {
}
fl_uintptr_t Fl_Quartz_Graphics_Driver::cache(Fl_Pixmap *img, int w, int h, const char *const*data) {
- Fl_Surface_Device *old = Fl_Surface_Device::surface();
Fl_Image_Surface *surf = new Fl_Image_Surface(w, h);
- surf->set_current();
+ Fl_Surface_Device::push_current(surf);
fl_draw_pixmap(data, 0, 0, FL_BLACK);
CGContextRef src = surf->get_offscreen_before_delete();
- old->set_current();
+ Fl_Surface_Device::pop_current();
delete surf;
void *cgdata = CGBitmapContextGetData(src);
int sw = CGBitmapContextGetWidth(src);