зеркало из https://github.com/mozilla/pjs.git
Bug 380464 - "crashed [@ gfxPlatformGtk::SetSurfaceGdkWindow] in case where I used to see bug 263160" [p=vlad r=stuart a=blocking1.9+]
This commit is contained in:
Родитель
24a04e65d7
Коммит
e8d2db7616
|
@ -57,11 +57,6 @@ public:
|
|||
already_AddRefed<gfxASurface> CreateOffscreenSurface(const gfxIntSize& size,
|
||||
gfxASurface::gfxImageFormat imageFormat);
|
||||
|
||||
GdkDrawable *GetSurfaceGdkDrawable(gfxASurface *aSurf);
|
||||
|
||||
void SetSurfaceGdkWindow(gfxASurface *aSurf,
|
||||
GdkWindow *win);
|
||||
|
||||
nsresult GetFontList(const nsACString& aLangGroup,
|
||||
const nsACString& aGenericFamily,
|
||||
nsStringArray& aListOfFonts);
|
||||
|
|
|
@ -69,14 +69,6 @@
|
|||
PRInt32 gfxPlatformGtk::sDPI = -1;
|
||||
gfxFontconfigUtils *gfxPlatformGtk::sFontconfigUtils = nsnull;
|
||||
|
||||
static cairo_user_data_key_t cairo_gdk_window_key;
|
||||
static cairo_user_data_key_t cairo_gdk_pixmap_key;
|
||||
static void do_gdk_pixmap_unref (void *data)
|
||||
{
|
||||
GdkPixmap *pmap = (GdkPixmap*)data;
|
||||
gdk_pixmap_unref (pmap);
|
||||
}
|
||||
|
||||
gfxPlatformGtk::gfxPlatformGtk()
|
||||
{
|
||||
#ifdef MOZ_ENABLE_GLITZ
|
||||
|
@ -174,14 +166,6 @@ gfxPlatformGtk::CreateOffscreenSurface(const gfxIntSize& size,
|
|||
size);
|
||||
}
|
||||
|
||||
if (pixmap && newSurface) {
|
||||
// set up the surface to auto-unref the gdk pixmap when the surface
|
||||
// is released
|
||||
newSurface->SetData(&cairo_gdk_pixmap_key,
|
||||
pixmap,
|
||||
do_gdk_pixmap_unref);
|
||||
}
|
||||
|
||||
} else {
|
||||
#ifdef MOZ_ENABLE_GLITZ
|
||||
glitz_drawable_format_t *gdformat = glitz_glx_find_pbuffer_format
|
||||
|
@ -215,31 +199,6 @@ gfxPlatformGtk::CreateOffscreenSurface(const gfxIntSize& size,
|
|||
return newSurface;
|
||||
}
|
||||
|
||||
GdkDrawable*
|
||||
gfxPlatformGtk::GetSurfaceGdkDrawable(gfxASurface *aSurf)
|
||||
{
|
||||
GdkDrawable *gd;
|
||||
gd = (GdkDrawable*) cairo_surface_get_user_data(aSurf->CairoSurface(), &cairo_gdk_pixmap_key);
|
||||
if (gd)
|
||||
return gd;
|
||||
|
||||
gd = (GdkDrawable*) cairo_surface_get_user_data(aSurf->CairoSurface(), &cairo_gdk_window_key);
|
||||
if (gd)
|
||||
return gd;
|
||||
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
void
|
||||
gfxPlatformGtk::SetSurfaceGdkWindow(gfxASurface *aSurf,
|
||||
GdkWindow *win)
|
||||
{
|
||||
cairo_surface_set_user_data(aSurf->CairoSurface(),
|
||||
&cairo_gdk_window_key,
|
||||
win,
|
||||
nsnull);
|
||||
}
|
||||
|
||||
nsresult
|
||||
gfxPlatformGtk::GetFontList(const nsACString& aLangGroup,
|
||||
const nsACString& aGenericFamily,
|
||||
|
|
|
@ -5931,12 +5931,11 @@ nsWindow::GetThebesSurface()
|
|||
GDK_WINDOW_XWINDOW(d),
|
||||
GDK_VISUAL_XVISUAL(gdk_drawable_get_visual(d)),
|
||||
gfxIntSize(width, height));
|
||||
if (mThebesSurface && !mThebesSurface->CairoStatus()) {
|
||||
gfxPlatformGtk::GetPlatform()->SetSurfaceGdkWindow(mThebesSurface, GDK_WINDOW(d));
|
||||
}
|
||||
else {
|
||||
|
||||
// if the surface creation is reporting an error, then
|
||||
// we don't have a surface to give back
|
||||
if (mThebesSurface && mThebesSurface->CairoStatus() != 0)
|
||||
mThebesSurface = nsnull;
|
||||
}
|
||||
} else {
|
||||
#ifdef MOZ_ENABLE_GLITZ
|
||||
glitz_surface_t *gsurf;
|
||||
|
|
Загрузка…
Ссылка в новой задаче