зеркало из https://github.com/mozilla/pjs.git
Bug 651192 - Part 3: Add IPC structures for AsyncBitmapModel. r=cjones
This commit is contained in:
Родитель
4ede4a574d
Коммит
9f2ab07bb6
|
@ -52,6 +52,7 @@ using NPError;
|
|||
using NPRemoteWindow;
|
||||
using NPRemoteEvent;
|
||||
using NPRect;
|
||||
using NPImageFormat;
|
||||
using NPNURLVariable;
|
||||
using NPCoordinateSpace;
|
||||
using mozilla::plugins::NativeWindowHandle;
|
||||
|
@ -59,6 +60,7 @@ using mozilla::gfxSurfaceType;
|
|||
using gfxIntSize;
|
||||
using mozilla::null_t;
|
||||
using mozilla::plugins::WindowsSharedMemoryHandle;
|
||||
using mozilla::plugins::DXGISharedSurfaceHandle;
|
||||
using SurfaceDescriptorX11;
|
||||
using nsIntRect;
|
||||
using nsTextEvent;
|
||||
|
@ -84,6 +86,20 @@ union SurfaceDescriptor {
|
|||
null_t;
|
||||
};
|
||||
|
||||
union AsyncSurfaceDescriptor {
|
||||
Shmem;
|
||||
DXGISharedSurfaceHandle;
|
||||
};
|
||||
|
||||
struct NPRemoteAsyncSurface
|
||||
{
|
||||
uint32_t version;
|
||||
gfxIntSize size;
|
||||
NPImageFormat format;
|
||||
uint32_t stride;
|
||||
AsyncSurfaceDescriptor data;
|
||||
};
|
||||
|
||||
rpc protocol PPluginInstance
|
||||
{
|
||||
manager PPluginModule;
|
||||
|
|
|
@ -142,8 +142,10 @@ typedef intptr_t NativeWindowHandle; // never actually used, will always be 0
|
|||
|
||||
#ifdef XP_WIN
|
||||
typedef base::SharedMemoryHandle WindowsSharedMemoryHandle;
|
||||
typedef HANDLE DXGISharedSurfaceHandle;
|
||||
#else
|
||||
typedef mozilla::null_t WindowsSharedMemoryHandle;
|
||||
typedef mozilla::null_t DXGISharedSurfaceHandle;
|
||||
#endif
|
||||
|
||||
// XXX maybe not the best place for these. better one?
|
||||
|
@ -354,6 +356,32 @@ struct ParamTraits<NPWindowType>
|
|||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct ParamTraits<NPImageFormat>
|
||||
{
|
||||
typedef NPImageFormat paramType;
|
||||
|
||||
static void Write(Message* aMsg, const paramType& aParam)
|
||||
{
|
||||
aMsg->WriteInt16(int16(aParam));
|
||||
}
|
||||
|
||||
static bool Read(const Message* aMsg, void** aIter, paramType* aResult)
|
||||
{
|
||||
int16 result;
|
||||
if (aMsg->ReadInt16(aIter, &result)) {
|
||||
*aResult = paramType(result);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static void Log(const paramType& aParam, std::wstring* aLog)
|
||||
{
|
||||
aLog->append(StringPrintf(L"%d", int16(aParam)));
|
||||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct ParamTraits<mozilla::plugins::NPRemoteWindow>
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче