Removed minor optimisation in favor of compatibility

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5198 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 1999-11-16 10:47:09 +00:00
parent 93b63e0430
commit c7427d6c0c
4 changed files with 21 additions and 16 deletions

View file

@ -1,3 +1,9 @@
Tue Nov 16 10:49:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* Source/NSView.m: Removed opaque-view optimisation in favour of
retaining MacOS-X compatibility.
* Source/GMAppKit.m: ditto.
Tue Nov 16 7:05:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* Source/NSApplication.m: ([-run]) make sure user defaults are

View file

@ -50,16 +50,16 @@
* This caching assumes that the value returned by [-isFlipped] will
* not change during the views lifetime - if it does, the view must
* be sure to change the flag accordingly.
* 'opaque_view' is similar.
*/
unsigned flipped_view:1;
unsigned has_subviews:1; /* This view has subviews */
unsigned has_currects:1; /* This view has cursor rects */
unsigned has_trkrects:1; /* This view has tracking rects */
unsigned has_draginfo:1; /* View/window has drag types */
unsigned opaque_view:1;
unsigned valid_rects:1; /* Some cursor rects are valid */
unsigned needs_display:1; /* window/view needs display */
unsigned has_subviews:1; /* The view has subviews. */
unsigned has_currects:1; /* The view has cursor rects. */
unsigned has_trkrects:1; /* The view has tracking rects. */
unsigned has_draginfo:1; /* View/window has drag types. */
unsigned opaque_view:1; /* For views whose opacity may */
/* change to keep track of it. */
unsigned valid_rects:1; /* Some cursor rects may be ok. */
unsigned needs_display:1; /* Window/view needs display. */
} _rFlags;
}

View file

@ -1023,7 +1023,6 @@ void __dummy_GMAppKit_functionForLinking() {}
#ifdef GNU_GUI_LIBRARY
_rFlags.flipped_view = [self isFlipped];
_rFlags.opaque_view = [self isOpaque];
if ([sub_views count])
_rFlags.has_subviews = 1;
#endif

View file

@ -230,7 +230,6 @@ GSSetDragTypes(NSView* obj, NSArray *types)
_previousKeyView = nil;
_rFlags.flipped_view = [self isFlipped];
_rFlags.opaque_view = [self isOpaque];
return self;
}
@ -361,8 +360,10 @@ GSSetDragTypes(NSView* obj, NSArray *types)
while (next != nil)
{
if (current->_rFlags.opaque_view)
break;
if ([current isOpaque] == YES)
{
break;
}
current = next;
next = current->super_view;
}
@ -1348,7 +1349,7 @@ GSSetDragTypes(NSView* obj, NSArray *types)
{
if (_rFlags.needs_display)
{
if (_rFlags.opaque_view)
if ([self isOpaque] == YES)
{
[self displayIfNeededIgnoringOpacity];
}
@ -1407,7 +1408,7 @@ GSSetDragTypes(NSView* obj, NSArray *types)
{
if (_rFlags.needs_display)
{
if (_rFlags.opaque_view)
if ([self isOpaque] == YES)
{
[self displayIfNeededInRectIgnoringOpacity: aRect];
}
@ -1518,7 +1519,7 @@ GSSetDragTypes(NSView* obj, NSArray *types)
- (void) displayRect: (NSRect)rect
{
if (_rFlags.opaque_view)
if ([self isOpaque] == YES)
{
[self displayRectIgnoringOpacity: rect];
}
@ -2425,7 +2426,6 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
* Keep a note of whether this is a flipped view or not.
*/
_rFlags.flipped_view = [self isFlipped];
_rFlags.opaque_view = [self isOpaque];
if ([sub_views count])
_rFlags.has_subviews = 1;