Changeset View
Changeset View
Standalone View
Standalone View
src/kitemviews/private/kpixmapmodifier.cpp
Context not available. | |||||
38 | #include <QImage> | 38 | #include <QImage> | ||
---|---|---|---|---|---|
39 | #include <QPainter> | 39 | #include <QPainter> | ||
40 | 40 | | |||
41 | static const quint32 stackBlur8Mul[255] = | 41 | static constexpr std::array<quint32, 255> stackBlur8Mul{{ | ||
42 | { | | |||
43 | 512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512, | 42 | 512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512, | ||
44 | 454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512, | 43 | 454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512, | ||
45 | 482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456, | 44 | 482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456, | ||
Context not available. | |||||
56 | 385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335, | 55 | 385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335, | ||
57 | 332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292, | 56 | 332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292, | ||
58 | 289,287,285,282,280,278,275,273,271,269,267,265,263,261,259 | 57 | 289,287,285,282,280,278,275,273,271,269,267,265,263,261,259 | ||
59 | }; | 58 | }}; | ||
60 | 59 | | |||
61 | static const quint32 stackBlur8Shr[255] = | 60 | static constexpr std::array<quint32, 255> stackBlur8Shr{{ | ||
62 | { | | |||
63 | 9, 11, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, | 61 | 9, 11, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, | ||
64 | 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, | 62 | 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, | ||
65 | 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, | 63 | 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, | ||
Context not available. | |||||
76 | 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, | 74 | 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, | ||
77 | 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, | 75 | 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, | ||
78 | 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24 | 76 | 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24 | ||
79 | }; | 77 | }}; | ||
80 | 78 | | |||
81 | static void blurHorizontal(QImage& image, unsigned int* stack, int div, int radius) | 79 | static void blurHorizontal(QImage& image, unsigned int* stack, int div, int radius) | ||
82 | { | 80 | { | ||
Context not available. | |||||
311 | p->fillRect(contentRect, Qt::transparent); | 309 | p->fillRect(contentRect, Qt::transparent); | ||
312 | } | 310 | } | ||
313 | 311 | | |||
314 | QPixmap m_tiles[NumTiles]; | 312 | std::array<QPixmap, NumTiles> m_tiles; | ||
315 | }; | 313 | }; | ||
316 | } | 314 | } | ||
317 | 315 | | |||
Context not available. |