497
498
499
500
501
502
503
504
505
506
507
508
509
510
|
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
|
+
|
u64 mask;
int hasDup = 0; /* True if one or more isDup entries */
const char *zTrunk;
u8 *aMap; /* Copy of p->aiRailMap */
int omitDescenders = (tmFlags & TIMELINE_DISJOINT)!=0;
int nTimewarp = 0;
int riserMargin = (tmFlags & TIMELINE_DISJOINT) ? 0 : RISER_MARGIN;
int offPageMergeRail = -1;
/* If mergeRiserFrom[X]==Y that means rail X holds a merge riser
** coming up from the bottom of the graph from off-screen check-in Y
** where Y is the RID. There is no riser on rail X if mergeRiserFrom[X]==0.
*/
GraphRowId mergeRiserFrom[GR_MAX_RAIL];
|
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
|
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
pDesc = hashFind(p, parentRid);
if( pDesc==0 ){
int iMrail = -1;
/* Merge from a node that is off-screen */
if( iReuseIdx>=p->nRow+1 ){
continue; /* Suppress multiple off-screen merges */
}
#if 1
/* Display option #1 for off-page merge lines:
**
** Use a single rail for all merge lines that go to the bottom of
** the page.
*/
if( offPageMergeRail>=0 ){
iMrail = offPageMergeRail;
}else{
iMrail = findFreeRail(p, pRow->idx, p->pLast->idx, 0, 1);
if( p->mxRail>=GR_MAX_RAIL ) return;
mergeRiserFrom[iMrail] = parentRid;
offPageMergeRail = iMrail;
}
#else
/* Display option #2 for off-page merge lines:
**
** Use separate rails for each distinct parent node that is
** off of the bottom of the page.
*/
for(j=0; j<GR_MAX_RAIL; j++){
if( mergeRiserFrom[j]==parentRid ){
iMrail = j;
break;
}
}
if( iMrail==-1 ){
iMrail = findFreeRail(p, pRow->idx, p->pLast->idx, 0, 1);
if( p->mxRail>=GR_MAX_RAIL ) return;
mergeRiserFrom[iMrail] = parentRid;
}
#endif
iReuseIdx = p->nRow+1;
iReuseRail = iMrail;
mask = BIT(iMrail);
if( i>=pRow->nNonCherrypick ){
pRow->mergeIn[iMrail] = 2;
pRow->cherrypickDown |= mask;
}else{
|