diff options
author | Marc Mutz <marc.mutz@qt.io> | 2022-11-07 17:40:06 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-11-11 16:48:51 +0000 |
commit | 660d4a0131adeb796ac2d9ee5927402f57a8e8e3 (patch) | |
tree | 53a9e402cfae5d2b8b4053db5f2398599762c4cb | |
parent | efb74636567d9eff3366e439faf37eea5d6d3668 (diff) |
Expand QSpan typedef to underlying type QT_FT_Span
This frees up the QSpan name for the planned QtCore std::span
reimplementation, also called QSpan.
This is binary compatible because QSpan was just a typedef and because
it's all private API.
Task-number: QTBUG-108124
Change-Id: I3b5c1ea82673934e2d1eb490fddeae3f8e6a6ea3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
-rw-r--r-- | src/gui/painting/qdrawhelper.cpp | 62 | ||||
-rw-r--r-- | src/gui/painting/qdrawhelper_p.h | 4 | ||||
-rw-r--r-- | src/gui/painting/qpaintengine_raster.cpp | 50 | ||||
-rw-r--r-- | src/gui/painting/qpaintengine_raster_p.h | 16 |
4 files changed, 66 insertions, 66 deletions
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index e5d322e1dc..91813971f1 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -3600,7 +3600,7 @@ static TextureBlendType getBlendType(const QSpanData *data) return ft; } -static inline Operator getOperator(const QSpanData *data, const QSpan *spans, int spanCount) +static inline Operator getOperator(const QSpanData *data, const QT_FT_Span *spans, int spanCount) { Operator op; bool solidSource = false; @@ -3682,7 +3682,7 @@ static inline Operator getOperator(const QSpanData *data, const QSpan *spans, in #endif if (op.mode == QPainter::CompositionMode_Source && (data->type != QSpanData::Texture || data->texture.const_alpha == 256)) { - const QSpan *lastSpan = spans + spanCount; + const QT_FT_Span *lastSpan = spans + spanCount; bool alphaSpans = false; while (spans < lastSpan) { if (spans->coverage != 255) { @@ -3796,7 +3796,7 @@ static void spanfill_from_first(QRasterBuffer *rasterBuffer, QPixelLayout::BPP b #define QT_THREAD_PARALLEL_FILLS(function) function(0, count) #endif -static void blend_color_generic(int count, const QSpan *spans, void *userData) +static void blend_color_generic(int count, const QT_FT_Span *spans, void *userData) { QSpanData *data = reinterpret_cast<QSpanData *>(userData); const Operator op = getOperator(data, nullptr, 0); @@ -3830,7 +3830,7 @@ static void blend_color_generic(int count, const QSpan *spans, void *userData) QT_THREAD_PARALLEL_FILLS(function); } -static void blend_color_argb(int count, const QSpan *spans, void *userData) +static void blend_color_argb(int count, const QT_FT_Span *spans, void *userData) { QSpanData *data = reinterpret_cast<QSpanData *>(userData); @@ -3867,7 +3867,7 @@ static void blend_color_argb(int count, const QSpan *spans, void *userData) QT_THREAD_PARALLEL_FILLS(function); } -static void blend_color_generic_rgb64(int count, const QSpan *spans, void *userData) +static void blend_color_generic_rgb64(int count, const QT_FT_Span *spans, void *userData) { #if QT_CONFIG(raster_64bit) QSpanData *data = reinterpret_cast<QSpanData *>(userData); @@ -3911,7 +3911,7 @@ static void blend_color_generic_rgb64(int count, const QSpan *spans, void *userD #endif } -static void blend_color_generic_fp(int count, const QSpan *spans, void *userData) +static void blend_color_generic_fp(int count, const QT_FT_Span *spans, void *userData) { #if QT_CONFIG(raster_fp) QSpanData *data = reinterpret_cast<QSpanData *>(userData); @@ -3958,7 +3958,7 @@ static void blend_color_generic_fp(int count, const QSpan *spans, void *userData } template <typename T> -void handleSpans(int count, const QSpan *spans, const QSpanData *data, const Operator &op) +void handleSpans(int count, const QT_FT_Span *spans, const QSpanData *data, const Operator &op) { const int const_alpha = (data->type == QSpanData::Texture) ? data->texture.const_alpha : 256; const bool solidSource = op.mode == QPainter::CompositionMode_Source && const_alpha == 256; @@ -4130,7 +4130,7 @@ public: }; #endif -static void blend_src_generic(int count, const QSpan *spans, void *userData) +static void blend_src_generic(int count, const QT_FT_Span *spans, void *userData) { QSpanData *data = reinterpret_cast<QSpanData *>(userData); const Operator op = getOperator(data, nullptr, 0); @@ -4138,7 +4138,7 @@ static void blend_src_generic(int count, const QSpan *spans, void *userData) } #if QT_CONFIG(raster_64bit) -static void blend_src_generic_rgb64(int count, const QSpan *spans, void *userData) +static void blend_src_generic_rgb64(int count, const QT_FT_Span *spans, void *userData) { QSpanData *data = reinterpret_cast<QSpanData *>(userData); const Operator op = getOperator(data, nullptr, 0); @@ -4152,7 +4152,7 @@ static void blend_src_generic_rgb64(int count, const QSpan *spans, void *userDat #endif #if QT_CONFIG(raster_fp) -static void blend_src_generic_fp(int count, const QSpan *spans, void *userData) +static void blend_src_generic_fp(int count, const QT_FT_Span *spans, void *userData) { QSpanData *data = reinterpret_cast<QSpanData *>(userData); const Operator op = getOperator(data, spans, count); @@ -4165,7 +4165,7 @@ static void blend_src_generic_fp(int count, const QSpan *spans, void *userData) } #endif -static void blend_untransformed_generic(int count, const QSpan *spans, void *userData) +static void blend_untransformed_generic(int count, const QT_FT_Span *spans, void *userData) { QSpanData *data = reinterpret_cast<QSpanData *>(userData); @@ -4219,7 +4219,7 @@ static void blend_untransformed_generic(int count, const QSpan *spans, void *use } #if QT_CONFIG(raster_64bit) -static void blend_untransformed_generic_rgb64(int count, const QSpan *spans, void *userData) +static void blend_untransformed_generic_rgb64(int count, const QT_FT_Span *spans, void *userData) { QSpanData *data = reinterpret_cast<QSpanData *>(userData); @@ -4278,7 +4278,7 @@ static void blend_untransformed_generic_rgb64(int count, const QSpan *spans, voi #endif #if QT_CONFIG(raster_fp) -static void blend_untransformed_generic_fp(int count, const QSpan *spans, void *userData) +static void blend_untransformed_generic_fp(int count, const QT_FT_Span *spans, void *userData) { QSpanData *data = reinterpret_cast<QSpanData *>(userData); @@ -4335,7 +4335,7 @@ static void blend_untransformed_generic_fp(int count, const QSpan *spans, void * } #endif -static void blend_untransformed_argb(int count, const QSpan *spans, void *userData) +static void blend_untransformed_argb(int count, const QT_FT_Span *spans, void *userData) { QSpanData *data = reinterpret_cast<QSpanData *>(userData); if (data->texture.format != QImage::Format_ARGB32_Premultiplied @@ -4432,7 +4432,7 @@ static inline void blend_sourceOver_rgb16_rgb16(quint16 *Q_DECL_RESTRICT dest, } } -static void blend_untransformed_rgb565(int count, const QSpan *spans, void *userData) +static void blend_untransformed_rgb565(int count, const QT_FT_Span *spans, void *userData) { QSpanData *data = reinterpret_cast<QSpanData*>(userData); QPainter::CompositionMode mode = data->rasterBuffer->compositionMode; @@ -4489,7 +4489,7 @@ static void blend_untransformed_rgb565(int count, const QSpan *spans, void *user QT_THREAD_PARALLEL_FILLS(function); } -static void blend_tiled_generic(int count, const QSpan *spans, void *userData) +static void blend_tiled_generic(int count, const QT_FT_Span *spans, void *userData) { QSpanData *data = reinterpret_cast<QSpanData *>(userData); @@ -4542,7 +4542,7 @@ static void blend_tiled_generic(int count, const QSpan *spans, void *userData) } #if QT_CONFIG(raster_64bit) -static void blend_tiled_generic_rgb64(int count, const QSpan *spans, void *userData) +static void blend_tiled_generic_rgb64(int count, const QT_FT_Span *spans, void *userData) { QSpanData *data = reinterpret_cast<QSpanData *>(userData); @@ -4650,7 +4650,7 @@ static void blend_tiled_generic_rgb64(int count, const QSpan *spans, void *userD #endif #if QT_CONFIG(raster_fp) -static void blend_tiled_generic_fp(int count, const QSpan *spans, void *userData) +static void blend_tiled_generic_fp(int count, const QT_FT_Span *spans, void *userData) { QSpanData *data = reinterpret_cast<QSpanData *>(userData); @@ -4708,7 +4708,7 @@ static void blend_tiled_generic_fp(int count, const QSpan *spans, void *userData } #endif -static void blend_tiled_argb(int count, const QSpan *spans, void *userData) +static void blend_tiled_argb(int count, const QT_FT_Span *spans, void *userData) { QSpanData *data = reinterpret_cast<QSpanData *>(userData); if (data->texture.format != QImage::Format_ARGB32_Premultiplied @@ -4761,7 +4761,7 @@ static void blend_tiled_argb(int count, const QSpan *spans, void *userData) QT_THREAD_PARALLEL_FILLS(function); } -static void blend_tiled_rgb565(int count, const QSpan *spans, void *userData) +static void blend_tiled_rgb565(int count, const QT_FT_Span *spans, void *userData) { QSpanData *data = reinterpret_cast<QSpanData*>(userData); QPainter::CompositionMode mode = data->rasterBuffer->compositionMode; @@ -4909,7 +4909,7 @@ static const ProcessSpans processTextureSpansGenericFP[NBlendTypes] = { blend_src_generic_fp // TransformedBilinearTiled }; #endif -void qBlendTexture(int count, const QSpan *spans, void *userData) +void qBlendTexture(int count, const QT_FT_Span *spans, void *userData) { QSpanData *data = reinterpret_cast<QSpanData *>(userData); TextureBlendType blendType = getBlendType(data); @@ -4964,7 +4964,7 @@ void qBlendTexture(int count, const QSpan *spans, void *userData) proc(count, spans, userData); } -static void blend_vertical_gradient_argb(int count, const QSpan *spans, void *userData) +static void blend_vertical_gradient_argb(int count, const QT_FT_Span *spans, void *userData) { QSpanData *data = reinterpret_cast<QSpanData *>(userData); @@ -5005,7 +5005,7 @@ static void blend_vertical_gradient_argb(int count, const QSpan *spans, void *us } template<ProcessSpans blend_color> -static void blend_vertical_gradient(int count, const QSpan *spans, void *userData) +static void blend_vertical_gradient(int count, const QT_FT_Span *spans, void *userData) { QSpanData *data = reinterpret_cast<QSpanData *>(userData); @@ -5031,7 +5031,7 @@ static void blend_vertical_gradient(int count, const QSpan *spans, void *userDat } } -void qBlendGradient(int count, const QSpan *spans, void *userData) +void qBlendGradient(int count, const QT_FT_Span *spans, void *userData) { QSpanData *data = reinterpret_cast<QSpanData *>(userData); bool isVerticalGradient = @@ -5313,7 +5313,7 @@ static void qt_alphamapblit_generic(QRasterBuffer *rasterBuffer, const QClipData::ClipLine &line = clip->m_clipLines[yp]; for (int i=0; i<line.count; ++i) { - const QSpan &clip = line.spans[i]; + const QT_FT_Span &clip = line.spans[i]; int start = qMax<int>(x, clip.x); int end = qMin<int>(x + mapWidth, clip.x + clip.len); @@ -5387,7 +5387,7 @@ static void qt_alphamapblit_generic(QRasterBuffer *rasterBuffer, const QClipData::ClipLine &line = clip->m_clipLines[yp]; for (int i=0; i<line.count; ++i) { - const QSpan &clip = line.spans[i]; + const QT_FT_Span &clip = line.spans[i]; int start = qMax<int>(x, clip.x); int end = qMin<int>(x + mapWidth, clip.x + clip.len); @@ -5455,7 +5455,7 @@ void qt_alphamapblit_quint16(QRasterBuffer *rasterBuffer, quint16 *dest = reinterpret_cast<quint16*>(rasterBuffer->scanLine(yp)); for (int i=0; i<line.count; ++i) { - const QSpan &clip = line.spans[i]; + const QT_FT_Span &clip = line.spans[i]; int start = qMax<int>(x, clip.x); int end = qMin<int>(x + mapWidth, clip.x + clip.len); @@ -5512,7 +5512,7 @@ static void qt_alphamapblit_argb32(QRasterBuffer *rasterBuffer, quint32 *dest = reinterpret_cast<quint32 *>(rasterBuffer->scanLine(yp)); for (int i=0; i<line.count; ++i) { - const QSpan &clip = line.spans[i]; + const QT_FT_Span &clip = line.spans[i]; int start = qMax<int>(x, clip.x); int end = qMin<int>(x + mapWidth, clip.x + clip.len); @@ -5692,7 +5692,7 @@ static void qt_alphargbblit_generic(QRasterBuffer *rasterBuffer, const QClipData::ClipLine &line = clip->m_clipLines[yp]; for (int i=0; i<line.count; ++i) { - const QSpan &clip = line.spans[i]; + const QT_FT_Span &clip = line.spans[i]; int start = qMax<int>(x, clip.x); int end = qMin<int>(x + mapWidth, clip.x + clip.len); @@ -5765,7 +5765,7 @@ static void qt_alphargbblit_generic(QRasterBuffer *rasterBuffer, const QClipData::ClipLine &line = clip->m_clipLines[yp]; for (int i=0; i<line.count; ++i) { - const QSpan &clip = line.spans[i]; + const QT_FT_Span &clip = line.spans[i]; int start = qMax<int>(x, clip.x); int end = qMin<int>(x + mapWidth, clip.x + clip.len); @@ -5831,7 +5831,7 @@ static void qt_alphargbblit_argb32(QRasterBuffer *rasterBuffer, quint32 *dst = reinterpret_cast<quint32 *>(rasterBuffer->scanLine(yp)); for (int i=0; i<line.count; ++i) { - const QSpan &clip = line.spans[i]; + const QT_FT_Span &clip = line.spans[i]; int start = qMax<int>(x, clip.x); int end = qMin<int>(x + mapWidth, clip.x + clip.len); diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h index 5b6f5ce216..ba723890ff 100644 --- a/src/gui/painting/qdrawhelper_p.h +++ b/src/gui/painting/qdrawhelper_p.h @@ -147,8 +147,8 @@ struct quint24 { uchar data[3]; }; -void qBlendGradient(int count, const QSpan *spans, void *userData); -void qBlendTexture(int count, const QSpan *spans, void *userData); +void qBlendGradient(int count, const QT_FT_Span *spans, void *userData); +void qBlendTexture(int count, const QT_FT_Span *spans, void *userData); #ifdef __SSE2__ extern void (*qt_memfill64)(quint64 *dest, quint64 value, qsizetype count); extern void (*qt_memfill32)(quint32 *dest, quint32 value, qsizetype count); diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index 1a2dbb6a9f..2df690cd7c 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -144,9 +144,9 @@ bool QRasterPaintEngine::clearTypeFontsEnabled() /******************************************************************************** * Span functions */ -static void qt_span_fill_clipRect(int count, const QSpan *spans, void *userData); -static void qt_span_fill_clipped(int count, const QSpan *spans, void *userData); -static void qt_span_clip(int count, const QSpan *spans, void *userData); +static void qt_span_fill_clipRect(int count, const QT_FT_Span *spans, void *userData); +static void qt_span_fill_clipped(int count, const QT_FT_Span *spans, void *userData); +static void qt_span_clip(int count, const QT_FT_Span *spans, void *userData); struct ClipData { @@ -2662,7 +2662,7 @@ void QRasterPaintEngine::alphaPenBlt(const void* src, int bpl, int depth, int rx return; const int NSPANS = 512; - QSpan spans[NSPANS]; + QT_FT_Span spans[NSPANS]; int current = 0; const int x1 = x0 + w; @@ -3819,7 +3819,7 @@ void QClipData::initialize() const int numRects = clipRegion.rectCount(); const int maxSpans = (ymax - ymin) * numRects; allocated = qMax(allocated, maxSpans); - m_spans = (QSpan *)malloc(allocated * sizeof(QSpan)); + m_spans = (QT_FT_Span *)malloc(allocated * sizeof(QT_FT_Span)); Q_CHECK_PTR(m_spans); int y = 0; @@ -3845,7 +3845,7 @@ void QClipData::initialize() for (int r = firstInBand; r <= lastInBand; ++r) { const QRect &currRect = rects[r]; - QSpan *span = m_spans + count; + QT_FT_Span *span = m_spans + count; span->x = currRect.x(); span->len = currRect.width(); span->y = y; @@ -3869,7 +3869,7 @@ void QClipData::initialize() return; } - m_spans = (QSpan *)malloc(allocated * sizeof(QSpan)); + m_spans = (QT_FT_Span *)malloc(allocated * sizeof(QT_FT_Span)); Q_CHECK_PTR(m_spans); if (hasRectClip) { @@ -3882,7 +3882,7 @@ void QClipData::initialize() const int len = clipRect.width(); while (y < ymax) { - QSpan *span = m_spans + count; + QT_FT_Span *span = m_spans + count; span->x = xmin; span->len = len; span->y = y; @@ -4021,16 +4021,16 @@ void QClipData::setClipRegion(const QRegion ®ion) \internal spans must be sorted on y */ -static const QSpan *qt_intersect_spans(const QClipData *clip, int *currentClip, - const QSpan *spans, const QSpan *end, - QSpan **outSpans, int available) +static const QT_FT_Span *qt_intersect_spans(const QClipData *clip, int *currentClip, + const QT_FT_Span *spans, const QT_FT_Span *end, + QT_FT_Span **outSpans, int available) { const_cast<QClipData *>(clip)->initialize(); - QSpan *out = *outSpans; + QT_FT_Span *out = *outSpans; - const QSpan *clipSpans = clip->m_spans + *currentClip; - const QSpan *clipEnd = clip->m_spans + clip->count; + const QT_FT_Span *clipSpans = clip->m_spans + *currentClip; + const QT_FT_Span *clipEnd = clip->m_spans + clip->count; while (available && spans < end ) { if (clipSpans >= clipEnd) { @@ -4084,7 +4084,7 @@ static const QSpan *qt_intersect_spans(const QClipData *clip, int *currentClip, return spans; } -static void qt_span_fill_clipped(int spanCount, const QSpan *spans, void *userData) +static void qt_span_fill_clipped(int spanCount, const QT_FT_Span *spans, void *userData) { // qDebug() << "qt_span_fill_clipped" << spanCount; QSpanData *fillData = reinterpret_cast<QSpanData *>(userData); @@ -4092,11 +4092,11 @@ static void qt_span_fill_clipped(int spanCount, const QSpan *spans, void *userDa Q_ASSERT(fillData->blend && fillData->unclipped_blend); const int NSPANS = 512; - QSpan cspans[NSPANS]; + QT_FT_Span cspans[NSPANS]; int currentClip = 0; - const QSpan *end = spans + spanCount; + const QT_FT_Span *end = spans + spanCount; while (spans < end) { - QSpan *clipped = cspans; + QT_FT_Span *clipped = cspans; spans = qt_intersect_spans(fillData->clip, ¤tClip, spans, end, &clipped, NSPANS); // qDebug() << "processed " << spanCount - (end - spans) << "clipped" << clipped-cspans // << "span:" << cspans->x << cspans->y << cspans->len << spans->coverage; @@ -4148,7 +4148,7 @@ static int qt_intersect_spans(QT_FT_Span *&spans, int numSpans, } -static void qt_span_fill_clipRect(int count, const QSpan *spans, +static void qt_span_fill_clipRect(int count, const QT_FT_Span *spans, void *userData) { QSpanData *fillData = reinterpret_cast<QSpanData *>(userData); @@ -4157,7 +4157,7 @@ static void qt_span_fill_clipRect(int count, const QSpan *spans, Q_ASSERT(fillData->clip); Q_ASSERT(!fillData->clip->clipRect.isEmpty()); - QSpan *s = const_cast<QSpan *>(spans); + QT_FT_Span *s = const_cast<QT_FT_Span *>(spans); // hw: check if this const_cast<> is safe!!! count = qt_intersect_spans(s, count, fillData->clip->clipRect); @@ -4165,7 +4165,7 @@ static void qt_span_fill_clipRect(int count, const QSpan *spans, fillData->unclipped_blend(count, s, fillData); } -static void qt_span_clip(int count, const QSpan *spans, void *userData) +static void qt_span_clip(int count, const QT_FT_Span *spans, void *userData) { ClipData *clipData = reinterpret_cast<ClipData *>(userData); @@ -4182,14 +4182,14 @@ static void qt_span_clip(int count, const QSpan *spans, void *userData) newClip->initialize(); int currentClip = 0; - const QSpan *end = spans + count; + const QT_FT_Span *end = spans + count; while (spans < end) { - QSpan *newspans = newClip->m_spans + newClip->count; + QT_FT_Span *newspans = newClip->m_spans + newClip->count; spans = qt_intersect_spans(clipData->oldClip, ¤tClip, spans, end, &newspans, newClip->allocated - newClip->count); newClip->count = newspans - newClip->m_spans; if (spans < end) { - newClip->m_spans = q_check_ptr((QSpan *)realloc(newClip->m_spans, newClip->allocated*2*sizeof(QSpan))); + newClip->m_spans = q_check_ptr((QT_FT_Span *)realloc(newClip->m_spans, newClip->allocated * 2 * sizeof(QT_FT_Span))); newClip->allocated *= 2; } } @@ -4870,7 +4870,7 @@ void dumpClip(int width, int height, const QClipData *clip) ((QClipData *) clip)->spans(); // Force allocation of the spans structure... for (int i = 0; i < clip->count; ++i) { - const QSpan *span = ((QClipData *) clip)->spans() + i; + const QT_FT_Span *span = ((QClipData *) clip)->spans() + i; for (int j = 0; j < span->len; ++j) clipImg.setPixel(span->x + j, span->y, 0xffffff00); x0 = qMin(x0, int(span->x)); diff --git a/src/gui/painting/qpaintengine_raster_p.h b/src/gui/painting/qpaintengine_raster_p.h index c6d723e0c3..ab0048af52 100644 --- a/src/gui/painting/qpaintengine_raster_p.h +++ b/src/gui/painting/qpaintengine_raster_p.h @@ -315,7 +315,7 @@ public: int clipSpanHeight; struct ClipLine { int count; - QSpan *spans; + QT_FT_Span *spans; } *m_clipLines; void initialize(); @@ -326,7 +326,7 @@ public: return m_clipLines; } - inline QSpan *spans() { + inline QT_FT_Span *spans() { if (!m_spans) initialize(); return m_spans; @@ -334,7 +334,7 @@ public: int allocated; int count; - QSpan *m_spans; + QT_FT_Span *m_spans; int xmin, xmax, ymin, ymax; QRect clipRect; @@ -345,7 +345,7 @@ public: uint hasRegionClip : 1; void appendSpan(int x, int length, int y, int coverage); - void appendSpans(const QSpan *s, int num); + void appendSpans(const QT_FT_Span *s, int num); // ### Should optimize and actually kill the QSpans if the rect is // ### a subset of The current region. Thus the "fast" clipspan @@ -361,7 +361,7 @@ inline void QClipData::appendSpan(int x, int length, int y, int coverage) if (count == allocated) { allocated *= 2; - m_spans = (QSpan *)realloc(m_spans, allocated*sizeof(QSpan)); + m_spans = (QT_FT_Span *)realloc(m_spans, allocated*sizeof(QT_FT_Span)); } m_spans[count].x = x; m_spans[count].len = length; @@ -370,7 +370,7 @@ inline void QClipData::appendSpan(int x, int length, int y, int coverage) ++count; } -inline void QClipData::appendSpans(const QSpan *s, int num) +inline void QClipData::appendSpans(const QT_FT_Span *s, int num) { Q_ASSERT(m_spans); @@ -378,9 +378,9 @@ inline void QClipData::appendSpans(const QSpan *s, int num) do { allocated *= 2; } while (count + num > allocated); - m_spans = (QSpan *)realloc(m_spans, allocated*sizeof(QSpan)); + m_spans = (QT_FT_Span *)realloc(m_spans, allocated*sizeof(QT_FT_Span)); } - memcpy(m_spans+count, s, num*sizeof(QSpan)); + memcpy(m_spans+count, s, num*sizeof(QT_FT_Span)); count += num; } |