Bug 570625, part 3: Add a SurfaceDescriptor IPDL union over all surfaces share-able to another process. r=roc sr=shaver
authorChris Jones <jones.chris.g@gmail.com>
Tue, 14 Sep 2010 00:23:08 -0500
changeset 54103 6725db17692bda4ccf2f9d2fa202ae0f735f8950
parent 54102 fdb0145ee11701331295c7e115a8e15b21bb6f8f
child 54104 1ba29b1ee65d48df27561509c22d2e60a592db3b
push idunknown
push userunknown
push dateunknown
reviewersroc, shaver
bugs570625
milestone2.0b6pre
Bug 570625, part 3: Add a SurfaceDescriptor IPDL union over all surfaces share-able to another process. r=roc sr=shaver
gfx/layers/ipc/PLayers.ipdl
--- a/gfx/layers/ipc/PLayers.ipdl
+++ b/gfx/layers/ipc/PLayers.ipdl
@@ -47,16 +47,17 @@ include "IPC/ShadowLayerUtils.h";
 using gfx3DMatrix;
 using gfxRGBA;
 using nsIntPoint;
 using nsIntRect;
 using nsIntRegion;
 using nsIntSize;
 using mozilla::GraphicsFilterType;
 using mozilla::layers::FrameMetrics;
+using mozilla::layers::SurfaceDescriptorX11;
 using mozilla::null_t;
 
 /**
  * The layers protocol is spoken between thread contexts that manage
  * layer (sub)trees.  The protocol comprises atomically publishing
  * layer subtrees to a "shadow" thread context (which grafts the
  * subtree into its own tree), and atomically updating a published
  * subtree.  ("Atomic" in this sense is wrt painting.)
@@ -70,20 +71,26 @@ struct OpCreateThebesLayer     { PLayer 
 struct OpCreateContainerLayer  { PLayer layer; };
 struct OpCreateImageLayer      { PLayer layer; };
 struct OpCreateColorLayer      { PLayer layer; };
 struct OpCreateCanvasLayer     { PLayer layer; };
  
 // For the "buffer creation" operations, we send an initial front
 // buffer that only contains (transparent) black pixels just so that
 // we can swap it back after the first OpPaint without a special case.
+
+union SurfaceDescriptor {
+  Shmem;
+  SurfaceDescriptorX11;
+};
+
 struct OpCreateThebesBuffer {
   PLayer layer;
   nsIntRect bufferRect;
-  Shmem initialFront;
+  SurfaceDescriptor initialFront;
 };
 struct OpDestroyThebesFrontBuffer { PLayer layer; };
 
 struct OpCreateCanvasBuffer {
   PLayer layer;
   nsIntSize size;
   Shmem initialFront;
 };
@@ -141,17 +148,17 @@ struct OpSetLayerAttributes {
 struct OpSetRoot      { PLayer root; };
 struct OpInsertAfter  { PLayer container; PLayer childLayer; PLayer after; };
 struct OpAppendChild  { PLayer container; PLayer childLayer; };
 struct OpRemoveChild  { PLayer container; PLayer childLayer; };
 
 
 // Paint (buffer update)
 struct ThebesBuffer {
-  Shmem buffer;
+  SurfaceDescriptor buffer;
   nsIntRect rect;
   nsIntPoint rotation; 
 };
 struct OpPaintThebesBuffer {
   PLayer layer;
   ThebesBuffer newFrontBuffer;
 };
 
@@ -190,17 +197,17 @@ union Edit {
 
   OpPaintThebesBuffer;
   OpPaintCanvas;
   OpPaintImage;
 };
 
 
 // Replies to operations
-struct OpBufferSwap   { PLayer layer; Shmem newBackBuffer; };
+struct OpBufferSwap   { PLayer layer; SurfaceDescriptor newBackBuffer; };
 
 /*
  * XXX: if we choose *not* to do a new-front-to-new-back fill in the
  * parent process, then we'll need to send back the old buffer
  * attributes so that it can be filled anew.
  *
 struct OpThebesBufferSwap {
   PLayer layer;