Qt 4.8
Public Functions | Properties | List of all members
SurfaceCache Class Reference

Public Functions

void clear ()
 
IDirectFBSurface * getSurface (const uint *buf, int size)
 
 SurfaceCache ()
 
 ~SurfaceCache ()
 

Properties

uintbuffer
 
int bufsize
 
IDirectFBSurface * surface
 

Detailed Description

Definition at line 152 of file qdirectfbpaintengine.cpp.

Constructors and Destructors

◆ SurfaceCache()

SurfaceCache::SurfaceCache ( )
inline

Definition at line 155 of file qdirectfbpaintengine.cpp.

155 : surface(0), buffer(0), bufsize(0) {}
IDirectFBSurface * surface

◆ ~SurfaceCache()

SurfaceCache::~SurfaceCache ( )
inline

Definition at line 156 of file qdirectfbpaintengine.cpp.

156 { clear(); }

Functions

◆ clear()

void SurfaceCache::clear ( void  )

Definition at line 1415 of file qdirectfbpaintengine.cpp.

1416 {
1419  surface = 0;
1420  buffer = 0;
1421  bufsize = 0;
1422 }
IDirectFBSurface * surface
void releaseDFBSurface(IDirectFBSurface *surface)
static QDirectFBScreen * instance()

◆ getSurface()

IDirectFBSurface * SurfaceCache::getSurface ( const uint buf,
int  size 
)

Definition at line 1397 of file qdirectfbpaintengine.cpp.

1398 {
1399  if (buffer == buf && bufsize == size)
1400  return surface;
1401 
1402  clear();
1403 
1404  const DFBSurfaceDescription description = QDirectFBScreen::getSurfaceDescription(buf, size);
1406  if (!surface)
1407  qWarning("QDirectFBPaintEngine: SurfaceCache: Unable to create surface");
1408 
1409  buffer = const_cast<uint*>(buf);
1410  bufsize = size;
1411 
1412  return surface;
1413 }
IDirectFBSurface * surface
static DFBSurfaceDescription getSurfaceDescription(const uint *buffer, int length)
IDirectFBSurface * createDFBSurface(const QImage &image, QImage::Format format, SurfaceCreationOptions options, DFBResult *result=0)
Q_CORE_EXPORT void qWarning(const char *,...)
unsigned int uint
Definition: qglobal.h:996
static QDirectFBScreen * instance()

Properties

◆ buffer

uint* SurfaceCache::buffer
private

Definition at line 161 of file qdirectfbpaintengine.cpp.

◆ bufsize

int SurfaceCache::bufsize
private

Definition at line 162 of file qdirectfbpaintengine.cpp.

◆ surface

IDirectFBSurface* SurfaceCache::surface
private

Definition at line 160 of file qdirectfbpaintengine.cpp.


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