File tree Expand file tree Collapse file tree 6 files changed +3
-53
lines changed Expand file tree Collapse file tree 6 files changed +3
-53
lines changed Original file line number Diff line number Diff line change @@ -304,12 +304,8 @@ impl Drawing {
304
304
edge_bounds : self . edge_bounds . clone ( ) ,
305
305
id : 0 ,
306
306
} ;
307
- if let Some ( handle) = self . render_handle . get ( ) {
308
- context. renderer . replace_shape ( shape, self , handle) ;
309
- } else {
310
- self . render_handle
311
- . set ( Some ( context. renderer . register_shape ( shape, self ) ) ) ;
312
- }
307
+ self . render_handle
308
+ . set ( Some ( context. renderer . register_shape ( shape, self ) ) ) ;
313
309
}
314
310
315
311
if let Some ( handle) = self . render_handle . get ( ) {
Original file line number Diff line number Diff line change @@ -445,16 +445,6 @@ impl RenderBackend for WebCanvasRenderBackend {
445
445
handle
446
446
}
447
447
448
- fn replace_shape (
449
- & mut self ,
450
- shape : DistilledShape ,
451
- bitmap_source : & dyn BitmapSource ,
452
- handle : ShapeHandle ,
453
- ) {
454
- let data = swf_shape_to_canvas_commands ( & shape, bitmap_source, self ) ;
455
- self . shapes [ handle. 0 ] = data;
456
- }
457
-
458
448
fn register_glyph_shape ( & mut self , glyph : & swf:: Glyph ) -> ShapeHandle {
459
449
let shape = ruffle_render:: shape_utils:: swf_glyph_to_shape ( glyph) ;
460
450
self . register_shape ( ( & shape) . into ( ) , & NullBitmapSource )
Original file line number Diff line number Diff line change @@ -24,12 +24,6 @@ pub trait RenderBackend: Downcast {
24
24
shape : DistilledShape ,
25
25
bitmap_source : & dyn BitmapSource ,
26
26
) -> ShapeHandle ;
27
- fn replace_shape (
28
- & mut self ,
29
- shape : DistilledShape ,
30
- bitmap_source : & dyn BitmapSource ,
31
- handle : ShapeHandle ,
32
- ) ;
33
27
fn register_glyph_shape ( & mut self , shape : & swf:: Glyph ) -> ShapeHandle ;
34
28
35
29
/// Creates a new `RenderBackend` which renders directly
Original file line number Diff line number Diff line change @@ -50,13 +50,6 @@ impl RenderBackend for NullRenderer {
50
50
) -> ShapeHandle {
51
51
ShapeHandle ( 0 )
52
52
}
53
- fn replace_shape (
54
- & mut self ,
55
- _shape : DistilledShape ,
56
- _bitmap_source : & dyn BitmapSource ,
57
- _handle : ShapeHandle ,
58
- ) {
59
- }
60
53
fn register_glyph_shape ( & mut self , _shape : & swf:: Glyph ) -> ShapeHandle {
61
54
ShapeHandle ( 0 )
62
55
}
Original file line number Diff line number Diff line change @@ -734,6 +734,7 @@ impl WebGlRenderBackend {
734
734
} ;
735
735
}
736
736
737
+ #[ allow( dead_code) ]
737
738
fn delete_mesh ( & self , mesh : & Mesh ) {
738
739
if let Some ( gl2) = & self . gl2 {
739
740
for draw in & mesh. draws {
@@ -996,19 +997,6 @@ impl RenderBackend for WebGlRenderBackend {
996
997
handle
997
998
}
998
999
999
- fn replace_shape (
1000
- & mut self ,
1001
- shape : DistilledShape ,
1002
- bitmap_source : & dyn BitmapSource ,
1003
- handle : ShapeHandle ,
1004
- ) {
1005
- self . delete_mesh ( & self . meshes [ handle. 0 ] ) ;
1006
- match self . register_shape_internal ( shape, bitmap_source) {
1007
- Ok ( mesh) => self . meshes [ handle. 0 ] = mesh,
1008
- Err ( e) => log:: error!( "Couldn't replace shape: {:?}" , e) ,
1009
- }
1010
- }
1011
-
1012
1000
fn register_glyph_shape ( & mut self , glyph : & swf:: Glyph ) -> ShapeHandle {
1013
1001
let shape = ruffle_render:: shape_utils:: swf_glyph_to_shape ( glyph) ;
1014
1002
let handle = ShapeHandle ( self . meshes . len ( ) ) ;
Original file line number Diff line number Diff line change @@ -430,17 +430,6 @@ impl<T: RenderTarget + 'static> RenderBackend for WgpuRenderBackend<T> {
430
430
handle
431
431
}
432
432
433
- #[ instrument( level = "debug" , skip_all) ]
434
- fn replace_shape (
435
- & mut self ,
436
- shape : DistilledShape ,
437
- bitmap_source : & dyn BitmapSource ,
438
- handle : ShapeHandle ,
439
- ) {
440
- let mesh = self . register_shape_internal ( shape, bitmap_source) ;
441
- self . meshes [ handle. 0 ] = mesh;
442
- }
443
-
444
433
#[ instrument( level = "debug" , skip_all) ]
445
434
fn register_glyph_shape ( & mut self , glyph : & swf:: Glyph ) -> ShapeHandle {
446
435
let shape = ruffle_render:: shape_utils:: swf_glyph_to_shape ( glyph) ;
You can’t perform that action at this time.
0 commit comments