summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-02-14 06:19:26 +0000
committerManolo Gouy <Manolo>2016-02-14 06:19:26 +0000
commit6439f34ee7d84dae786c73388c4bae54f31c65e4 (patch)
tree386ec98878205a1310e9c303c7328762a89226e9 /src
parenta349dc994e686e99338e4b9b8aaf07fd1921e51d (diff)
Remove Fl_X::q_clear_clipping() used only once.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11170 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_cocoa.mm8
-rw-r--r--src/drivers/Quartz/Fl_Quartz_Graphics_Driver_rect.cxx5
2 files changed, 4 insertions, 9 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index a4d3d499d..6c52ccb98 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -3325,14 +3325,6 @@ void Fl_X::q_fill_context() {
fl_quartz_restore_line_style_();
}
-// The only way to reset clipping to its original state is to pop the current graphics
-// state and restore the global state.
-void Fl_X::q_clear_clipping() {
- if (!fl_gc) return;
- CGContextRestoreGState(fl_gc);
- CGContextSaveGState(fl_gc);
-}
-
// Give the Quartz context back to the system
void Fl_X::q_release_context(Fl_X *x) {
if (x && x->gc!=fl_gc) return;
diff --git a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_rect.cxx b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_rect.cxx
index 686c66e5d..f06ef6f3d 100644
--- a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_rect.cxx
+++ b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_rect.cxx
@@ -269,7 +269,10 @@ void Fl_Quartz_Graphics_Driver::restore_clip() {
fl_clip_state_number++;
Fl_Region r = rstack[rstackptr];
if ( fl_window || fl_gc ) { // clipping for a true window or an offscreen buffer
- Fl_X::q_clear_clipping();
+ if (fl_gc) {
+ CGContextRestoreGState(fl_gc);
+ CGContextSaveGState(fl_gc);
+ }
Fl_X::q_fill_context();//flip coords if bitmap context
//apply program clip
if (r) {