summaryrefslogtreecommitdiff
path: root/src/Fl_PostScript.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2015-07-24 22:17:36 +0000
committerManolo Gouy <Manolo>2015-07-24 22:17:36 +0000
commita3e48a4afd6e0749da300b4a1728dd79b4627b84 (patch)
treed8e67bde9a33377ebb14a0dd98f035fdd675b211 /src/Fl_PostScript.cxx
parent80402f622c06196c0cc27fb2e0f0d2b9bf275796 (diff)
Use -(NSGraphicsContext*)[NSWindow graphicsContext] to obtain the adequate
graphics context to draw to a window. This requires Mac OS 10.4. The advantage is that it is possible for a secondary thread to call Fl_Window::make_current() without needing to create an autorelease pool. We save the native graphics state, and also the state with origin at top. Fl_X::q_release_context() restores the graphics state twice to return to the native state. This allows to use a single graphics context for a single window and a single thread. Under 10.3, we have to create a new NSGraphicsContext when Fl_Window::make_current() is called directly, so that secondary threads cannot call Fl_Window::make_current() without having created an autorelease pool. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10816 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_PostScript.cxx')
0 files changed, 0 insertions, 0 deletions