forked from AuroraMiddleware/gtk
Remove arbitrary limit on number of redraw rectangles
The aim of this limit was to not degrade performance too much, however, it actually did degrade performance to a large extent.
This commit is contained in:
parent
b82150c100
commit
aea9f1b6cf
@ -18,8 +18,9 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
|
||||
#import "GdkQuartzView.h"
|
||||
#include "gdkregion.h"
|
||||
#include "gdkregion-generic.h"
|
||||
#include "gdkwindow-quartz.h"
|
||||
#include "gdkprivate-quartz.h"
|
||||
|
||||
@ -92,22 +93,6 @@
|
||||
}
|
||||
|
||||
[self getRectsBeingDrawn:&drawn_rects count:&count];
|
||||
|
||||
/* Note: arbitrary limit here to not degrade performace too much. It would
|
||||
* be better to optimize the construction of the region below, by using
|
||||
* _gdk_region_new_from_yxbanded_rects.
|
||||
*/
|
||||
if (count > 25)
|
||||
{
|
||||
gdk_rect.x = rect.origin.x;
|
||||
gdk_rect.y = rect.origin.y;
|
||||
gdk_rect.width = rect.size.width;
|
||||
gdk_rect.height = rect.size.height;
|
||||
|
||||
region = gdk_region_rectangle (&gdk_rect);
|
||||
}
|
||||
else
|
||||
{
|
||||
region = gdk_region_new ();
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
@ -119,7 +104,6 @@
|
||||
|
||||
gdk_region_union_with_rect (region, &gdk_rect);
|
||||
}
|
||||
}
|
||||
|
||||
impl->in_paint_rect_count++;
|
||||
_gdk_window_process_updates_recurse (gdk_window, region);
|
||||
|
Loading…
Reference in New Issue
Block a user