mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 22:00:46 +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
a7f5698e57
commit
ed2acc2520
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>
|
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.
|
* Tools/make_services.m: Fix to get correct type info cached.
|
||||||
|
|
|
@ -1178,9 +1178,11 @@ static SEL invalidateSel = @selector(_invalidateCoordinates);
|
||||||
redrawRect = NSIntersectionRect(aRect, invalidRect);
|
redrawRect = NSIntersectionRect(aRect, invalidRect);
|
||||||
if (NSIsEmptyRect(redrawRect) == NO)
|
if (NSIsEmptyRect(redrawRect) == NO)
|
||||||
{
|
{
|
||||||
[self lockFocus];
|
NSGraphicsContext *ctxt = GSCurrentContext();
|
||||||
|
|
||||||
|
[ctxt lockFocusView: self inRect: redrawRect];
|
||||||
[self drawRect: redrawRect];
|
[self drawRect: redrawRect];
|
||||||
[self unlockFocus];
|
[ctxt unlockFocusView: self needsFlush: YES];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_rFlags.has_subviews)
|
if (_rFlags.has_subviews)
|
||||||
|
@ -1273,9 +1275,10 @@ static SEL invalidateSel = @selector(_invalidateCoordinates);
|
||||||
|
|
||||||
- (void) displayRectIgnoringOpacity: (NSRect)aRect
|
- (void) displayRectIgnoringOpacity: (NSRect)aRect
|
||||||
{
|
{
|
||||||
unsigned i, count;
|
unsigned i, count;
|
||||||
NSRect rect;
|
NSRect rect;
|
||||||
BOOL stillNeedsDisplay = NO;
|
BOOL stillNeedsDisplay = NO;
|
||||||
|
NSGraphicsContext *ctxt;
|
||||||
|
|
||||||
if (!window)
|
if (!window)
|
||||||
return;
|
return;
|
||||||
|
@ -1283,9 +1286,10 @@ static SEL invalidateSel = @selector(_invalidateCoordinates);
|
||||||
if (coordinates_valid == NO)
|
if (coordinates_valid == NO)
|
||||||
[self _rebuildCoordinates];
|
[self _rebuildCoordinates];
|
||||||
|
|
||||||
[self lockFocus];
|
ctxt = GSCurrentContext();
|
||||||
|
[ctxt lockFocusView: self inRect: aRect];
|
||||||
[self drawRect: aRect];
|
[self drawRect: aRect];
|
||||||
[self unlockFocus];
|
[ctxt unlockFocusView: self needsFlush: YES];
|
||||||
|
|
||||||
if (_rFlags.has_subviews)
|
if (_rFlags.has_subviews)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue