Public Member Functions | Static Public Member Functions

gfxSharedImageSurface Class Reference

#include <gfxSharedImageSurface.h>

Inheritance diagram for gfxSharedImageSurface:
Collaboration diagram for gfxSharedImageSurface:

List of all members.

Public Member Functions

virtual ~gfxSharedImageSurface ()
ShmemGetShmem ()

Static Public Member Functions

template<class ShmemAllocator >
static already_AddRefed
< gfxSharedImageSurface
Create (ShmemAllocator *aAllocator, const gfxIntSize &aSize, gfxImageFormat aFormat, SharedMemory::SharedMemoryType aShmType=SharedMemory::TYPE_BASIC)
 Return a new gfxSharedImageSurface around a shmem segment newly allocated by this function.
static already_AddRefed
< gfxSharedImageSurface
Open (const Shmem &aShmem)
 Return a new gfxSharedImageSurface that wraps a shmem segment already created by the Create() above.
template<class ShmemAllocator >
static already_AddRefed
< gfxSharedImageSurface
CreateUnsafe (ShmemAllocator *aAllocator, const gfxIntSize &aSize, gfxImageFormat aFormat, SharedMemory::SharedMemoryType aShmType=SharedMemory::TYPE_BASIC)
static PRBool IsSharedImage (gfxASurface *aSurface)

Constructor & Destructor Documentation

virtual gfxSharedImageSurface::~gfxSharedImageSurface (  )  [virtual]

Member Function Documentation

template<class ShmemAllocator >
static already_AddRefed<gfxSharedImageSurface> gfxSharedImageSurface::Create ( ShmemAllocator *  aAllocator,
const gfxIntSize aSize,
gfxImageFormat  aFormat,
SharedMemory::SharedMemoryType  aShmType = SharedMemory::TYPE_BASIC 
) [inline, static]

Return a new gfxSharedImageSurface around a shmem segment newly allocated by this function.

|aAllocator| is the object used to allocate the new shmem segment. Null is returned if creating the surface failed.

NB: the *caller* is responsible for freeing the Shmem allocated by this function.

template<class ShmemAllocator >
static already_AddRefed<gfxSharedImageSurface> gfxSharedImageSurface::CreateUnsafe ( ShmemAllocator *  aAllocator,
const gfxIntSize aSize,
gfxImageFormat  aFormat,
SharedMemory::SharedMemoryType  aShmType = SharedMemory::TYPE_BASIC 
) [inline, static]
Shmem& gfxSharedImageSurface::GetShmem (  )  [inline]
static PRBool gfxSharedImageSurface::IsSharedImage ( gfxASurface aSurface  )  [static]
static already_AddRefed<gfxSharedImageSurface> gfxSharedImageSurface::Open ( const Shmem aShmem  )  [static]

Return a new gfxSharedImageSurface that wraps a shmem segment already created by the Create() above.

Bad things will happen if an attempt is made to wrap any other shmem segment. Null is returned if creating the surface failed.


The documentation for this class was generated from the following file: