mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 13:10:59 +00:00
Improve flushing by using new focus lock/unlock
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4256 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
73c47f91a8
commit
60800878e7
2 changed files with 15 additions and 7 deletions
|
@ -1,3 +1,7 @@
|
|||
Sun May 16 8:15:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||
|
||||
* Source/NSView.m: Use new context lock/unlock operations.
|
||||
|
||||
Mon May 14 19:50:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||
|
||||
* Tools/make_services.m: Fix to get correct type info cached.
|
||||
|
|
|
@ -1178,9 +1178,11 @@ static SEL invalidateSel = @selector(_invalidateCoordinates);
|
|||
redrawRect = NSIntersectionRect(aRect, invalidRect);
|
||||
if (NSIsEmptyRect(redrawRect) == NO)
|
||||
{
|
||||
[self lockFocus];
|
||||
NSGraphicsContext *ctxt = GSCurrentContext();
|
||||
|
||||
[ctxt lockFocusView: self inRect: redrawRect];
|
||||
[self drawRect: redrawRect];
|
||||
[self unlockFocus];
|
||||
[ctxt unlockFocusView: self needsFlush: YES];
|
||||
}
|
||||
|
||||
if (_rFlags.has_subviews)
|
||||
|
@ -1273,9 +1275,10 @@ static SEL invalidateSel = @selector(_invalidateCoordinates);
|
|||
|
||||
- (void) displayRectIgnoringOpacity: (NSRect)aRect
|
||||
{
|
||||
unsigned i, count;
|
||||
NSRect rect;
|
||||
BOOL stillNeedsDisplay = NO;
|
||||
unsigned i, count;
|
||||
NSRect rect;
|
||||
BOOL stillNeedsDisplay = NO;
|
||||
NSGraphicsContext *ctxt;
|
||||
|
||||
if (!window)
|
||||
return;
|
||||
|
@ -1283,9 +1286,10 @@ static SEL invalidateSel = @selector(_invalidateCoordinates);
|
|||
if (coordinates_valid == NO)
|
||||
[self _rebuildCoordinates];
|
||||
|
||||
[self lockFocus];
|
||||
ctxt = GSCurrentContext();
|
||||
[ctxt lockFocusView: self inRect: aRect];
|
||||
[self drawRect: aRect];
|
||||
[self unlockFocus];
|
||||
[ctxt unlockFocusView: self needsFlush: YES];
|
||||
|
||||
if (_rFlags.has_subviews)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue