30
edits
No edit summary |
|||
| Line 31: | Line 31: | ||
==== Proposed Porting Approach ==== | ==== Proposed Porting Approach ==== | ||
* Clone gfxXlibSurface | * Clone gfxXlibSurface to gfxGdkCairoSurface | ||
* Callers of | * Callers of gfxXlibSurface will now call gfxGdkCairoSurface. | ||
* | * gfxGdkCairoSurface implementation calls Xlib specific functions under MOZ_X11 switch and calls DirectFB specific functions under MOZ_DFB switch. | ||
* This approach will abstract out all backend specific functions and move them to a single place | |||
* Users of gfxXlibSurface to create cairo surface for a GdkWindow will simply call gfxGdkCairoSurface with GdkDrawable | |||
* Users of gfxXlibSurface to create cairo surface for an offscreen buffer (pixmap) will undergo some changes: | |||
** A gdk pixmap of required depth will be created and corresponding GdkDrawable will be passed to gfxGdkCairoSurface for creating cairo surface | |||
** All other x11 dependent code (checking for xrender extension etc) will be removed as gfxGdkCairoSurface will take care of all required functionality . | |||
* The actual cairo-xlib surface creation will use GdkDrawable's depth to call correct cairo_xlib functions: | |||
** cairo_xlib_surface_create() will be called if the GdkDrawable has non-NULL visual | |||
** else: cairo_xlib_surface_create_for_bitmap() will be called if the depth is 1 | |||
** else : cairo_xlib_surface_create_with_xrender_format() will be called | |||
* The actual cairo-dfb surface creation will use type of GdkDrawable (Window or pixmap) to call correct cairo-dfb functions | |||
** cairo_directfb_surface_create() will be called with the DFB Surface returned from gdk_directfb_surface_lookup (), if the GdkDrawable is a Window | |||
** cairo_directfb_surface_create() will be called with a newly created DFB Surface. The new DFB Surface will be created using CreateSurface() with the GdkDrawable's depth mapped to DFB pixel format. | |||
=== NativeRenderer === | === NativeRenderer === | ||
edits