render: Bail on attempts on panicking recursive render, part 2.
This commit is contained in:
parent
8d6241c9c4
commit
bdc041677a
|
@ -1022,8 +1022,9 @@ impl<'gc> BitmapData<'gc> {
|
|||
render_context.commands.push_blend_mode(blend_mode);
|
||||
match &mut source {
|
||||
IBitmapDrawable::BitmapData(data) => {
|
||||
let mut bitmap_data = data.write(context.gc_context);
|
||||
|
||||
// if try_write fails,
|
||||
// this is caused by recursive render attempt. TODO: support this.
|
||||
if let Ok(mut bitmap_data) = data.try_write(context.gc_context) {
|
||||
bitmap_data.update_dirty_texture(&mut render_context);
|
||||
let bitmap_handle = bitmap_data.bitmap_handle(render_context.renderer).unwrap();
|
||||
render_context.commands.render_bitmap(
|
||||
|
@ -1032,6 +1033,7 @@ impl<'gc> BitmapData<'gc> {
|
|||
smoothing,
|
||||
);
|
||||
}
|
||||
}
|
||||
IBitmapDrawable::DisplayObject(object) => {
|
||||
// Note that we do *not* use `render_base`,
|
||||
// as we want to ignore the object's mask and normal transform
|
||||
|
|
Loading…
Reference in New Issue