@@ -98,10 +98,10 @@ pub struct BitmapCache {
9898 matrix_d : f32 ,
9999
100100 /// The width of the original bitmap, pre-filters
101- source_width : u16 ,
101+ source_width : u32 ,
102102
103103 /// The height of the original bitmap, pre-filters
104- source_height : u16 ,
104+ source_height : u32 ,
105105
106106 /// The offset used to draw the final bitmap (i.e. if a filter increases the size)
107107 draw_offset : Point < i32 > ,
@@ -122,7 +122,7 @@ impl BitmapCache {
122122 self . matrix_a = f32:: NAN ;
123123 }
124124
125- fn is_dirty ( & self , other : & Matrix , source_width : u16 , source_height : u16 ) -> bool {
125+ fn is_dirty ( & self , other : & Matrix , source_width : u32 , source_height : u32 ) -> bool {
126126 self . matrix_a != other. a
127127 || self . matrix_b != other. b
128128 || self . matrix_c != other. c
@@ -138,10 +138,10 @@ impl BitmapCache {
138138 & mut self ,
139139 renderer : & mut dyn RenderBackend ,
140140 matrix : Matrix ,
141- source_width : u16 ,
142- source_height : u16 ,
143- actual_width : u16 ,
144- actual_height : u16 ,
141+ source_width : u32 ,
142+ source_height : u32 ,
143+ actual_width : u32 ,
144+ actual_height : u32 ,
145145 draw_offset : Point < i32 > ,
146146 swf_version : u8 ,
147147 ) {
@@ -158,7 +158,7 @@ impl BitmapCache {
158158 }
159159 }
160160 let acceptable_size = if swf_version > 9 {
161- let total = actual_width as u32 * actual_height as u32 ;
161+ let total = actual_width * actual_height;
162162 actual_width < 8191 && actual_height < 8191 && total < 16777215
163163 } else {
164164 actual_width < 2880 && actual_height < 2880
@@ -168,7 +168,7 @@ impl BitmapCache {
168168 && actual_height > 0
169169 && acceptable_size
170170 {
171- let handle = renderer. create_empty_texture ( actual_width as u32 , actual_height as u32 ) ;
171+ let handle = renderer. create_empty_texture ( actual_width, actual_height) ;
172172 self . bitmap = handle. ok ( ) . map ( |handle| BitmapInfo {
173173 width : actual_width,
174174 height : actual_height,
@@ -944,8 +944,8 @@ pub fn render_base<'gc>(
944944 let width = bounds. width ( ) . to_pixels ( ) . ceil ( ) . max ( 0.0 ) ;
945945 let height = bounds. height ( ) . to_pixels ( ) . ceil ( ) . max ( 0.0 ) ;
946946 if width <= u16:: MAX as f64 && height <= u16:: MAX as f64 {
947- let width = width as u16 ;
948- let height = height as u16 ;
947+ let width = width as u32 ;
948+ let height = height as u32 ;
949949 let mut filter_rect = Rectangle {
950950 x_min : Twips :: ZERO ,
951951 x_max : Twips :: from_pixels_i32 ( width as i32 ) ,
@@ -971,8 +971,8 @@ pub fn render_base<'gc>(
971971 base_transform. matrix ,
972972 width,
973973 height,
974- filter_rect. width ( ) as u16 ,
975- filter_rect. height ( ) as u16 ,
974+ filter_rect. width ( ) as u32 ,
975+ filter_rect. height ( ) as u32 ,
976976 draw_offset,
977977 swf_version,
978978 ) ;
0 commit comments