зеркало из https://github.com/mozilla/gecko-dev.git
move variables that were static to the file and (in the case of copyRegion) static to a function into private/static variables in the class. gets around a strange GOTOFF warning/crash when using g++ 295 and binutils 2.9.1
This commit is contained in:
Родитель
775fd4e50b
Коммит
6be7a25f82
|
@ -25,9 +25,11 @@
|
|||
#include "nsGCCache.h"
|
||||
/* The GC cache is shared among all windows, since it doesn't hog
|
||||
any scarce resources (like colormap entries.) */
|
||||
static struct GCData gc_cache [30];
|
||||
static int gc_cache_fp;
|
||||
static int gc_cache_wrapped_p = 0;
|
||||
|
||||
struct GCData nsGCCache::gc_cache[30];
|
||||
int nsGCCache::gc_cache_fp = 0;
|
||||
int nsGCCache::gc_cache_wrapped_p = 0;
|
||||
GdkRegion *nsGCCache::copyRegion = NULL;
|
||||
|
||||
nsGCCache::nsGCCache()
|
||||
{
|
||||
|
@ -39,9 +41,9 @@ nsGCCache::~nsGCCache()
|
|||
|
||||
}
|
||||
|
||||
static GdkRegion *gdk_region_copy(GdkRegion *region)
|
||||
GdkRegion *
|
||||
nsGCCache::gdk_region_copy(GdkRegion *region)
|
||||
{
|
||||
static GdkRegion *copyRegion;
|
||||
if (!copyRegion) copyRegion = gdk_region_new();
|
||||
|
||||
return gdk_regions_union(region, copyRegion);
|
||||
|
|
|
@ -55,6 +55,12 @@ class nsGCCache
|
|||
return GetGCFromDW(window, gcv, flags, NULL);
|
||||
}
|
||||
|
||||
private:
|
||||
static struct GCData gc_cache [30];
|
||||
static int gc_cache_fp;
|
||||
static int gc_cache_wrapped_p;
|
||||
static GdkRegion * gdk_region_copy(GdkRegion *region);
|
||||
static GdkRegion *copyRegion;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Загрузка…
Ссылка в новой задаче