@@ -177,7 +177,7 @@ fn set_scroll_rect<'gc>(
177177 if let Value :: Object ( object) = value {
178178 this. set_has_scroll_rect ( true ) ;
179179 if let Some ( rectangle) = object_to_rectangle ( activation, object) ? {
180- this. set_next_scroll_rect ( activation . gc ( ) , rectangle) ;
180+ this. set_next_scroll_rect ( rectangle) ;
181181 }
182182 } else {
183183 this. set_has_scroll_rect ( false ) ;
@@ -391,11 +391,9 @@ fn line_style<'gc>(
391391 . with_allow_scale_y ( allow_scale_y)
392392 . with_is_pixel_hinted ( is_pixel_hinted)
393393 . with_allow_close ( false ) ;
394- movie_clip
395- . drawing_mut ( activation. gc ( ) )
396- . set_line_style ( Some ( line_style) ) ;
394+ movie_clip. drawing_mut ( ) . set_line_style ( Some ( line_style) ) ;
397395 } else {
398- movie_clip. drawing_mut ( activation . gc ( ) ) . set_line_style ( None ) ;
396+ movie_clip. drawing_mut ( ) . set_line_style ( None ) ;
399397 }
400398 Ok ( Value :: Undefined )
401399}
@@ -475,9 +473,7 @@ fn line_gradient_style<'gc>(
475473 focal_point : Fixed8 :: from_f64 ( focal_point) ,
476474 } ,
477475 } ;
478- movie_clip
479- . drawing_mut ( activation. gc ( ) )
480- . set_line_fill_style ( style) ;
476+ movie_clip. drawing_mut ( ) . set_line_fill_style ( style) ;
481477 }
482478 Ok ( Value :: Undefined )
483479}
@@ -569,10 +565,10 @@ fn begin_fill<'gc>(
569565 / 100.0
570566 * 255.0 ;
571567 movie_clip
572- . drawing_mut ( activation . gc ( ) )
568+ . drawing_mut ( )
573569 . set_fill_style ( Some ( FillStyle :: Color ( Color :: from_rgb ( rgb, alpha as u8 ) ) ) ) ;
574570 } else {
575- movie_clip. drawing_mut ( activation . gc ( ) ) . set_fill_style ( None ) ;
571+ movie_clip. drawing_mut ( ) . set_fill_style ( None ) ;
576572 }
577573 Ok ( Value :: Undefined )
578574}
@@ -591,7 +587,7 @@ fn begin_bitmap_fill<'gc>(
591587 width : bitmap_data. width ( ) as u16 ,
592588 height : bitmap_data. height ( ) as u16 ,
593589 } ;
594- let id = movie_clip. drawing_mut ( activation . gc ( ) ) . add_bitmap ( bitmap) ;
590+ let id = movie_clip. drawing_mut ( ) . add_bitmap ( bitmap) ;
595591
596592 let mut matrix = avm1:: globals:: matrix:: object_to_matrix_or_default (
597593 args. get ( 1 )
@@ -624,9 +620,7 @@ fn begin_bitmap_fill<'gc>(
624620 } else {
625621 None
626622 } ;
627- movie_clip
628- . drawing_mut ( activation. gc ( ) )
629- . set_fill_style ( fill_style) ;
623+ movie_clip. drawing_mut ( ) . set_fill_style ( fill_style) ;
630624 Ok ( Value :: Undefined )
631625}
632626
@@ -637,7 +631,7 @@ fn begin_gradient_fill<'gc>(
637631) -> Result < Value < ' gc > , Error < ' gc > > {
638632 if Value :: Undefined == * args. get ( 0 ) . unwrap_or ( & Value :: Undefined ) {
639633 // The path has no fill if the first parameter is `undefined`, or if no parameters are passed.
640- movie_clip. drawing_mut ( activation . gc ( ) ) . set_fill_style ( None ) ;
634+ movie_clip. drawing_mut ( ) . set_fill_style ( None ) ;
641635 } else if let ( Some ( gradient_type) , Some ( colors) , Some ( alphas) , Some ( ratios) , Some ( matrix) ) = (
642636 args. get ( 0 ) ,
643637 args. get ( 1 ) ,
@@ -700,9 +694,7 @@ fn begin_gradient_fill<'gc>(
700694 focal_point : Fixed8 :: from_f64 ( focal_point) ,
701695 } ,
702696 } ;
703- movie_clip
704- . drawing_mut ( activation. gc ( ) )
705- . set_fill_style ( Some ( style) ) ;
697+ movie_clip. drawing_mut ( ) . set_fill_style ( Some ( style) ) ;
706698 }
707699 Ok ( Value :: Undefined )
708700}
@@ -716,7 +708,7 @@ fn move_to<'gc>(
716708 let x = x. coerce_to_f64 ( activation) ?;
717709 let y = y. coerce_to_f64 ( activation) ?;
718710 movie_clip
719- . drawing_mut ( activation . gc ( ) )
711+ . drawing_mut ( )
720712 . draw_command ( DrawCommand :: MoveTo ( Point :: from_pixels ( x, y) ) ) ;
721713 }
722714 Ok ( Value :: Undefined )
@@ -731,7 +723,7 @@ fn line_to<'gc>(
731723 let x = x. coerce_to_f64 ( activation) ?;
732724 let y = y. coerce_to_f64 ( activation) ?;
733725 movie_clip
734- . drawing_mut ( activation . gc ( ) )
726+ . drawing_mut ( )
735727 . draw_command ( DrawCommand :: LineTo ( Point :: from_pixels ( x, y) ) ) ;
736728 }
737729 Ok ( Value :: Undefined )
@@ -748,7 +740,7 @@ fn curve_to<'gc>(
748740 let anchor_x = anchor_x. coerce_to_f64 ( activation) ?;
749741 let anchor_y = anchor_y. coerce_to_f64 ( activation) ?;
750742 movie_clip
751- . drawing_mut ( activation . gc ( ) )
743+ . drawing_mut ( )
752744 . draw_command ( DrawCommand :: QuadraticCurveTo {
753745 control : Point :: from_pixels ( control_x, control_y) ,
754746 anchor : Point :: from_pixels ( anchor_x, anchor_y) ,
@@ -759,19 +751,19 @@ fn curve_to<'gc>(
759751
760752fn end_fill < ' gc > (
761753 movie_clip : MovieClip < ' gc > ,
762- activation : & mut Activation < ' _ , ' gc > ,
754+ _activation : & mut Activation < ' _ , ' gc > ,
763755 _args : & [ Value < ' gc > ] ,
764756) -> Result < Value < ' gc > , Error < ' gc > > {
765- movie_clip. drawing_mut ( activation . gc ( ) ) . set_fill_style ( None ) ;
757+ movie_clip. drawing_mut ( ) . set_fill_style ( None ) ;
766758 Ok ( Value :: Undefined )
767759}
768760
769761fn clear < ' gc > (
770762 movie_clip : MovieClip < ' gc > ,
771- activation : & mut Activation < ' _ , ' gc > ,
763+ _activation : & mut Activation < ' _ , ' gc > ,
772764 _args : & [ Value < ' gc > ] ,
773765) -> Result < Value < ' gc > , Error < ' gc > > {
774- movie_clip. drawing_mut ( activation . gc ( ) ) . clear ( ) ;
766+ movie_clip. drawing_mut ( ) . clear ( ) ;
775767 Ok ( Value :: Undefined )
776768}
777769
@@ -983,13 +975,13 @@ pub fn clone_sprite<'gc>(
983975 parent. replace_at_depth ( context, new_clip. into ( ) , depth) ;
984976
985977 // Copy display properties from previous clip to new clip.
986- new_clip. set_matrix ( context . gc ( ) , movie_clip. base ( ) . matrix ( ) ) ;
987- new_clip. set_color_transform ( context . gc ( ) , movie_clip. base ( ) . color_transform ( ) ) ;
978+ new_clip. set_matrix ( movie_clip. base ( ) . matrix ( ) ) ;
979+ new_clip. set_color_transform ( movie_clip. base ( ) . color_transform ( ) ) ;
988980
989981 new_clip. init_clip_event_handlers ( movie_clip. clip_actions ( ) . into ( ) ) ;
990982
991983 if let Some ( drawing) = movie_clip. drawing ( ) . as_deref ( ) . cloned ( ) {
992- * new_clip. drawing_mut ( context . gc ( ) ) = drawing;
984+ * new_clip. drawing_mut ( ) = drawing;
993985 }
994986 // TODO: Any other properties we should copy...?
995987 // Definitely not Object properties.
@@ -1666,15 +1658,15 @@ fn set_transform<'gc>(
16661658 if let NativeObject :: Transform ( transform) = object. native ( ) {
16671659 if let Some ( clip) = transform. clip ( activation) {
16681660 let matrix = clip. base ( ) . matrix ( ) ;
1669- this. set_matrix ( activation . gc ( ) , matrix) ;
1661+ this. set_matrix ( matrix) ;
16701662
16711663 let color_transform = clip. base ( ) . color_transform ( ) ;
1672- this. set_color_transform ( activation . gc ( ) , color_transform) ;
1664+ this. set_color_transform ( color_transform) ;
16731665
16741666 if let Some ( parent) = this. parent ( ) {
16751667 // Self-transform changes are automatically handled,
16761668 // we only want to inform ancestors to avoid unnecessary invalidations for tx/ty
1677- parent. invalidate_cached_bitmap ( activation . gc ( ) ) ;
1669+ parent. invalidate_cached_bitmap ( ) ;
16781670 }
16791671
16801672 this. set_transformed_by_script ( true ) ;
@@ -1712,12 +1704,12 @@ fn blend_mode<'gc>(
17121704
17131705fn set_blend_mode < ' gc > (
17141706 this : MovieClip < ' gc > ,
1715- activation : & mut Activation < ' _ , ' gc > ,
1707+ _activation : & mut Activation < ' _ , ' gc > ,
17161708 value : Value < ' gc > ,
17171709) -> Result < ( ) , Error < ' gc > > {
17181710 // No-op if value is not a valid blend mode.
17191711 if let Some ( mode) = value. as_blend_mode ( ) {
1720- this. set_blend_mode ( activation . gc ( ) , mode. into ( ) ) ;
1712+ this. set_blend_mode ( mode. into ( ) ) ;
17211713 } else {
17221714 tracing:: error!( "Unknown blend mode {value:?}" ) ;
17231715 }
@@ -1738,7 +1730,7 @@ fn set_cache_as_bitmap<'gc>(
17381730 value : Value < ' gc > ,
17391731) -> Result < ( ) , Error < ' gc > > {
17401732 // Note that the *getter* returns actual, and *setter* is preference
1741- this. set_bitmap_cached_preference ( activation . gc ( ) , value. as_bool ( activation. swf_version ( ) ) ) ;
1733+ this. set_bitmap_cached_preference ( value. as_bool ( activation. swf_version ( ) ) ) ;
17421734 Ok ( ( ) )
17431735}
17441736
@@ -1759,12 +1751,9 @@ fn set_opaque_background<'gc>(
17591751 value : Value < ' gc > ,
17601752) -> Result < ( ) , Error < ' gc > > {
17611753 if matches ! ( value, Value :: Undefined | Value :: Null ) {
1762- this. set_opaque_background ( activation . gc ( ) , None ) ;
1754+ this. set_opaque_background ( None ) ;
17631755 } else {
1764- this. set_opaque_background (
1765- activation. gc ( ) ,
1766- Some ( Color :: from_rgb ( value. coerce_to_u32 ( activation) ?, 255 ) ) ,
1767- ) ;
1756+ this. set_opaque_background ( Some ( Color :: from_rgb ( value. coerce_to_u32 ( activation) ?, 255 ) ) ) ;
17681757 }
17691758 Ok ( ( ) )
17701759}
@@ -1796,7 +1785,7 @@ fn set_filters<'gc>(
17961785 }
17971786 }
17981787 }
1799- this. set_filters ( activation . gc ( ) , filters) ;
1788+ this. set_filters ( filters) ;
18001789 Ok ( ( ) )
18011790}
18021791
0 commit comments