Skip to content

Truly independent web browser

LibCompositing: Remove test tree builder calls that no test makes

Aliaksandr Kalenikcb70140400ae
diff --git a/Libraries/LibCompositing/DisplayList/VisualContextTreeTestBuilder.cpp b/Libraries/LibCompositing/DisplayList/VisualContextTreeTestBuilder.cpp
index b74f790ac69..df3ee567772 100644
--- a/Libraries/LibCompositing/DisplayList/VisualContextTreeTestBuilder.cpp
+++ b/Libraries/LibCompositing/DisplayList/VisualContextTreeTestBuilder.cpp
@@ -6,7 +6,6 @@
#include <LibCompositing/DisplayList/VisualContextTreeTestBuilder.h>
#include <LibCompositing/RustFFI.h>
-#include <LibGfx/Path.h>
namespace Compositing {
diff --git a/Libraries/LibCompositing/DisplayList/VisualContextTreeTestBuilder.h b/Libraries/LibCompositing/DisplayList/VisualContextTreeTestBuilder.h
index a1827418c7a..96ff78b66f8 100644
--- a/Libraries/LibCompositing/DisplayList/VisualContextTreeTestBuilder.h
+++ b/Libraries/LibCompositing/DisplayList/VisualContextTreeTestBuilder.h
@@ -11,14 +11,12 @@
#include <LibCompositing/DisplayList/ContextRef.h>
#include <LibCompositing/DisplayList/DisplayListCommand.h>
#include <LibCompositing/Export.h>
-#include <LibGfx/CompositingAndBlendingOperator.h>
#include <LibGfx/CornerRadii.h>
#include <LibGfx/Forward.h>
#include <LibGfx/Matrix4x4.h>
#include <LibGfx/Point.h>
#include <LibGfx/Rect.h>
#include <LibGfx/Size.h>
-#include <LibGfx/WindingRule.h>
namespace Compositing {
@@ -50,7 +48,6 @@ public:
SpatialNodeIndex append_scroll(SpatialNodeIndex parent);
SpatialNodeIndex append_sticky(SpatialNodeIndex parent, StickyConstraints const&);
ClipNodeIndex append_clip(ClipNodeIndex parent, SpatialNodeIndex spatial, Gfx::FloatRect, Gfx::CornerRadii = {}, ClipMode = ClipMode::Intersect);
- // The frame a context names for recording under the given clip and effect.
AccumulatedVisualContextTree finish();
diff --git a/Libraries/LibCompositing/Rust/src/ffi.rs b/Libraries/LibCompositing/Rust/src/ffi.rs
index cc7e77a387a..7b860255603 100644
--- a/Libraries/LibCompositing/Rust/src/ffi.rs
+++ b/Libraries/LibCompositing/Rust/src/ffi.rs
@@ -709,97 +709,6 @@ pub unsafe extern "C" fn visual_context_tree_test_builder_append_clip(
.0
}
-/// # Safety
-///
-/// `builder` must be a live handle from `visual_context_tree_test_builder_create`.
-#[unsafe(no_mangle)]
-pub unsafe extern "C" fn visual_context_tree_test_builder_append_background_color_animation(
- builder: *mut c_void,
- parent_effect: u32,
- spatial: u32,
- local_clip: u32,
-) -> u32 {
- let tree = unsafe { test_builder_tree(builder) };
- tree.append_effect(
- crate::visual_context::EffectNodeData::BackgroundColorAnimation,
- EffectNodeIndex(parent_effect),
- SpatialNodeIndex(spatial),
- ClipNodeIndex(local_clip),
- )
- .0
-}
-
-/// # Safety
-///
-/// `builder` must be a live handle from `visual_context_tree_test_builder_create`; `path_bytes`
-/// must address `path_bytes_length` readable bytes of a serialized `Gfx::Path`.
-#[unsafe(no_mangle)]
-pub unsafe extern "C" fn visual_context_tree_test_builder_append_clip_path(
- builder: *mut c_void,
- parent_clip: u32,
- spatial: u32,
- path_bytes: *const u8,
- path_bytes_length: usize,
- bounding_rect: libgfx_rust::IntRect,
- fill_rule: libgfx_rust::WindingRule,
-) -> u32 {
- let tree = unsafe { test_builder_tree(builder) };
- // SAFETY: The caller guarantees `path_bytes` addresses `path_bytes_length` readable bytes.
- let path_bytes = unsafe { ak::slice_from_raw_parts(path_bytes, path_bytes_length) };
- let path = libgfx_rust::path::Path::from_serialized_bytes(path_bytes);
- tree.append_clip(
- crate::visual_context::ClipNodeData::Path(crate::visual_context::ClipPathData {
- path: std::sync::Arc::new(path),
- bounding_rect,
- fill_rule,
- }),
- ClipNodeIndex(parent_clip),
- SpatialNodeIndex(spatial),
- )
- .0
-}
-
-/// # Safety
-///
-/// `builder` must be a live handle from `visual_context_tree_test_builder_create`.
-#[unsafe(no_mangle)]
-pub unsafe extern "C" fn visual_context_tree_test_builder_append_effects(
- builder: *mut c_void,
- parent_effect: u32,
- spatial: u32,
- local_clip: u32,
- opacity: f32,
- blend_mode: libgfx_rust::CompositingAndBlendingOperator,
-) -> u32 {
- let tree = unsafe { test_builder_tree(builder) };
- tree.append_effect(
- crate::visual_context::EffectNodeData::Effects(crate::visual_context::EffectsData {
- isolation: false,
- opacity,
- blend_mode,
- filter: None,
- backdrop_filter: None,
- }),
- EffectNodeIndex(parent_effect),
- SpatialNodeIndex(spatial),
- ClipNodeIndex(local_clip),
- )
- .0
-}
-
-/// # Safety
-///
-/// `builder` must be a live handle from `visual_context_tree_test_builder_create`. Gives the tree
-/// the structural epoch another tree carries, so a test can stage a compatible tree-only update.
-#[unsafe(no_mangle)]
-pub unsafe extern "C" fn visual_context_tree_test_builder_set_structural_epoch(
- builder: *mut c_void,
- structural_epoch: u64,
-) {
- let tree = unsafe { test_builder_tree(builder) };
- tree.structural_epoch = structural_epoch;
-}
-
/// # Safety
///
/// `builder` must be a live handle from `visual_context_tree_test_builder_create`, consumed by this