diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-04-23 10:03:02 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-04-23 10:03:02 +0200 |
| commit | 4bf9172a8e4f76842a2e011671cf5c057e8fe1d1 (patch) | |
| tree | 1c87724b15d5166a6c6f62204f5de2d3e4ac8dd0 /src/drivers/Cocoa | |
| parent | 897a6910b60ad8331ddb451d9dbc6c62da2b4657 (diff) | |
Replace internal fl_create_offscreen() calls by new Fl_Image_Surface
Diffstat (limited to 'src/drivers/Cocoa')
| -rw-r--r-- | src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx b/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx index 4d3c3ab3d..e479a4d8b 100644 --- a/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx +++ b/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx @@ -54,20 +54,18 @@ void Fl_Cocoa_Window_Driver::flush_overlay() if (!oWindow->shown()) return; pWindow->make_current(); // make sure fl_gc is non-zero if (!other_xid) { - other_xid = fl_create_offscreen(oWindow->w(), oWindow->h()); + other_xid = new Fl_Image_Surface(oWindow->w(), oWindow->h(), 1); oWindow->clear_damage(FL_DAMAGE_ALL); } if (oWindow->damage() & ~FL_DAMAGE_EXPOSE) { Fl_X *myi = Fl_X::flx(pWindow); fl_clip_region(myi->region); myi->region = 0; - fl_begin_offscreen(other_xid); + Fl_Surface_Device::push_current(other_xid); draw(); - fl_end_offscreen(); + Fl_Surface_Device::pop_current(); } if (erase_overlay) fl_clip_region(0); - if (other_xid) { - fl_copy_offscreen(0, 0, oWindow->w(), oWindow->h(), other_xid, 0, 0); - } + fl_copy_offscreen(0, 0, oWindow->w(), oWindow->h(), other_xid->offscreen(), 0, 0); if (overlay() == oWindow) oWindow->draw_overlay(); } |
