mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 21:35:39 +00:00
fix ref problem with gc's from the gc cache. fixes bug 32120
This commit is contained in:
parent
d670519029
commit
8ae4c3bced
@ -96,12 +96,12 @@ GdkGC *nsGCCache::GetGCFromDW(GdkWindow *window, GdkGCValues *gcv, GdkGCValuesMa
|
||||
if (gc_cache[i].clipRegion &&
|
||||
gdk_region_equal(clipRegion, gc_cache[i].clipRegion)) {
|
||||
// printf("found GC in cache %i\n", ++numCalls);
|
||||
return gc_cache [i].gc;
|
||||
return gdk_gc_ref(gc_cache[i].gc);
|
||||
}
|
||||
} else {
|
||||
if(!gc_cache[i].clipRegion)
|
||||
// printf("found GC in cache (no region) %i\n", ++numCalls);
|
||||
return gc_cache [i].gc;
|
||||
return gdk_gc_ref(gc_cache[i].gc);
|
||||
}
|
||||
}
|
||||
|
||||
@ -139,7 +139,7 @@ GdkGC *nsGCCache::GetGCFromDW(GdkWindow *window, GdkGCValues *gcv, GdkGCValuesMa
|
||||
|
||||
gc_cache [this_slot].gc = gc;
|
||||
|
||||
return gc;
|
||||
return gdk_gc_ref(gc);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -485,6 +485,10 @@ void nsRenderingContextGTK::UpdateGC()
|
||||
GdkGCValues values;
|
||||
GdkGCValuesMask valuesMask;
|
||||
|
||||
if (mGC)
|
||||
gdk_gc_unref(mGC);
|
||||
|
||||
|
||||
memset(&values, 0, sizeof(GdkGCValues));
|
||||
|
||||
values.font = mCurrentFont;
|
||||
|
Loading…
Reference in New Issue
Block a user