Skip to content

Commit

Permalink
render: Make applyFilter with zero-sized rects noops
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian17 committed Sep 17, 2024
1 parent 7d13733 commit 103f62a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/src/bitmap/operations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1206,6 +1206,10 @@ pub fn apply_filter<'gc>(
dest_point: (u32, u32),
filter: Filter,
) {
if source_size.0 == 0 || source_size.1 == 0 {
return;
}

if !context.renderer.is_filter_supported(&filter) {
let mut source_region = PixelRegion::for_whole_size(source.width(), source.height());
let mut dest_region = PixelRegion::for_whole_size(target.width(), target.height());
Expand Down

0 comments on commit 103f62a

Please sign in to comment.