fn scan_edges(&mut self, blitter: &mut Blitter, winding_mode: Winding) {
        let mut edge = self.active_edges;
        let mut winding = 0;

        // handle edges that begin to the left of the bitmap
        while let Some(mut e_ptr) = edge {
            let e = unsafe { e_ptr.as_mut() };
            if e.fullx >= 0 {
                break;
            }
            winding += e.winding as i32;
            edge = e.next;
        }

        let mut prevx = 0;
        while let Some(mut e_ptr) = edge {
            let e = unsafe { e_ptr.as_mut() };

            let inside = match winding_mode {
                Winding::EvenOdd => winding & 1 != 0,
                Winding::NonZero => winding != 0,
            };

            if inside {
                blitter.blit_span(
                    self.cur_y,
                    (prevx + (1 << 15)) >> 16,
                    (e.fullx + (1 << 15)) >> 16,
                );
            }

            if (e.fullx >> 16) >= self.width {
                break;
            }
            winding += e.winding as i32;
            prevx = e.fullx;
            edge = e.next;
        }

        // we don't need to worry about any edges beyond width
    }
// Skia does stepping and scanning of edges in a single
// pass over the edge list.
Skia does stepping and scanning of edges in a single
pass over the edge list.
Skia does stepping and scanning of edges in a single pass over the edge list .
fn scan_edges(&mut self, blitter: &mut Blitter, winding_mode: Winding) {
        let mut edge = self.active_edges;
        let mut winding = 0;
        // handle edges that begin to the left of the bitmap
        while let Some(mut e_ptr) = edge {
            let e = unsafe { e_ptr.as_mut() };
            if e.fullx >= 0 {
                break;
            }
            winding += e.winding as i32;
            edge = e.next;
        }
        let mut prevx = 0;
        while let Some(mut e_ptr) = edge {
            let e = unsafe { e_ptr.as_mut() };
            let inside = match winding_mode {
                Winding::EvenOdd => winding & 1 != 0,
                Winding::NonZero => winding != 0,
            };
            if inside {
                blitter.blit_span(
                    self.cur_y,
                    (prevx + (1 << 15)) >> 16,
                    (e.fullx + (1 << 15)) >> 16,
                );
            }
            if (e.fullx >> 16) >= self.width {
                break;
            }
            winding += e.winding as i32;
            prevx = e.fullx;
            edge = e.next;
        }
        // we don't need to worry about any edges beyond width
    }
fn scan_edges ( & mut self , blitter : & mut Blitter , winding_mode : Winding ) { let mut edge = self . active_edges ; let mut winding = 0 ; // handle edges that begin to the left of the bitmap while let Some ( mut e_ptr ) = edge { let e = unsafe { e_ptr . as_mut ( ) } ; if e . fullx >= 0 { break ; } winding += e . winding as i32 ; edge = e . next ; } let mut prevx = 0 ; while let Some ( mut e_ptr ) = edge { let e = unsafe { e_ptr . as_mut ( ) } ; let inside = match winding_mode { Winding :: EvenOdd => winding & 1 != 0 , Winding :: NonZero => winding != 0 , } ; if inside { blitter . blit_span ( self . cur_y , ( prevx + ( 1 << 15 ) ) >> 16 , ( e . fullx + ( 1 << 15 ) ) >> 16 , ) ; } if ( e . fullx >> 16 ) >= self . width { break ; } winding += e . winding as i32 ; prevx = e . fullx ; edge = e . next ; } // we don't need to worry about any edges beyond width }
Skia does stepping and scanning of edges in a single
pass over the edge list.
Skia does stepping and scanning of edges in a single pass over the edge list .
&mut self
blitter
&mut Blitter
winding_mode
Winding
&mut self
blitter
&mut Blitter
winding_mode
Winding