summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Fl_Gl_Device_Plugin.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/Fl_Gl_Device_Plugin.cxx b/src/Fl_Gl_Device_Plugin.cxx
index fd428c96f..f5e24585a 100644
--- a/src/Fl_Gl_Device_Plugin.cxx
+++ b/src/Fl_Gl_Device_Plugin.cxx
@@ -19,7 +19,6 @@
#include "config_lib.h"
#include <FL/Fl_Gl_Window.H>
#include <FL/Fl_RGB_Image.H>
-#include <FL/Fl_Shared_Image.H>
#include "drivers/OpenGL/Fl_OpenGL_Display_Device.H"
@@ -35,10 +34,9 @@ public:
Fl_Gl_Window *glw = w->as_gl_window();
if (!glw) return 0;
Fl_RGB_Image *img = Fl_OpenGL_Display_Device::capture_gl_rectangle(glw, 0, 0, glw->w(), glw->h());
- Fl_Shared_Image *shared = Fl_Shared_Image::get(img);
- shared->scale(glw->w(), glw->h());
- shared->draw(x, y);
- shared->release();
+ img->scale(glw->w(), glw->h());
+ img->draw(x, y);
+ delete img;
return 1;
}
virtual Fl_RGB_Image* rectangle_capture(Fl_Widget *widget, int x, int y, int w, int h) {