зеркало из https://github.com/mozilla/gecko-dev.git
fix ref problem with gc's from the gc cache. fixes bug 32120
This commit is contained in:
Родитель
d670519029
Коммит
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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче