Home | History | Annotate | Download | only in gpu

Lines Matching refs:Segment

64 using LoopBlinnPathProcessorImplementation::Segment;
90 class Segment;
113 struct ValueToString<LoopBlinnPathProcessorImplementation::Segment*> {
114 static String string(LoopBlinnPathProcessorImplementation::Segment* const& value)
124 // Segment
127 // Describes a segment of the path: either a cubic or a line segment.
131 class Segment {
132 WTF_MAKE_NONCOPYABLE(Segment);
140 Segment()
192 Segment* next() const { return m_next; }
193 Segment* prev() const { return m_prev; }
195 void setNext(Segment* next) { m_next = next; }
196 void setPrev(Segment* prev) { m_prev = prev; }
198 // The contour this segment belongs to.
201 // Subdivides the current segment at the given parameter value (0 <=
204 // Segment.
205 Segment* subdivide(float param)
209 Segment* left = m_arena->allocateObject<Segment>();
210 Segment* right = m_arena->allocateObject<Segment>();
221 Segment* n = next();
232 // Subdivides the current segment at the halfway point and replaces
234 // possible. Returns a pointer to the leftmost Segment.
235 Segment* subdivide() { return subdivide(0.5f); }
240 // point and extending to x=+infinity crosses this segment. Outgoing
242 // endpoint or tangent point of the segment, indicating that another
254 // segment. This operation only makes sense for cubic type segments.
261 // this segment.
269 // Fetches the given control point triangle for this segment.
276 // Number of vertices along the inside edge of this segment. This
316 builder.append("[Segment kind=");
330 // Computes the bounding box of this Segment.
347 Segment* m_prev;
348 Segment* m_next;
373 void add(Segment* segment)
377 // segment.
378 segment->setNext(m_first);
379 segment->setPrev(m_first);
380 m_first->setNext(segment);
381 m_first->setPrev(segment);
382 m_first = segment;
386 Segment* last = m_sentinel.prev();
387 last->setNext(segment);
388 segment->setPrev(last);
389 segment->setNext(&m_sentinel);
390 m_sentinel.setPrev(segment);
395 // Subdivides the given segment at the given parametric value.
397 // subdivided segment.
398 Segment* subdivide(Segment* segment, float param)
400 Segment* left = segment->subdivide(param);
401 if (m_first == segment)
406 // Subdivides the given segment at the halfway point. Returns a
408 // segment.
409 Segment* subdivide(Segment* segment)
411 Segment* left = segment->subdivide();
412 if (m_first == segment)
417 // Returns the first segment in the contour for iteration.
418 Segment* begin() const { return m_first; }
420 // Returns the last segment in the contour for iteration. Callers
421 // should not iterate over this segment. In other words:
422 // for (Segment* cur = contour->begin();
427 Segment* end()
440 for (Segment* cur = begin(); cur != end(); cur = cur->next()) {
465 // The start of the segment chain. The segments are kept in a
468 Segment* m_first;
472 Segment m_sentinel;
484 // Segment
487 // Definition of Segment::triangulate(), which must come after
489 void Segment::triangulate(LoopBlinnLocalTriangulator::InsideEdgeComputation computeInsideEdges,
559 for (Segment* seg = cur->begin(); seg != cur->end(); seg = seg->next()) {
560 if (seg->kind() == Segment::Cubic) {
645 Segment* segment = m_arena->allocateObject<Segment>();
647 segment->setup(m_arena.get(), contour, curPoint, points[1]);
652 contour->add(segment);
655 segment->setup(m_arena.get(), contour, points[0], points[1]);
660 contour->add(segment);
669 Segment* segment = m_arena->allocateObject<Segment>();
670 segment->setup(m_arena.get(), contour,
676 contour->add(segment);
681 Segment* segment = m_arena->allocateObject<Segment>();
682 segment->setup(m_arena.get(), contour, points[0], points[1], points[2], points[3]);
687 contour->add(segment);
692 Segment* segment = m_arena->allocateObject<Segment>();
693 segment->setup(m_arena.get(), contour, curPoint, moveToPoint);
698 contour->add(segment);
713 Vector<Segment*> LoopBlinnPathProcessor::allSegmentsOverlappingY(Contour* queryContour, float x, float y)
715 Vector<Segment*> res;
718 for (Segment* seg = cur->begin(); seg != cur->end(); seg = seg->next()) {
735 // which side of each curve segment to fill based on its
742 PODIntervalTree<float, Segment*> tree(m_arena);
743 typedef PODIntervalTree<float, Segment*>::IntervalType IntervalType;
748 for (Segment* seg = cur->begin(); seg != cur->end(); seg = seg->next()) {
754 // Now iterate through the contours and pick a random segment (in
755 // this case we use the first) and a random point on that segment.
774 // good casting point. We could as well evaluate a segment to
776 for (Segment* seg = cur->begin();
785 Vector<Segment*> slowOverlaps = allSegmentsOverlappingY(cur, seg->getPoint(0).x(), seg->getPoint(0).y());
801 Segment* querySegment = interval.data();
814 LOG_ERROR("Query segment: %s", querySegment->toString().ascii().data());
822 } // for (Segment* seg = cur->begin(); ...
838 for (Segment* seg = contour->begin();
841 int limit = (seg->kind() == Segment::Cubic) ? 4 : 2;
871 , segment(0)
877 // The segment the triangle is associated with
878 Segment* segment;
937 // (from different segments, not the same segment) and, if any
956 Vector<Segment*> curSegments;
957 Vector<Segment*> nextSegments;
962 for (Segment* seg = cur->begin(); seg != cur->end(); seg = seg->next()) {
963 if (seg->kind() == Segment::Cubic) {
981 for (Vector<Segment*>::iterator iter = curSegments.begin(); iter != curSegments.end(); ++iter) {
982 Segment* seg = *iter;
983 ASSERT(seg->kind() == Segment::Cubic);
995 data->segment = seg;
1018 // See whether the associated segment has been subdivided yet
1019 if (!event.interval().data()->segment->markedForSubdivision()) {
1026 // Only pay attention to overlaps from a different Segment
1027 if (event.interval().data()->segment != overlap.data()->segment) {
1033 Segment* seg = event.interval().data()->segment;
1035 seg = overlap.data()->segment;
1054 void LoopBlinnPathProcessor::conditionallySubdivide(Segment* seg, Vector<Segment*>& nextSegments)
1058 Segment* next = seg->contour()->subdivide(seg);
1073 Vector<Segment*> curSegments;
1074 Vector<Segment*> nextSegments;
1079 for (Segment* seg = cur->begin(); seg != cur->end(); seg = seg->next()) {
1080 if (seg->kind() == Segment::Cubic) {
1095 for (Vector<Segment*>::iterator iter = curSegments.begin(); iter != curSegments.end(); ++iter) {
1096 Segment* seg = *iter;
1097 ASSERT(seg->kind() == Segment::Cubic);
1098 for (Vector<Segment*>::iterator iter2 = curSegments.begin();
1101 Segment* seg2 = *iter2;
1102 ASSERT(seg2->kind() == Segment::Cubic);
1182 for (Segment* seg = cur->begin(); seg != cur->end(); seg = seg->next()) {