diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2011-07-12 10:43:17 +0200 |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2011-07-21 09:21:22 +0200 |
commit | 070fc2f694beaa56fc191f1a3f6a1b9812f4ed35 (patch) | |
tree | f0eda411523493ef72a5f63734f471e5ebc13d31 | |
parent | 310519d6d11da546b23c1cba307f37c24e0a5c0b (diff) |
Get rid of unused function in qpaintengine_raster.cpp.
Change-Id: I43024c8a16c6ba9fd43df114df9e4d2d1abeea6d
Reviewed-on: http://codereview.qt.nokia.com/1734
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
-rw-r--r-- | src/gui/painting/qpaintengine_raster.cpp | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index b6b24d6abf..908fdf1183 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -152,7 +152,6 @@ extern bool qt_applefontsmoothing_enabled; 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_merge_clip(const QClipData *c1, const QClipData *c2, QClipData *result); struct ClipData { @@ -3498,76 +3497,6 @@ QRect QRasterPaintEngine::clipBoundingRect() const return QRect(clip->xmin, clip->ymin, clip->xmax - clip->xmin, clip->ymax - clip->ymin); } -static void qt_merge_clip(const QClipData *c1, const QClipData *c2, QClipData *result) -{ - Q_ASSERT(c1->clipSpanHeight == c2->clipSpanHeight && c1->clipSpanHeight == result->clipSpanHeight); - - QVarLengthArray<short, 4096> buffer; - - QClipData::ClipLine *c1ClipLines = const_cast<QClipData *>(c1)->clipLines(); - QClipData::ClipLine *c2ClipLines = const_cast<QClipData *>(c2)->clipLines(); - result->initialize(); - - for (int y = 0; y < c1->clipSpanHeight; ++y) { - const QSpan *c1_spans = c1ClipLines[y].spans; - int c1_count = c1ClipLines[y].count; - const QSpan *c2_spans = c2ClipLines[y].spans; - int c2_count = c2ClipLines[y].count; - - if (c1_count == 0 && c2_count == 0) - continue; - if (c1_count == 0) { - result->appendSpans(c2_spans, c2_count); - continue; - } else if (c2_count == 0) { - result->appendSpans(c1_spans, c1_count); - continue; - } - - // we need to merge the two - - // find required length - int max = qMax(c1_spans[c1_count - 1].x + c1_spans[c1_count - 1].len, - c2_spans[c2_count - 1].x + c2_spans[c2_count - 1].len); - buffer.resize(max); - memset(buffer.data(), 0, buffer.size() * sizeof(short)); - - // Fill with old spans. - for (int i = 0; i < c1_count; ++i) { - const QSpan *cs = c1_spans + i; - for (int j=cs->x; j<cs->x + cs->len; ++j) - buffer[j] = cs->coverage; - } - - // Fill with new spans - for (int i = 0; i < c2_count; ++i) { - const QSpan *cs = c2_spans + i; - for (int j = cs->x; j < cs->x + cs->len; ++j) { - buffer[j] += cs->coverage; - if (buffer[j] > 255) - buffer[j] = 255; - } - } - - int x = 0; - while (x<max) { - - // Skip to next span - while (x < max && buffer[x] == 0) ++x; - if (x >= max) break; - - int sx = x; - int coverage = buffer[x]; - - // Find length of span - while (x < max && buffer[x] == coverage) - ++x; - - result->appendSpan(sx, x - sx, y, coverage); - } - } -} - void QRasterPaintEnginePrivate::initializeRasterizer(QSpanData *data) { Q_Q(QRasterPaintEngine); |