summaryrefslogtreecommitdiff
path: root/src/fl_draw_pixmap.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-02-25 10:14:28 +0000
committerManolo Gouy <Manolo>2016-02-25 10:14:28 +0000
commit31793cbdba8e318350c5ed11b06d5a678eb15608 (patch)
tree6663410ff80abfa841ebf30a9a7f75bffeb730ac /src/fl_draw_pixmap.cxx
parente24f3f79a334a501c9a239b32fe465981a8c3aab (diff)
Remove the global variable fl_mask_bitmap - put it in the graphics driver's virtual API.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11216 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_draw_pixmap.cxx')
-rw-r--r--src/fl_draw_pixmap.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fl_draw_pixmap.cxx b/src/fl_draw_pixmap.cxx
index 544965185..cf7bd5a72 100644
--- a/src/fl_draw_pixmap.cxx
+++ b/src/fl_draw_pixmap.cxx
@@ -70,7 +70,6 @@ int fl_measure_pixmap(const char * const *cdata, int &w, int &h) {
return 1;
}
-uchar **fl_mask_bitmap; // if non-zero, create bitmap and store pointer here
/**
Draw XPM image data, with the top-left corner at the given position.
@@ -256,10 +255,11 @@ int fl_draw_pixmap(const char*const* cdata, int x, int y, Fl_Color bg) {
}
// build the mask bitmap used by Fl_Pixmap:
- if (fl_mask_bitmap) {
+ uchar **p = fl_graphics_driver->mask_bitmap();
+ if (p) {
int W = (w+7)/8;
uchar* bitmap = new uchar[W * h];
- *fl_mask_bitmap = bitmap;
+ *p = bitmap;
const uchar *p = &buffer[3];
uchar b = 0;
for (int Y = 0; Y < h; Y++) {