зеркало из https://github.com/mozilla/pjs.git
b=682625 share code for layers::SurfaceDescriptorX11 with plugins r=cjones
--HG-- extra : transplant_source : %82%82%9C-s%8A%E2J%DC%7E%0A%DF%FDyO%FB0q%3C%23
This commit is contained in:
Родитель
97e8fc36d3
Коммит
317ba3c7bb
|
@ -59,6 +59,7 @@ using mozilla::gfxSurfaceType;
|
|||
using gfxIntSize;
|
||||
using mozilla::null_t;
|
||||
using mozilla::plugins::WindowsSharedMemoryHandle;
|
||||
using SurfaceDescriptorX11;
|
||||
using nsIntRect;
|
||||
using nsTextEvent;
|
||||
using nsKeyEvent;
|
||||
|
@ -66,12 +67,6 @@ using nsKeyEvent;
|
|||
namespace mozilla {
|
||||
namespace plugins {
|
||||
|
||||
struct SurfaceDescriptorX11 {
|
||||
int XID;
|
||||
int xrenderPictID;
|
||||
gfxIntSize size;
|
||||
};
|
||||
|
||||
struct IOSurfaceDescriptor {
|
||||
uint32_t surfaceId;
|
||||
};
|
||||
|
|
|
@ -3446,14 +3446,7 @@ PluginInstanceChild::RecvUpdateBackground(const SurfaceDescriptor& aBackground,
|
|||
switch (aBackground.type()) {
|
||||
#ifdef MOZ_X11
|
||||
case SurfaceDescriptor::TSurfaceDescriptorX11: {
|
||||
SurfaceDescriptorX11 xdesc = aBackground.get_SurfaceDescriptorX11();
|
||||
XRenderPictFormat pf;
|
||||
pf.id = xdesc.xrenderPictID();
|
||||
XRenderPictFormat *incFormat =
|
||||
XRenderFindFormat(DefaultXDisplay(), PictFormatID, &pf, 0);
|
||||
mBackground =
|
||||
new gfxXlibSurface(DefaultScreenOfDisplay(DefaultXDisplay()),
|
||||
xdesc.XID(), incFormat, xdesc.size());
|
||||
mBackground = aBackground.get_SurfaceDescriptorX11().OpenForeign();
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -535,14 +535,7 @@ PluginInstanceParent::RecvShow(const NPRect& updatedRect,
|
|||
#endif
|
||||
#ifdef MOZ_X11
|
||||
else if (newSurface.type() == SurfaceDescriptor::TSurfaceDescriptorX11) {
|
||||
SurfaceDescriptorX11 xdesc = newSurface.get_SurfaceDescriptorX11();
|
||||
XRenderPictFormat pf;
|
||||
pf.id = xdesc.xrenderPictID();
|
||||
XRenderPictFormat *incFormat =
|
||||
XRenderFindFormat(DefaultXDisplay(), PictFormatID, &pf, 0);
|
||||
surface =
|
||||
new gfxXlibSurface(DefaultScreenOfDisplay(DefaultXDisplay()),
|
||||
xdesc.XID(), incFormat, xdesc.size());
|
||||
surface = newSurface.get_SurfaceDescriptorX11().OpenForeign();
|
||||
}
|
||||
#endif
|
||||
#ifdef XP_WIN
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
#include "base/message_loop.h"
|
||||
|
||||
#include "mozilla/ipc/RPCChannel.h"
|
||||
#include "gfxipc/ShadowLayerUtils.h"
|
||||
|
||||
#include "npapi.h"
|
||||
#include "npruntime.h"
|
||||
|
@ -66,6 +67,8 @@ using mac_plugin_interposing::NSCursorInfo;
|
|||
namespace mozilla {
|
||||
namespace plugins {
|
||||
|
||||
using layers::SurfaceDescriptorX11;
|
||||
|
||||
enum ScriptableObjectType
|
||||
{
|
||||
LocalObject,
|
||||
|
|
Загрузка…
Ссылка в новой задаче