Changeset 769 for trunk/src/plugins/gfxdrivers
- Timestamp:
- Aug 2, 2010, 9:27:30 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
-
. (modified) (1 prop)
-
src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp (modified) (27 diffs)
-
src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp (modified) (4 diffs)
-
src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp (modified) (7 diffs)
-
src/plugins/gfxdrivers/directfb/qdirectfbscreen.h (modified) (1 diff)
-
src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp (modified) (14 diffs)
-
src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h (modified) (2 diffs)
-
src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglscreen.cpp (modified) (1 diff)
-
src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.6.3 (added) merged: 768 /branches/vendor/nokia/qt/current merged: 767 /branches/vendor/nokia/qt/4.6.2 removed
- Property svn:mergeinfo changed
-
trunk/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
r651 r769 69 69 70 70 enum CompositionModeStatus { 71 PorterDuff_None = 0x00, 72 PorterDuff_SupportedBlits = 0x01, 73 PorterDuff_SupportedPrimitives = 0x02, 74 PorterDuff_SupportedOpaquePrimitives = 0x04, 75 PorterDuff_Dirty = 0x10 71 PorterDuff_None = 0x0, 72 PorterDuff_Supported = 0x1, 73 PorterDuff_PremultiplyColors = 0x2, 74 PorterDuff_AlwaysBlend = 0x4 76 75 }; 77 76 … … 98 97 static inline void unlock(QDirectFBPaintDevice *device); 99 98 100 inline bool testCompositionMode(const QPen *pen, const QBrush *brush, const QColor *color = 0) const;101 99 inline bool isSimpleBrush(const QBrush &brush) const; 102 100 … … 131 129 QDirectFBPaintDevice *dfbDevice; 132 130 uint compositionModeStatus; 131 133 132 134 133 bool inClip; … … 169 168 #endif 170 169 171 #if defined QT_DIRECTFB_WARN_ON_RASTERFALLBACKS || defined QT_DIRECTFB_DISABLE_RASTERFALLBACKS 170 #if defined QT_DIRECTFB_WARN_ON_RASTERFALLBACKS || defined QT_DIRECTFB_DISABLE_RASTERFALLBACKS 172 171 #define VOID_ARG() static_cast<bool>(false) 173 172 enum PaintOperation { … … 179 178 ALL = 0xffff 180 179 }; 181 #endif 182 180 181 #ifdef QT_DEBUG 182 static void initRasterFallbacksMasks(int *warningMask, int *disableMask) 183 { 184 struct { 185 const char *name; 186 PaintOperation operation; 187 } const operations[] = { 188 { "DRAW_RECTS", DRAW_RECTS }, 189 { "DRAW_LINES", DRAW_LINES }, 190 { "DRAW_IMAGE", DRAW_IMAGE }, 191 { "DRAW_PIXMAP", DRAW_PIXMAP }, 192 { "DRAW_TILED_PIXMAP", DRAW_TILED_PIXMAP }, 193 { "STROKE_PATH", STROKE_PATH }, 194 { "DRAW_PATH", DRAW_PATH }, 195 { "DRAW_POINTS", DRAW_POINTS }, 196 { "DRAW_ELLIPSE", DRAW_ELLIPSE }, 197 { "DRAW_POLYGON", DRAW_POLYGON }, 198 { "DRAW_TEXT", DRAW_TEXT }, 199 { "FILL_PATH", FILL_PATH }, 200 { "FILL_RECT", FILL_RECT }, 201 { "DRAW_COLORSPANS", DRAW_COLORSPANS }, 202 { "DRAW_ROUNDED_RECT", DRAW_ROUNDED_RECT }, 203 { "ALL", ALL }, 204 { 0, ALL } 205 }; 206 207 QStringList warning = QString::fromLatin1(qgetenv("QT_DIRECTFB_WARN_ON_RASTERFALLBACKS")).toUpper().split(QLatin1Char('|'), 208 QString::SkipEmptyParts); 209 QStringList disable = QString::fromLatin1(qgetenv("QT_DIRECTFB_DISABLE_RASTERFALLBACKS")).toUpper().split(QLatin1Char('|'), 210 QString::SkipEmptyParts); 211 *warningMask = 0; 212 *disableMask = 0; 213 if (!warning.isEmpty() || !disable.isEmpty()) { 214 for (int i=0; operations[i].name; ++i) { 215 const QString name = QString::fromLatin1(operations[i].name); 216 int idx = warning.indexOf(name); 217 if (idx != -1) { 218 *warningMask |= operations[i].operation; 219 warning.erase(warning.begin() + idx); 220 } 221 idx = disable.indexOf(name); 222 if (idx != -1) { 223 *disableMask |= operations[i].operation; 224 disable.erase(disable.begin() + idx); 225 } 226 } 227 } 228 if (!warning.isEmpty()) { 229 qWarning("QDirectFBPaintEngine QT_DIRECTFB_WARN_ON_RASTERFALLBACKS Unknown operation(s): %s", 230 qPrintable(warning.join(QLatin1String("|")))); 231 } 232 if (!disable.isEmpty()) { 233 qWarning("QDirectFBPaintEngine QT_DIRECTFB_DISABLE_RASTERFALLBACKS Unknown operation(s): %s", 234 qPrintable(disable.join(QLatin1String("|")))); 235 } 236 237 } 238 #endif 239 240 static inline int rasterFallbacksMask(bool warn) 241 { 183 242 #ifdef QT_DIRECTFB_WARN_ON_RASTERFALLBACKS 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 184 263 template <typename device, typename T1, typename T2, typename T3> 185 264 static void rasterFallbackWarn(const char *msg, const char *func, const device *dev, … … 191 270 #endif 192 271 193 #if defined QT_D IRECTFB_WARN_ON_RASTERFALLBACKS && defined QT_DIRECTFB_DISABLE_RASTERFALLBACKS272 #if defined QT_D 194 273 #define RASTERFALLBACK(op, one, two, three) \ 195 if (op & (QT_DIRECTFB_WARN_ON_RASTERFALLBACKS)) \ 196 rasterFallbackWarn("Disabled raster engine operation", \ 197 __FUNCTION__, state()->painter->device(), \ 198 d_func()->transformationType, \ 199 d_func()->simplePen, \ 200 d_func()->clipType, \ 201 d_func()->compositionModeStatus, \ 202 #one, one, #two, two, #three, three); \ 203 if (op & (QT_DIRECTFB_DISABLE_RASTERFALLBACKS)) \ 204 return; 274 { \ 275 const bool disable = op & rasterFallbacksMask(false); \ 276 if (op & rasterFallbacksMask(true)) \ 277 rasterFallbackWarn(disable \ 278 ? "Disabled raster engine operation" \ 279 : "Falling back to raster engine for", \ 280 __FUNCTION__, \ 281 state()->painter->device(), \ 282 d_func()->transformationType, \ 283 d_func()->simplePen, \ 284 d_func()->clipType, \ 285 d_func()->compositionModeStatus, \ 286 #one, one, #two, two, #three, three); \ 287 if (disable) \ 288 return; \ 289 } 205 290 #elif defined QT_DIRECTFB_DISABLE_RASTERFALLBACKS 206 #define RASTERFALLBACK(op, one, two, three) \207 if (op & (QT_DIRECTFB_DISABLE_RASTERFALLBACKS))\291 #define RASTERFALLBACK(op, one, two, three) \ 292 if (op & \ 208 293 return; 209 294 #elif defined QT_DIRECTFB_WARN_ON_RASTERFALLBACKS 210 295 #define RASTERFALLBACK(op, one, two, three) \ 211 if (op & (QT_DIRECTFB_WARN_ON_RASTERFALLBACKS))\296 if (op & \ 212 297 rasterFallbackWarn("Falling back to raster engine for", \ 213 298 __FUNCTION__, state()->painter->device(), \ … … 288 373 device->devType()); 289 374 } 375 290 376 291 377 d->prepare(d->dfbDevice); … … 414 500 || d->clipType == QDirectFBPaintEnginePrivate::ComplexClip 415 501 || !d->isSimpleBrush(brush) 416 || ! d->testCompositionMode(&pen, &brush)) {502 || !)) { 417 503 RASTERFALLBACK(DRAW_RECTS, rectCount, VOID_ARG(), VOID_ARG()); 418 504 d->lock(); …
