From b3afb59b53cfe50f1a2592c21b95dc386cb31d85 Mon Sep 17 00:00:00 2001 From: Nathan Adams Date: Sun, 14 Aug 2022 01:03:00 +0200 Subject: [PATCH] render: Moved BoundingBox from core to render --- core/src/display_object/video.rs | 2 +- core/src/drawing.rs | 2 +- core/src/lib.rs | 1 - core/src/prelude.rs | 2 +- core/src/shape_utils.rs | 2 +- {core => render}/src/bounding_box.rs | 2 +- render/src/lib.rs | 1 + 7 files changed, 6 insertions(+), 6 deletions(-) rename {core => render}/src/bounding_box.rs (99%) diff --git a/core/src/display_object/video.rs b/core/src/display_object/video.rs index d3a4ea0ea..5693477af 100644 --- a/core/src/display_object/video.rs +++ b/core/src/display_object/video.rs @@ -5,7 +5,6 @@ use crate::avm2::{ Activation as Avm2Activation, Object as Avm2Object, StageObject as Avm2StageObject, }; use crate::backend::video::{EncodedFrame, VideoStreamHandle}; -use crate::bounding_box::BoundingBox; use crate::context::{RenderContext, UpdateContext}; use crate::display_object::{DisplayObjectBase, DisplayObjectPtr, TDisplayObject}; use crate::prelude::*; @@ -13,6 +12,7 @@ use crate::tag_utils::{SwfMovie, SwfSlice}; use crate::vminterface::{AvmObject, AvmType, Instantiator}; use gc_arena::{Collect, GcCell, MutationContext}; use ruffle_render::bitmap::BitmapInfo; +use ruffle_render::bounding_box::BoundingBox; use std::borrow::{Borrow, BorrowMut}; use std::cell::{Ref, RefMut}; use std::collections::{BTreeMap, BTreeSet}; diff --git a/core/src/drawing.rs b/core/src/drawing.rs index 3d8a9e559..5587322ed 100644 --- a/core/src/drawing.rs +++ b/core/src/drawing.rs @@ -1,9 +1,9 @@ use crate::backend::render::ShapeHandle; -use crate::bounding_box::BoundingBox; use crate::context::RenderContext; use crate::shape_utils::{DistilledShape, DrawCommand, DrawPath}; use gc_arena::Collect; use ruffle_render::bitmap::{BitmapInfo, BitmapSource}; +use ruffle_render::bounding_box::BoundingBox; use std::cell::Cell; use swf::{FillStyle, LineStyle, Twips}; diff --git a/core/src/lib.rs b/core/src/lib.rs index 1f1b7a1db..d529b5d33 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -16,7 +16,6 @@ mod avm1; mod avm2; mod binary_data; pub mod bitmap; -mod bounding_box; mod character; pub mod color_transform; pub mod context; diff --git a/core/src/prelude.rs b/core/src/prelude.rs index 7ed0da7cb..48782fbf3 100644 --- a/core/src/prelude.rs +++ b/core/src/prelude.rs @@ -1,5 +1,4 @@ pub use crate::avm2::Value as Avm2Value; -pub use crate::bounding_box::BoundingBox; pub use crate::color_transform::ColorTransform; pub use crate::display_object::{ DisplayObject, DisplayObjectContainer, HitTestOptions, Lists, TDisplayObject, @@ -7,6 +6,7 @@ pub use crate::display_object::{ }; pub use crate::impl_display_object_container; pub use log::{error, info, trace, warn}; +pub use ruffle_render::bounding_box::BoundingBox; pub use ruffle_render::matrix::Matrix; pub use std::ops::{Bound, RangeBounds}; pub use swf::{CharacterId, Color, Twips}; diff --git a/core/src/shape_utils.rs b/core/src/shape_utils.rs index 10b20474d..1d17b31d1 100644 --- a/core/src/shape_utils.rs +++ b/core/src/shape_utils.rs @@ -1,4 +1,4 @@ -use crate::bounding_box::BoundingBox; +use ruffle_render::bounding_box::BoundingBox; use ruffle_render::matrix::Matrix; use smallvec::SmallVec; use swf::{CharacterId, FillStyle, LineStyle, Shape, ShapeRecord, Twips}; diff --git a/core/src/bounding_box.rs b/render/src/bounding_box.rs similarity index 99% rename from core/src/bounding_box.rs rename to render/src/bounding_box.rs index 6c030055b..146aead2e 100644 --- a/core/src/bounding_box.rs +++ b/render/src/bounding_box.rs @@ -1,5 +1,5 @@ +use crate::matrix::Matrix; use gc_arena::Collect; -use ruffle_render::matrix::Matrix; use swf::Twips; #[derive(Clone, Collect, Debug, Default, Eq, PartialEq)] diff --git a/render/src/lib.rs b/render/src/lib.rs index 2459d7d04..982de9447 100644 --- a/render/src/lib.rs +++ b/render/src/lib.rs @@ -1,4 +1,5 @@ pub mod bitmap; +pub mod bounding_box; pub mod error; pub mod matrix; pub mod utils;