diff options
Diffstat (limited to 'src/sna/sna_trapezoids.h')
-rw-r--r-- | src/sna/sna_trapezoids.h | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/src/sna/sna_trapezoids.h b/src/sna/sna_trapezoids.h index 5acf5317..e8f7f3f4 100644 --- a/src/sna/sna_trapezoids.h +++ b/src/sna/sna_trapezoids.h @@ -227,10 +227,37 @@ triangles_mask_converter(CARD8 op, PicturePtr src, PicturePtr dst, int count, xTriangle *tri); bool +mono_tristrip_span_converter(struct sna *sna, + CARD8 op, PicturePtr src, PicturePtr dst, + INT16 src_x, INT16 src_y, + int count, xPointFixed *points); +bool +imprecise_tristrip_span_converter(struct sna *sna, + CARD8 op, PicturePtr src, PicturePtr dst, + PictFormatPtr maskFormat, INT16 src_x, INT16 src_y, + int count, xPointFixed *points); +bool +precise_tristrip_span_converter(struct sna *sna, + CARD8 op, PicturePtr src, PicturePtr dst, + PictFormatPtr maskFormat, INT16 src_x, INT16 src_y, + int count, xPointFixed *points); + +static inline bool tristrip_span_converter(struct sna *sna, CARD8 op, PicturePtr src, PicturePtr dst, PictFormatPtr maskFormat, INT16 src_x, INT16 src_y, - int count, xPointFixed *points); + int count, xPointFixed *points) +{ + if (NO_SCAN_CONVERTER) + return false; + + if (is_mono(dst, maskFormat)) + return mono_tristrip_span_converter(sna, op, src, dst, src_x, src_y, count, points); + else if (is_precise(dst, maskFormat)) + return precise_tristrip_span_converter(sna, op, src, dst, maskFormat, src_x, src_y, count, points); + else + return imprecise_tristrip_span_converter(sna, op, src, dst, maskFormat, src_x, src_y, count, points); +} inline static void trapezoid_origin(const xLineFixed *l, int16_t *x, int16_t *y) { @@ -332,8 +359,7 @@ xTriangleValid(const xTriangle *t) static inline int pixman_fixed_to_fast(pixman_fixed_t v) { - //return (v + ((1<<(16-FAST_SAMPLES_shift-1))-1)) >> (16 - FAST_SAMPLES_shift); - return (v + ((1<<(16-FAST_SAMPLES_shift-1)))) >> (16 - FAST_SAMPLES_shift); + return (v + ((1<<(16-FAST_SAMPLES_shift-1))-1)) >> (16 - FAST_SAMPLES_shift); } bool trapezoids_bounds(int n, const xTrapezoid *t, BoxPtr box); |