avm2: Remove `coerce_to_object` calls in `flash.display.Bitmap`
This commit is contained in:
parent
5b5313bf95
commit
5f5f98ecdc
|
@ -23,8 +23,7 @@ pub fn instance_init<'gc>(
|
||||||
.get(0)
|
.get(0)
|
||||||
.cloned()
|
.cloned()
|
||||||
.unwrap_or(Value::Null)
|
.unwrap_or(Value::Null)
|
||||||
.coerce_to_object(activation)
|
.as_object()
|
||||||
.ok()
|
|
||||||
.and_then(|bd| bd.as_bitmap_data());
|
.and_then(|bd| bd.as_bitmap_data());
|
||||||
//TODO: Pixel snapping is not supported
|
//TODO: Pixel snapping is not supported
|
||||||
let _pixel_snapping = args
|
let _pixel_snapping = args
|
||||||
|
@ -132,8 +131,7 @@ pub fn set_bitmap_data<'gc>(
|
||||||
.get(0)
|
.get(0)
|
||||||
.cloned()
|
.cloned()
|
||||||
.unwrap_or(Value::Null)
|
.unwrap_or(Value::Null)
|
||||||
.coerce_to_object(activation)
|
.as_object()
|
||||||
.ok()
|
|
||||||
.and_then(|bd| bd.as_bitmap_data());
|
.and_then(|bd| bd.as_bitmap_data());
|
||||||
|
|
||||||
bitmap.set_bitmap_data(&mut activation.context, bitmap_data);
|
bitmap.set_bitmap_data(&mut activation.context, bitmap_data);
|
||||||
|
|
Loading…
Reference in New Issue