зеркало из https://github.com/mozilla/gecko-dev.git
Bug 740580 - Make GetShmInfoPtr() a static method on the gfxSharedImageSurface class. r=Bas
This commit is contained in:
Родитель
49b77e79e5
Коммит
7ac726b395
|
@ -14,14 +14,8 @@ using namespace mozilla::ipc;
|
|||
|
||||
static const cairo_user_data_key_t SHM_KEY = {0};
|
||||
|
||||
struct SharedImageInfo {
|
||||
int32_t width;
|
||||
int32_t height;
|
||||
int32_t format;
|
||||
};
|
||||
|
||||
static SharedImageInfo*
|
||||
GetShmInfoPtr(const Shmem& aShmem)
|
||||
/*static*/ SharedImageInfo*
|
||||
gfxSharedImageSurface::GetShmInfoPtr(const Shmem& aShmem)
|
||||
{
|
||||
return reinterpret_cast<SharedImageInfo*>
|
||||
(aShmem.get<char>() + aShmem.Size<char>() - sizeof(SharedImageInfo));
|
||||
|
|
|
@ -13,6 +13,12 @@
|
|||
#include "gfxASurface.h"
|
||||
#include "gfxImageSurface.h"
|
||||
|
||||
struct SharedImageInfo {
|
||||
PRInt32 width;
|
||||
PRInt32 height;
|
||||
PRInt32 format;
|
||||
};
|
||||
|
||||
class THEBES_API gfxSharedImageSurface : public gfxImageSurface {
|
||||
typedef mozilla::ipc::SharedMemory SharedMemory;
|
||||
typedef mozilla::ipc::Shmem Shmem;
|
||||
|
@ -62,6 +68,8 @@ public:
|
|||
|
||||
static bool IsSharedImage(gfxASurface *aSurface);
|
||||
|
||||
static SharedImageInfo* GetShmInfoPtr(const Shmem& aShmem);
|
||||
|
||||
private:
|
||||
gfxSharedImageSurface(const gfxIntSize&, gfxImageFormat, const Shmem&);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче