add some inlines

these help undo some of the previous blit performance regressions.
mostly, anyway.
This commit is contained in:
Gered 2022-07-17 20:49:59 -04:00
parent 08bcb7f5a6
commit c9e32dfca5

View file

@ -176,6 +176,7 @@ pub fn clip_blit(
true true
} }
#[inline]
fn get_flipped_blit_properties( fn get_flipped_blit_properties(
src: &Bitmap, src: &Bitmap,
src_region: &Rect, src_region: &Rect,
@ -212,6 +213,7 @@ fn get_flipped_blit_properties(
(x_inc, src_start_x, src_start_y, src_next_row_inc) (x_inc, src_start_x, src_start_y, src_next_row_inc)
} }
#[inline]
unsafe fn per_pixel_blit( unsafe fn per_pixel_blit(
dest: &mut Bitmap, dest: &mut Bitmap,
src: &Bitmap, src: &Bitmap,
@ -237,6 +239,7 @@ unsafe fn per_pixel_blit(
} }
} }
#[inline]
unsafe fn per_pixel_flipped_blit( unsafe fn per_pixel_flipped_blit(
dest: &mut Bitmap, dest: &mut Bitmap,
src: &Bitmap, src: &Bitmap,
@ -266,6 +269,7 @@ unsafe fn per_pixel_flipped_blit(
} }
} }
#[inline]
unsafe fn per_pixel_rotozoom_blit( unsafe fn per_pixel_rotozoom_blit(
dest: &mut Bitmap, dest: &mut Bitmap,
src: &Bitmap, src: &Bitmap,