diff --git a/gfx/thebes/gfxXlibSurface.cpp b/gfx/thebes/gfxXlibSurface.cpp index 9b5621e35754..34ead5c4ac80 100644 --- a/gfx/thebes/gfxXlibSurface.cpp +++ b/gfx/thebes/gfxXlibSurface.cpp @@ -47,6 +47,7 @@ #include "nsAlgorithm.h" #include "nsServiceManagerUtils.h" #include "nsIPrefService.h" +#include "cairo-xlib-xrender.h" // Although the dimension parameters in the xCreatePixmapReq wire protocol are // 16-bit unsigned integers, the server's CreatePixmap returns BadAlloc if @@ -494,3 +495,10 @@ gfxXlibSurface::FindRenderFormat(Display *dpy, gfxImageFormat format) return (XRenderPictFormat*)NULL; } + +XRenderPictFormat* +gfxXlibSurface::XRenderFormat() +{ + return cairo_xlib_surface_get_xrender_format(CairoSurface()); +} + diff --git a/gfx/thebes/gfxXlibSurface.h b/gfx/thebes/gfxXlibSurface.h index 815114ecfb96..f955f219d05c 100644 --- a/gfx/thebes/gfxXlibSurface.h +++ b/gfx/thebes/gfxXlibSurface.h @@ -86,6 +86,7 @@ public: Display* XDisplay() { return mDisplay; } Drawable XDrawable() { return mDrawable; } + XRenderPictFormat* XRenderFormat(); static int DepthOfVisual(const Screen* screen, const Visual* visual); static Visual* FindVisual(Screen* screen, gfxImageFormat format);