From 215062605a4613c518757a05367a7ff004217824 Mon Sep 17 00:00:00 2001 From: Oleg Romashin Date: Wed, 8 Sep 2010 08:55:14 -0700 Subject: [PATCH] Bug 556487 - XRenderFormat API for remote X-Surface handling. r=karlt,jmuizelaar a=blocking2.0 --- gfx/thebes/gfxXlibSurface.cpp | 8 ++++++++ gfx/thebes/gfxXlibSurface.h | 1 + 2 files changed, 9 insertions(+) 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);