[dfb,422221] merge fixup; fix temp xlib surface creation

This commit is contained in:
Vladimir Vukicevic 2008-08-06 13:48:55 -07:00
Родитель 1bfb08c84e
Коммит b6e169008f
2 изменённых файлов: 22 добавлений и 12 удалений

Просмотреть файл

@ -322,22 +322,32 @@ _create_temp_xlib_surface (cairo_t *cr, Display *dpy, int width, int height,
GdkDrawable *gdk_target_drawable = GDK_DRAWABLE(gdk_xid_table_lookup(target_drawable));
GdkPixmap *pixmap = NULL;
GdkVisual *gvis = NULL;
if (gdk_target_drawable) {
pixmap = gdk_pixmap_new(gdk_target_drawable,
width, height,
-1);
} else {
gvis = gdk_drawable_get_visual(gdk_target_drawable);
if (gvis) {
pixmap = gdk_pixmap_new(gdk_target_drawable,
width, height,
-1);
}
}
if (!pixmap) {
int screen_index = DefaultScreen (dpy);
int depth = DefaultDepth (dpy, screen_index);
GdkColormap *rgb = gdk_rgb_get_colormap();
gvis = gdk_colormap_get_visual(rgb);
pixmap = gdk_pixmap_new(NULL,
width, height,
depth);
gvis->depth);
gdk_drawable_set_colormap(pixmap, rgb);
}
result = cairo_xlib_surface_create (gdk_x11_drawable_get_xdisplay(pixmap),
gdk_x11_drawable_get_xid(pixmap),
gdk_x11_visual_get_xvisual(gdk_drawable_get_visual(pixmap)),
gdk_x11_visual_get_xvisual(gvis),
width, height);
if (cairo_surface_status (result) != CAIRO_STATUS_SUCCESS) {
pixmap_free_func (pixmap);

Просмотреть файл

@ -120,13 +120,9 @@ gfxPlatformGtk::gfxPlatformGtk()
FT_Init_FreeType(&gPlatformFTLibrary);
gPlatformFonts = new FontTable();
/* FIXME: DFB */
//gPlatformFonts->Init(100);
gPlatformFonts->Init(20);
gPlatformFonts->Init(100);
gPlatformFontAliases = new FontTable();
/* FIXME: DFB */
//gPlatformFontAliases->Init(100);
gPlatformFontAliases->Init(20);
gPlatformFontAliases->Init(100);
UpdateFontList();
#endif
@ -265,6 +261,10 @@ gfxPlatformGtk::CreateOffscreenSurface(const gfxIntSize& size,
}
#endif
#ifdef MOZ_DFB
newSurface = new gfxDirectFBSurface(size, imageFormat);
#endif
if (newSurface) {
gfxContext tmpCtx(newSurface);
tmpCtx.SetOperator(gfxContext::OPERATOR_CLEAR);