Qt 4.8
Public Functions | Public Variables | Protected Variables | List of all members
QVNCDirtyMap Class Referenceabstract

#include <qscreenvnc_p.h>

Inheritance diagram for QVNCDirtyMap:
QVNCDirtyMapOptimized< T > QVNCDirtyMapOptimized< T >

Public Functions

bool dirty (int x, int y) const
 
bool dirty (int x, int y) const
 
 QVNCDirtyMap (QScreen *screen)
 
 QVNCDirtyMap (QVNCScreen *screen)
 
void reset ()
 
void reset ()
 
void setClean (int x, int y)
 
void setClean (int x, int y)
 
virtual void setDirty (int x, int y, bool force=false)=0
 
virtual void setDirty (int x, int y, bool force=false)=0
 
virtual ~QVNCDirtyMap ()
 
virtual ~QVNCDirtyMap ()
 

Public Variables

int bytesPerPixel
 
int mapHeight
 
int mapWidth
 
int numDirty
 

Protected Variables

ucharbuffer
 
int bufferHeight
 
int bufferStride
 
int bufferWidth
 
ucharmap
 
int numTiles
 
QScreenscreen
 
QVNCScreenscreen
 

Detailed Description

Definition at line 104 of file qscreenvnc_p.h.

Constructors and Destructors

◆ QVNCDirtyMap() [1/2]

QVNCDirtyMap::QVNCDirtyMap ( QScreen screen)

Definition at line 1664 of file qscreenvnc_qws.cpp.

1665  : bytesPerPixel(0), numDirty(0), screen(s)
1666 {
1667  bytesPerPixel = (screen->depth() + 7) / 8;
1668  bufferWidth = screen->deviceWidth();
1669  bufferHeight = screen->deviceHeight();
1672 
1676  map = new uchar[numTiles];
1677 }
uchar * buffer
Definition: qscreenvnc_p.h:124
int deviceWidth() const
Returns the physical width of the framebuffer device in pixels.
Definition: qscreen_qws.h:233
#define MAP_TILE_SIZE
Definition: qscreenvnc_p.h:100
unsigned char uchar
Definition: qglobal.h:994
QScreen * screen
Definition: qscreenvnc_p.h:123
int deviceHeight() const
Returns the full height of the framebuffer device in pixels.
Definition: qscreen_qws.h:234
int depth() const
Returns the depth of the framebuffer, in bits per pixel.
Definition: qscreen_qws.h:229

◆ ~QVNCDirtyMap() [1/2]

QVNCDirtyMap::~QVNCDirtyMap ( )
virtual

Definition at line 1679 of file qscreenvnc_qws.cpp.

Referenced by QVNCDirtyMap().

1680 {
1681  delete[] map;
1682  delete[] buffer;
1683 }
uchar * buffer
Definition: qscreenvnc_p.h:124

◆ QVNCDirtyMap() [2/2]

QVNCDirtyMap::QVNCDirtyMap ( QVNCScreen screen)

Definition at line 1502 of file qvncserver.cpp.

1503  : bytesPerPixel(0), numDirty(0), screen(s)
1504 {
1505  bytesPerPixel = (screen->depth() + 7) / 8;
1506  QSize screenSize = screen->geometry().size();
1507  bufferWidth = screenSize.width();
1508  bufferHeight = screenSize.height();
1511 
1515  map = new uchar[numTiles];
1516 }
uchar * buffer
Definition: qscreenvnc_p.h:124
#define MAP_TILE_SIZE
Definition: qscreenvnc_p.h:100
unsigned char uchar
Definition: qglobal.h:994
int width() const
Returns the width.
Definition: qsize.h:126
virtual int depth() const
Reimplement in subclass to return current depth of the screen.
Definition: fb_base.h:163
QScreen * screen
Definition: qscreenvnc_p.h:123
QSize size() const
Returns the size of the rectangle.
Definition: qrect.h:309
int height() const
Returns the height.
Definition: qsize.h:129
The QSize class defines the size of a two-dimensional object using integer point precision.
Definition: qsize.h:53
virtual QRect geometry() const
Reimplement in subclass to return the pixel geometry of the screen.
Definition: fb_base.h:162

