mac: only recreate rep if width/height is different. also untested but i'm confident in this
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
This commit is contained in:
parent
b661face26
commit
bb876b9620
1 changed files with 13 additions and 11 deletions
|
|
@ -654,17 +654,19 @@ static void recursive_dispatch_key_released(MwLL handle, int* k) {
|
|||
NSArray* subviews = [self subviews];
|
||||
int i;
|
||||
|
||||
if(self->rep) {
|
||||
[self->rep release];
|
||||
}
|
||||
if(dirtyRect.size.width && dirtyRect.size.height) {
|
||||
[self initRepAndContextWithWidth:dirtyRect.size.width
|
||||
Height:dirtyRect.size.height];
|
||||
self->width = dirtyRect.size.width;
|
||||
self->height = dirtyRect.size.height;
|
||||
} else {
|
||||
[pool release];
|
||||
return;
|
||||
if(self->width != dirtyRect.size.width || self->height != dirtyRect.size.height) {
|
||||
if(self->rep) {
|
||||
[self->rep release];
|
||||
}
|
||||
if(dirtyRect.size.width && dirtyRect.size.height) {
|
||||
[self initRepAndContextWithWidth:dirtyRect.size.width
|
||||
Height:dirtyRect.size.height];
|
||||
self->width = dirtyRect.size.width;
|
||||
self->height = dirtyRect.size.height;
|
||||
} else {
|
||||
[pool release];
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
[self->rep drawInRect:[self bounds]];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue