Bug 687373 - Provide mozilla::layers::SurfaceDescriptorX11 non xlib surface ctor. r=cjones
authorOleg Romashin <romaxa@gmail.com>
Tue, 20 Sep 2011 17:20:51 +0100
changeset 77203 969aaa109a23e2f9a0fe3a4efa0642f67d938d88
parent 77202 ebbc50bbebeb2b3142efd9fbde0d0be0666008f9
child 77204 89d8b2add33ff2e51a17cea95cecce66e18bf6a1
push id21187
push usermak77@bonardo.net
push dateWed, 21 Sep 2011 08:36:41 +0000
treeherdermozilla-central@3178f1c42505 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscjones
bugs687373
milestone9.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 687373 - Provide mozilla::layers::SurfaceDescriptorX11 non xlib surface ctor. r=cjones
gfx/layers/ipc/ShadowLayerUtilsX11.cpp
gfx/layers/ipc/ShadowLayerUtilsX11.h
--- a/gfx/layers/ipc/ShadowLayerUtilsX11.cpp
+++ b/gfx/layers/ipc/ShadowLayerUtilsX11.cpp
@@ -80,16 +80,22 @@ TakeAndDestroyXlibSurface(SurfaceDescrip
 }
 
 SurfaceDescriptorX11::SurfaceDescriptorX11(gfxXlibSurface* aSurf)
   : mId(aSurf->XDrawable())
   , mSize(aSurf->GetSize())
   , mFormat(aSurf->XRenderFormat()->id)
 { }
 
+SurfaceDescriptorX11::SurfaceDescriptorX11(const int aXid, const int aXrenderPictID, const gfxIntSize& aSize)
+  : mId(aXid)
+  , mSize(aSize)
+  , mFormat(aXrenderPictID)
+{ }
+
 already_AddRefed<gfxXlibSurface>
 SurfaceDescriptorX11::OpenForeign() const
 {
   Display* display = DefaultXDisplay();
   Screen* screen = DefaultScreenOfDisplay(display);
 
   XRenderPictFormat* format = GetXRenderPictFormatFromId(display, mFormat);
   nsRefPtr<gfxXlibSurface> surf =
--- a/gfx/layers/ipc/ShadowLayerUtilsX11.h
+++ b/gfx/layers/ipc/ShadowLayerUtilsX11.h
@@ -55,16 +55,18 @@ namespace mozilla {
 namespace layers {
 
 struct SurfaceDescriptorX11 {
   SurfaceDescriptorX11()
   { }
 
   SurfaceDescriptorX11(gfxXlibSurface* aSurf);
 
+  SurfaceDescriptorX11(const int aXid, const int aXrenderPictID, const gfxIntSize& aSize);
+
   // Default copy ctor and operator= are OK
 
   bool operator==(const SurfaceDescriptorX11& aOther) const {
     // Define == as two descriptors having the same XID for now,
     // ignoring size and render format.  If the two indeed refer to
     // the same valid XID, then size/format are "actually" the same
     // anyway, regardless of the values of the fields in
     // SurfaceDescriptorX11.