◆ ~QVNCDirtyMap() [2/2]

virtual QVNCDirtyMap::~QVNCDirtyMap ( )
virtual

Functions

◆ dirty() [1/2]

bool QVNCDirtyMap::dirty ( int  x,
int  y 
) const
inline

Definition at line 1692 of file qscreenvnc_qws.cpp.

Referenced by QVNCServer::dirtyMap(), QVNCDirtyMap(), QRfbRawEncoder::write(), and QRfbHextileEncoder< SRC >::write().

1693 {
1694  return map[y * mapWidth + x];
1695 }

◆ dirty() [2/2]

bool QVNCDirtyMap::dirty ( int  x,
int  y 
) const

◆ reset() [1/2]

void QVNCDirtyMap::reset ( )

Definition at line 1685 of file qscreenvnc_qws.cpp.

Referenced by QVNCServer::newConnection(), and QVNCDirtyMap().

1686 {
1687  memset(map, 1, numTiles);
1688  memset(buffer, 0, bufferHeight * bufferStride);
1689  numDirty = numTiles;
1690 }
uchar * buffer
Definition: qscreenvnc_p.h:124

◆ reset() [2/2]

void QVNCDirtyMap::reset ( )

◆ setClean() [1/2]

void QVNCDirtyMap::setClean ( int  x,
int  y 
)
inline

Definition at line 1697 of file qscreenvnc_qws.cpp.

Referenced by QVNCDirtyMap(), QRfbRawEncoder::write(), and QRfbHextileEncoder< SRC >::write().

1698 {
1699  map[y * mapWidth + x] = 0;
1700  --numDirty;
1701 }

◆ setClean() [2/2]

void QVNCDirtyMap::setClean ( int  x,
int  y 
)

◆ setDirty() [1/2]

virtual void QVNCDirtyMap::setDirty ( int  x,
int  y,
bool  force = false 
)
pure virtual

◆ setDirty() [2/2]

virtual void QVNCDirtyMap::setDirty ( int  x,
int  y,
bool  force = false 
)
pure virtual

Properties

◆ buffer

uchar * QVNCDirtyMap::buffer
protected

◆ bufferHeight

int QVNCDirtyMap::bufferHeight
protected

Definition at line 126 of file qscreenvnc_p.h.

Referenced by QVNCDirtyMap(), reset(), and QVNCDirtyMapOptimized< T >::setDirty().

◆ bufferStride

int QVNCDirtyMap::bufferStride
protected

Definition at line 127 of file qscreenvnc_p.h.

Referenced by QVNCDirtyMap(), reset(), and QVNCDirtyMapOptimized< T >::setDirty().

◆ bufferWidth

int QVNCDirtyMap::bufferWidth
protected

Definition at line 125 of file qscreenvnc_p.h.

Referenced by QVNCDirtyMap(), and QVNCDirtyMapOptimized< T >::setDirty().

◆ bytesPerPixel

int QVNCDirtyMap::bytesPerPixel

Definition at line 115 of file qscreenvnc_p.h.

Referenced by QVNCDirtyMap(), and QVNCDirtyMapOptimized< T >::setDirty().

◆ map

uchar * QVNCDirtyMap::map
protected

Definition at line 122 of file qscreenvnc_p.h.

Referenced by QVNCDirtyMap(), and ~QVNCDirtyMap().

◆ mapHeight

int QVNCDirtyMap::mapHeight

◆ mapWidth

int QVNCDirtyMap::mapWidth

◆ numDirty

int QVNCDirtyMap::numDirty

◆ numTiles

int QVNCDirtyMap::numTiles
protected

Definition at line 128 of file qscreenvnc_p.h.

Referenced by QVNCDirtyMap(), and reset().

◆ screen [1/2]

QScreen* QVNCDirtyMap::screen
protected

Definition at line 123 of file qscreenvnc_p.h.

Referenced by QVNCDirtyMap(), and QVNCDirtyMapOptimized< T >::setDirty().

◆ screen [2/2]

QVNCScreen* QVNCDirtyMap::screen
protected

Definition at line 125 of file qvncserver.h.


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