Changeset 561 for trunk/src/gui/painting/qtessellator.cpp
- Timestamp:
- Feb 11, 2010, 11:19:06 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/vendor/nokia/qt/4.6.1 merged eligible /branches/vendor/nokia/qt/current merged eligible /branches/vendor/trolltech/qt/current 3-149
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/src/gui/painting/qtessellator.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtGui module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 55 55 #define QDEBUG qDebug 56 56 #else 57 #define QDEBUG if (1) ;else qDebug57 #define QDEBUG if (1){} else qDebug 58 58 #endif 59 59 … … 407 407 max_edges = maxActiveEdges; 408 408 int s = qMax(maxActiveEdges + 1, default_alloc + 1); 409 edges = (Edge **)realloc(edges, s*sizeof(Edge *));410 edge_table = (Edge *)realloc(edge_table, s*sizeof(Edge));411 old = (Edge **)realloc(old, s*sizeof(Edge *));409 edges = q_check_ptr((Edge **)realloc(edges, s*sizeof(Edge *))); 410 edge_table = q_check_ptr((Edge *)realloc(edge_table, s*sizeof(Edge))); 411 old = q_check_ptr((Edge **)realloc(old, s*sizeof(Edge *))); 412 412 } 413 413 size = 0; … … 567 567 if (!storage || maxVertices > allocated) { 568 568 int size = qMax((int)default_alloc, maxVertices); 569 storage = (Vertex *)realloc(storage, size*sizeof(Vertex));570 sorted = (Vertex **)realloc(sorted, size*sizeof(Vertex *));569 storage = q_check_ptr((Vertex *)realloc(storage, size*sizeof(Vertex))); 570 sorted = q_check_ptr((Vertex **)realloc(sorted, size*sizeof(Vertex *))); 571 571 allocated = maxVertices; 572 572 } … … 704 704 }; 705 705 706 707 706 static void cancelEdges(QCoincidingEdge &e1, QCoincidingEdge &e2) 708 707 { … … 741 740 if (testListSize > tlSize - 2) { 742 741 tlSize = qMax(tlSize*2, 16); 743 tl = (QCoincidingEdge *)realloc(tl, tlSize*sizeof(QCoincidingEdge));742 tl = q_check_ptr((QCoincidingEdge *)realloc(tl, tlSize*sizeof(QCoincidingEdge))); 744 743 } 745 744 if (n->flags & (LineBeforeStarts|LineBeforeHorizontal)) { … … 1082 1081 } 1083 1082 QDEBUG() << " between edges " << e1->edge << "and" << e2->edge << "at point (" 1084 << Q27Dot5ToDouble(yi) << ")";1083 << Q27Dot5ToDouble(yi) << ')'; 1085 1084 1086 1085 Intersection i1; … … 1175 1174 Edge *e = scanline.edges[i]; 1176 1175 QDEBUG() << " " << i << e->edge << "isect=(" << e->intersect_left << e->intersect_right 1177 << ")";1176 << ')'; 1178 1177 } 1179 1178 #endif … … 1241 1240 << "point=" << d->vertices.position(d->vertices.sorted[i]) 1242 1241 << "flags=" << d->vertices.sorted[i]->flags 1243 << "pos=(" << Q27Dot5ToDouble(d->vertices.sorted[i]->x) << "/"1244 << Q27Dot5ToDouble(d->vertices.sorted[i]->y) << ")";1242 << "pos=(" << Q27Dot5ToDouble(d->vertices.sorted[i]->x) << '/' 1243 << Q27Dot5ToDouble(d->vertices.sorted[i]->y) << ')'; 1245 1244 } 1246 1245 #endif … … 1272 1271 QDEBUG() << " " << d->scanline.edges[i]->edge 1273 1272 << "p0= (" << Q27Dot5ToDouble(d->scanline.edges[i]->v0->x) 1274 << "/"<< Q27Dot5ToDouble(d->scanline.edges[i]->v0->y)1273 << '/' << Q27Dot5ToDouble(d->scanline.edges[i]->v0->y) 1275 1274 << ") p1= (" << Q27Dot5ToDouble(d->scanline.edges[i]->v1->x) 1276 << "/" << Q27Dot5ToDouble(d->scanline.edges[i]->v1->y) << ")"1275 << '/' << Q27Dot5ToDouble(d->scanline.edges[i]->v1->y) << ')' 1277 1276 << "x=" << Q27Dot5ToDouble(d->scanline.edges[i]->positionAt(d->y)) 1278 1277 << "isLeftOfNext=" … … 1437 1436 qreal length = qSqrt(perp.x() * perp.x() + perp.y() * perp.y()); 1438 1437 1439 if (qFuzzy Compare(length + 1, static_cast<qreal>(1)))1438 if (qFuzzyIsNull(length)) 1440 1439 return; 1441 1440
Note:
See TracChangeset
for help on using the changeset viewer.