mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 02:20:37 +00:00
Lock focus / unlock focus optimizations and fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15839 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
959e21868b
commit
ba494c7cd9
22 changed files with 111 additions and 115 deletions
|
@ -69,7 +69,6 @@ static NSColor *clearCol = nil;
|
|||
NSRect rect;
|
||||
NSGraphicsContext *ctxt;
|
||||
|
||||
[controlView lockFocus];
|
||||
ctxt = GSCurrentContext();
|
||||
|
||||
if (GSWViewIsFlipped(ctxt) == YES)
|
||||
|
@ -86,7 +85,6 @@ static NSColor *clearCol = nil;
|
|||
DPSsetgray(ctxt, NSLightGray);
|
||||
DPSrectfill(ctxt, NSMinX(rect), NSMinY(rect),
|
||||
NSWidth(rect), NSHeight(rect));
|
||||
[controlView unlockFocus];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -99,7 +97,6 @@ static NSColor *clearCol = nil;
|
|||
NSRect rect;
|
||||
NSGraphicsContext *ctxt;
|
||||
|
||||
[controlView lockFocus];
|
||||
ctxt = GSCurrentContext();
|
||||
|
||||
if (GSWViewIsFlipped(ctxt) == YES)
|
||||
|
@ -116,7 +113,6 @@ static NSColor *clearCol = nil;
|
|||
DPSsetgray(ctxt, NSDarkGray);
|
||||
DPSrectfill(ctxt, NSMinX(rect), NSMinY(rect),
|
||||
NSWidth(rect), NSHeight(rect));
|
||||
[controlView unlockFocus];
|
||||
}
|
||||
[self drawInteriorWithFrame: cellFrame inView: controlView];
|
||||
}
|
||||
|
@ -158,7 +154,6 @@ static NSColor *clearCol = nil;
|
|||
}
|
||||
// Prepare to draw
|
||||
cellFrame = [self drawingRectForBounds: cellFrame];
|
||||
[controlView lockFocus];
|
||||
// Deal with the background
|
||||
if ([self isOpaque])
|
||||
{
|
||||
|
@ -192,7 +187,6 @@ static NSColor *clearCol = nil;
|
|||
[_cell_image compositeToPoint: position operation: NSCompositeCopy];
|
||||
}
|
||||
// End the drawing
|
||||
[controlView unlockFocus];
|
||||
break;
|
||||
|
||||
case NSNullCellType:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue