Qt 4.8
Public Functions | Private Functions | Static Private Functions | Properties | List of all members
CapabilitiesToStateMask Class Reference

Public Functions

bool canBlitterAlphaFillRect () const
 
bool canBlitterDrawPixmap (const QRectF &r, const QPixmap &pm, const QRectF &sr) const
 
bool canBlitterDrawPixmapOpacity (const QPixmap &pm) const
 
bool canBlitterDrawRectMask () const
 
bool canBlitterFillRect () const
 
 CapabilitiesToStateMask (QBlittable::Capabilities capabilities)
 
void updateState (uint mask, bool on)
 

Private Functions

void setAlphaFillRectMask ()
 
void setFillRectMask ()
 
void setOpacityPixmapMask ()
 
void setSourceOverPixmapMask ()
 
void setSourceOverScaledPixmapMask ()
 
void setSourcePixmapMask ()
 

Static Private Functions

static bool checkStateAgainstMask (uint state, uint mask)
 
static void updateStateBits (uint *state, uint mask, bool on)
 

Properties

uint alphaFillRectMask
 
uint capabillitiesState
 
uint drawPixmapMask
 
uint drawRectMask
 
uint fillRectMask
 
QBlittable::Capabilities m_capabilities
 
uint opacityPixmapMask
 

Detailed Description

Definition at line 69 of file qpaintengine_blitter.cpp.

Constructors and Destructors

◆ CapabilitiesToStateMask()

CapabilitiesToStateMask::CapabilitiesToStateMask ( QBlittable::Capabilities  capabilities)
inline

Definition at line 72 of file qpaintengine_blitter.cpp.

73  : m_capabilities(capabilities)
74  , fillRectMask(0)
75  , drawRectMask(0)
76  , drawPixmapMask(0)
80  {
81  if (capabilities & QBlittable::SolidRectCapability)
83  if (capabilities & QBlittable::SourcePixmapCapability)
85  if (capabilities & QBlittable::SourceOverPixmapCapability)
89  if (capabilities & QBlittable::AlphaFillRectCapability)
91  if (capabilities & QBlittable::OpacityPixmapCapability)
93  }
QBlittable::Capabilities m_capabilities

Functions

◆ canBlitterAlphaFillRect()

bool CapabilitiesToStateMask::canBlitterAlphaFillRect ( ) const
inline

Definition at line 100 of file qpaintengine_blitter.cpp.

◆ canBlitterDrawPixmap()

bool CapabilitiesToStateMask::canBlitterDrawPixmap ( const QRectF r,
const QPixmap pm,
const QRectF sr 
) const
inline

Definition at line 110 of file qpaintengine_blitter.cpp.

111  {
113  return false;
117  if (r.size() != sr.size())
119  else
121  }
123  return m_capabilities & QBlittable::SourcePixmapCapability;
124  }
125  return false;
126  }
static bool checkStateAgainstMask(uint state, uint mask)
ClassId classId() const
QBlittable::Capabilities m_capabilities
QSizeF size() const
Returns the size of the rectangle.
Definition: qrect.h:713
bool hasAlphaChannel() const
Returns true if the pixmap has a format that respects the alpha channel, otherwise returns false...
Definition: qpixmap.cpp:1965
QPixmapData * pixmapData() const
Definition: qpixmap.cpp:2277

◆ canBlitterDrawPixmapOpacity()

bool CapabilitiesToStateMask::canBlitterDrawPixmapOpacity ( const QPixmap pm) const
inline

Definition at line 128 of file qpaintengine_blitter.cpp.

129  {
131  return false;
132 
134  }
static bool checkStateAgainstMask(uint state, uint mask)
ClassId classId() const
QPixmapData * pixmapData() const
Definition: qpixmap.cpp:2277

◆ canBlitterDrawRectMask()

bool CapabilitiesToStateMask::canBlitterDrawRectMask ( ) const
inline

Definition at line 105 of file qpaintengine_blitter.cpp.

◆ canBlitterFillRect()

bool CapabilitiesToStateMask::canBlitterFillRect ( ) const
inline

Definition at line 95 of file qpaintengine_blitter.cpp.

◆ checkStateAgainstMask()

static bool CapabilitiesToStateMask::checkStateAgainstMask ( uint  state,
uint  mask 
)
inlinestaticprivate

Definition at line 147 of file qpaintengine_blitter.cpp.

Referenced by canBlitterAlphaFillRect(), canBlitterDrawPixmap(), canBlitterDrawPixmapOpacity(), canBlitterDrawRectMask(), and canBlitterFillRect().

148  {
149  return !state || (state & mask && !(state & ~mask));
150  }

◆ setAlphaFillRectMask()

void CapabilitiesToStateMask::setAlphaFillRectMask ( )
inlineprivate

Definition at line 170 of file qpaintengine_blitter.cpp.

Referenced by CapabilitiesToStateMask().

170  {
173 
176 
178 
179  //Sub-pixel aliasing should not be sent to the blitter
183 
186  }
#define STATE_BRUSH_PATTERN
#define STATE_ANTIALIASING
#define STATE_BLENDING_COMPLEX
#define STATE_CLIP_COMPLEX
#define STATE_PEN_ENABLED
#define STATE_CLIPSYS_COMPLEX
#define STATE_BRUSH_ALPHA
#define STATE_XFORM_SCALE
#define STATE_ALPHA
static void updateStateBits(uint *state, uint mask, bool on)
#define STATE_XFORM_COMPLEX

◆ setFillRectMask()

void CapabilitiesToStateMask::setFillRectMask ( )
inlineprivate

Definition at line 152 of file qpaintengine_blitter.cpp.

Referenced by CapabilitiesToStateMask().

152  {
155 
158 
160 
161  //Sub-pixel aliasing should not be sent to the blitter
165 
168  }
#define STATE_BRUSH_PATTERN
#define STATE_ANTIALIASING
#define STATE_BLENDING_COMPLEX
#define STATE_CLIP_COMPLEX
#define STATE_PEN_ENABLED
#define STATE_CLIPSYS_COMPLEX
#define STATE_BRUSH_ALPHA
#define STATE_XFORM_SCALE
#define STATE_ALPHA
static void updateStateBits(uint *state, uint mask, bool on)
#define STATE_XFORM_COMPLEX

◆ setOpacityPixmapMask()

void CapabilitiesToStateMask::setOpacityPixmapMask ( )
inlineprivate

Definition at line 214 of file qpaintengine_blitter.cpp.

Referenced by CapabilitiesToStateMask().

214  {
217 
220 
222 
226 
229  }
#define STATE_BRUSH_PATTERN
#define STATE_ANTIALIASING
#define STATE_BLENDING_COMPLEX
#define STATE_CLIP_COMPLEX
#define STATE_PEN_ENABLED
#define STATE_CLIPSYS_COMPLEX
#define STATE_BRUSH_ALPHA
#define STATE_XFORM_SCALE
#define STATE_ALPHA
static void updateStateBits(uint *state, uint mask, bool on)
#define STATE_XFORM_COMPLEX

◆ setSourceOverPixmapMask()

void CapabilitiesToStateMask::setSourceOverPixmapMask ( )
inlineprivate

Definition at line 205 of file qpaintengine_blitter.cpp.

Referenced by CapabilitiesToStateMask(), and setSourceOverScaledPixmapMask().

205  {
207  }

◆ setSourceOverScaledPixmapMask()

void CapabilitiesToStateMask::setSourceOverScaledPixmapMask ( )
inlineprivate

Definition at line 209 of file qpaintengine_blitter.cpp.

Referenced by CapabilitiesToStateMask().

209  {
212  }
#define STATE_XFORM_SCALE
static void updateStateBits(uint *state, uint mask, bool on)

◆ setSourcePixmapMask()

void CapabilitiesToStateMask::setSourcePixmapMask ( )
inlineprivate

Definition at line 188 of file qpaintengine_blitter.cpp.

Referenced by CapabilitiesToStateMask(), and setSourceOverPixmapMask().

188  {
191 
194 
196 
200 
203  }
#define STATE_BRUSH_PATTERN
#define STATE_ANTIALIASING
#define STATE_BLENDING_COMPLEX
#define STATE_CLIP_COMPLEX
#define STATE_PEN_ENABLED
#define STATE_CLIPSYS_COMPLEX
#define STATE_BRUSH_ALPHA
#define STATE_XFORM_SCALE
#define STATE_ALPHA
static void updateStateBits(uint *state, uint mask, bool on)
#define STATE_XFORM_COMPLEX

◆ updateState()

void CapabilitiesToStateMask::updateState ( uint  mask,
bool  on 
)
inline

Definition at line 136 of file qpaintengine_blitter.cpp.

136  {
138  }
static void updateStateBits(uint *state, uint mask, bool on)

◆ updateStateBits()

static void CapabilitiesToStateMask::updateStateBits ( uint state,
uint  mask,
bool  on 
)
inlinestaticprivate

Definition at line 142 of file qpaintengine_blitter.cpp.

Referenced by setAlphaFillRectMask(), setFillRectMask(), setOpacityPixmapMask(), setSourceOverScaledPixmapMask(), setSourcePixmapMask(), and updateState().

143  {
144  *state = on ? (*state | mask) : (*state & ~mask);
145  }

Properties

◆ alphaFillRectMask

uint CapabilitiesToStateMask::alphaFillRectMask
private

Definition at line 235 of file qpaintengine_blitter.cpp.

Referenced by canBlitterAlphaFillRect(), and setAlphaFillRectMask().

◆ capabillitiesState

uint CapabilitiesToStateMask::capabillitiesState
private

◆ drawPixmapMask

uint CapabilitiesToStateMask::drawPixmapMask
private

Definition at line 234 of file qpaintengine_blitter.cpp.

Referenced by canBlitterDrawPixmap(), and setSourcePixmapMask().

◆ drawRectMask

uint CapabilitiesToStateMask::drawRectMask
private

◆ fillRectMask

uint CapabilitiesToStateMask::fillRectMask
private

Definition at line 232 of file qpaintengine_blitter.cpp.

Referenced by canBlitterFillRect(), and setFillRectMask().

◆ m_capabilities

QBlittable::Capabilities CapabilitiesToStateMask::m_capabilities
private

Definition at line 231 of file qpaintengine_blitter.cpp.

Referenced by canBlitterDrawPixmap().

◆ opacityPixmapMask

uint CapabilitiesToStateMask::opacityPixmapMask
private

Definition at line 236 of file qpaintengine_blitter.cpp.

Referenced by canBlitterDrawPixmapOpacity(), and setOpacityPixmapMask().


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