#include "renderer_canvas_cull.h"
#include "core/config/project_settings.h"
#include "core/math/geometry_2d.h"
#include "core/math/transform_interpolator.h"
#include "renderer_viewport.h"
#include "rendering_server_default.h"
#include "rendering_server_globals.h"
#include "servers/rendering/storage/texture_storage.h"
const static float FEATHER_SIZE = …;
void RendererCanvasCull::_render_canvas_item_tree(RID p_to_render_target, Canvas::ChildItem *p_child_items, int p_child_item_count, const Transform2D &p_transform, const Rect2 &p_clip_rect, const Color &p_modulate, RendererCanvasRender::Light *p_lights, RendererCanvasRender::Light *p_directional_lights, RenderingServer::CanvasItemTextureFilter p_default_filter, RenderingServer::CanvasItemTextureRepeat p_default_repeat, bool p_snap_2d_vertices_to_pixel, uint32_t p_canvas_cull_mask, RenderingMethod::RenderInfo *r_render_info) { … }
void _collect_ysort_children(RendererCanvasCull::Item *p_canvas_item, const Transform2D &p_transform, RendererCanvasCull::Item *p_material_owner, const Color &p_modulate, RendererCanvasCull::Item **r_items, int &r_index, int p_z) { … }
void _mark_ysort_dirty(RendererCanvasCull::Item *ysort_owner, RID_Owner<RendererCanvasCull::Item, true> &canvas_item_owner) { … }
void RendererCanvasCull::_attach_canvas_item_for_draw(RendererCanvasCull::Item *ci, RendererCanvasCull::Item *p_canvas_clip, RendererCanvasRender::Item **r_z_list, RendererCanvasRender::Item **r_z_last_list, const Transform2D &p_transform, const Rect2 &p_clip_rect, Rect2 p_global_rect, const Color &p_modulate, int p_z, RendererCanvasCull::Item *p_material_owner, bool p_use_canvas_group, RendererCanvasRender::Item *r_canvas_group_from) { … }
void RendererCanvasCull::_cull_canvas_item(Item *p_canvas_item, const Transform2D &p_parent_xform, const Rect2 &p_clip_rect, const Color &p_modulate, int p_z, RendererCanvasRender::Item **r_z_list, RendererCanvasRender::Item **r_z_last_list, Item *p_canvas_clip, Item *p_material_owner, bool p_allow_y_sort, uint32_t p_canvas_cull_mask, const Point2 &p_repeat_size, int p_repeat_times, RendererCanvasRender::Item *p_repeat_source_item) { … }
void RendererCanvasCull::render_canvas(RID p_render_target, Canvas *p_canvas, const Transform2D &p_transform, RendererCanvasRender::Light *p_lights, RendererCanvasRender::Light *p_directional_lights, const Rect2 &p_clip_rect, RenderingServer::CanvasItemTextureFilter p_default_filter, RenderingServer::CanvasItemTextureRepeat p_default_repeat, bool p_snap_2d_transforms_to_pixel, bool p_snap_2d_vertices_to_pixel, uint32_t canvas_cull_mask, RenderingMethod::RenderInfo *r_render_info) { … }
bool RendererCanvasCull::was_sdf_used() { … }
RID RendererCanvasCull::canvas_allocate() { … }
void RendererCanvasCull::canvas_initialize(RID p_rid) { … }
void RendererCanvasCull::canvas_set_item_mirroring(RID p_canvas, RID p_item, const Point2 &p_mirroring) { … }
void RendererCanvasCull::canvas_set_item_repeat(RID p_item, const Point2 &p_repeat_size, int p_repeat_times) { … }
void RendererCanvasCull::canvas_set_modulate(RID p_canvas, const Color &p_color) { … }
void RendererCanvasCull::canvas_set_disable_scale(bool p_disable) { … }
void RendererCanvasCull::canvas_set_parent(RID p_canvas, RID p_parent, float p_scale) { … }
RID RendererCanvasCull::canvas_item_allocate() { … }
void RendererCanvasCull::canvas_item_initialize(RID p_rid) { … }
void RendererCanvasCull::canvas_item_set_parent(RID p_item, RID p_parent) { … }
void RendererCanvasCull::canvas_item_set_visible(RID p_item, bool p_visible) { … }
void RendererCanvasCull::canvas_item_set_light_mask(RID p_item, int p_mask) { … }
void RendererCanvasCull::canvas_item_set_transform(RID p_item, const Transform2D &p_transform) { … }
void RendererCanvasCull::canvas_item_set_visibility_layer(RID p_item, uint32_t p_visibility_layer) { … }
uint32_t RendererCanvasCull::canvas_item_get_visibility_layer(RID p_item) { … }
void RendererCanvasCull::canvas_item_set_clip(RID p_item, bool p_clip) { … }
void RendererCanvasCull::canvas_item_set_distance_field_mode(RID p_item, bool p_enable) { … }
void RendererCanvasCull::canvas_item_set_custom_rect(RID p_item, bool p_custom_rect, const Rect2 &p_rect) { … }
void RendererCanvasCull::canvas_item_set_modulate(RID p_item, const Color &p_color) { … }
void RendererCanvasCull::canvas_item_set_self_modulate(RID p_item, const Color &p_color) { … }
void RendererCanvasCull::canvas_item_set_draw_behind_parent(RID p_item, bool p_enable) { … }
void RendererCanvasCull::canvas_item_set_update_when_visible(RID p_item, bool p_update) { … }
void RendererCanvasCull::canvas_item_add_line(RID p_item, const Point2 &p_from, const Point2 &p_to, const Color &p_color, float p_width, bool p_antialiased) { … }
static Vector2 compute_polyline_segment_dir(const Vector<Point2> &p_points, int p_index, const Vector2 &p_prev_segment_dir) { … }
static Vector2 compute_polyline_edge_offset_clamped(const Vector2 &p_segment_dir, const Vector2 &p_prev_segment_dir) { … }
void RendererCanvasCull::canvas_item_add_polyline(RID p_item, const Vector<Point2> &p_points, const Vector<Color> &p_colors, float p_width, bool p_antialiased) { … }
void RendererCanvasCull::canvas_item_add_multiline(RID p_item, const Vector<Point2> &p_points, const Vector<Color> &p_colors, float p_width, bool p_antialiased) { … }
void RendererCanvasCull::canvas_item_add_rect(RID p_item, const Rect2 &p_rect, const Color &p_color, bool p_antialiased) { … }
void RendererCanvasCull::canvas_item_add_circle(RID p_item, const Point2 &p_pos, float p_radius, const Color &p_color, bool p_antialiased) { … }
void RendererCanvasCull::canvas_item_add_texture_rect(RID p_item, const Rect2 &p_rect, RID p_texture, bool p_tile, const Color &p_modulate, bool p_transpose) { … }
void RendererCanvasCull::canvas_item_add_msdf_texture_rect_region(RID p_item, const Rect2 &p_rect, RID p_texture, const Rect2 &p_src_rect, const Color &p_modulate, int p_outline_size, float p_px_range, float p_scale) { … }
void RendererCanvasCull::canvas_item_add_lcd_texture_rect_region(RID p_item, const Rect2 &p_rect, RID p_texture, const Rect2 &p_src_rect, const Color &p_modulate) { … }
void RendererCanvasCull::canvas_item_add_texture_rect_region(RID p_item, const Rect2 &p_rect, RID p_texture, const Rect2 &p_src_rect, const Color &p_modulate, bool p_transpose, bool p_clip_uv) { … }
void RendererCanvasCull::canvas_item_add_nine_patch(RID p_item, const Rect2 &p_rect, const Rect2 &p_source, RID p_texture, const Vector2 &p_topleft, const Vector2 &p_bottomright, RS::NinePatchAxisMode p_x_axis_mode, RS::NinePatchAxisMode p_y_axis_mode, bool p_draw_center, const Color &p_modulate) { … }
void RendererCanvasCull::canvas_item_add_primitive(RID p_item, const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs, RID p_texture) { … }
void RendererCanvasCull::canvas_item_add_polygon(RID p_item, const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs, RID p_texture) { … }
void RendererCanvasCull::canvas_item_add_triangle_array(RID p_item, const Vector<int> &p_indices, const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs, const Vector<int> &p_bones, const Vector<float> &p_weights, RID p_texture, int p_count) { … }
void RendererCanvasCull::canvas_item_add_set_transform(RID p_item, const Transform2D &p_transform) { … }
void RendererCanvasCull::canvas_item_add_mesh(RID p_item, const RID &p_mesh, const Transform2D &p_transform, const Color &p_modulate, RID p_texture) { … }
void RendererCanvasCull::canvas_item_add_particles(RID p_item, RID p_particles, RID p_texture) { … }
void RendererCanvasCull::canvas_item_add_multimesh(RID p_item, RID p_mesh, RID p_texture) { … }
void RendererCanvasCull::canvas_item_add_clip_ignore(RID p_item, bool p_ignore) { … }
void RendererCanvasCull::canvas_item_add_animation_slice(RID p_item, double p_animation_length, double p_slice_begin, double p_slice_end, double p_offset) { … }
void RendererCanvasCull::canvas_item_set_sort_children_by_y(RID p_item, bool p_enable) { … }
void RendererCanvasCull::canvas_item_set_z_index(RID p_item, int p_z) { … }
void RendererCanvasCull::canvas_item_set_z_as_relative_to_parent(RID p_item, bool p_enable) { … }
void RendererCanvasCull::canvas_item_attach_skeleton(RID p_item, RID p_skeleton) { … }
void RendererCanvasCull::canvas_item_set_copy_to_backbuffer(RID p_item, bool p_enable, const Rect2 &p_rect) { … }
void RendererCanvasCull::canvas_item_clear(RID p_item) { … }
void RendererCanvasCull::canvas_item_set_draw_index(RID p_item, int p_index) { … }
void RendererCanvasCull::canvas_item_set_material(RID p_item, RID p_material) { … }
void RendererCanvasCull::canvas_item_set_use_parent_material(RID p_item, bool p_enable) { … }
void RendererCanvasCull::canvas_item_set_visibility_notifier(RID p_item, bool p_enable, const Rect2 &p_area, const Callable &p_enter_callable, const Callable &p_exit_callable) { … }
void RendererCanvasCull::canvas_item_set_debug_redraw(bool p_enabled) { … }
bool RendererCanvasCull::canvas_item_get_debug_redraw() const { … }
void RendererCanvasCull::canvas_item_set_interpolated(RID p_item, bool p_interpolated) { … }
void RendererCanvasCull::canvas_item_reset_physics_interpolation(RID p_item) { … }
void RendererCanvasCull::canvas_item_transform_physics_interpolation(RID p_item, const Transform2D &p_transform) { … }
void RendererCanvasCull::canvas_item_set_canvas_group_mode(RID p_item, RS::CanvasGroupMode p_mode, float p_clear_margin, bool p_fit_empty, float p_fit_margin, bool p_blur_mipmaps) { … }
RID RendererCanvasCull::canvas_light_allocate() { … }
void RendererCanvasCull::canvas_light_initialize(RID p_rid) { … }
void RendererCanvasCull::canvas_light_set_mode(RID p_light, RS::CanvasLightMode p_mode) { … }
void RendererCanvasCull::canvas_light_attach_to_canvas(RID p_light, RID p_canvas) { … }
void RendererCanvasCull::canvas_light_set_enabled(RID p_light, bool p_enabled) { … }
void RendererCanvasCull::canvas_light_set_texture_scale(RID p_light, float p_scale) { … }
void RendererCanvasCull::canvas_light_set_transform(RID p_light, const Transform2D &p_transform) { … }
void RendererCanvasCull::canvas_light_set_texture(RID p_light, RID p_texture) { … }
void RendererCanvasCull::canvas_light_set_texture_offset(RID p_light, const Vector2 &p_offset) { … }
void RendererCanvasCull::canvas_light_set_color(RID p_light, const Color &p_color) { … }
void RendererCanvasCull::canvas_light_set_height(RID p_light, float p_height) { … }
void RendererCanvasCull::canvas_light_set_energy(RID p_light, float p_energy) { … }
void RendererCanvasCull::canvas_light_set_z_range(RID p_light, int p_min_z, int p_max_z) { … }
void RendererCanvasCull::canvas_light_set_layer_range(RID p_light, int p_min_layer, int p_max_layer) { … }
void RendererCanvasCull::canvas_light_set_item_cull_mask(RID p_light, int p_mask) { … }
void RendererCanvasCull::canvas_light_set_item_shadow_cull_mask(RID p_light, int p_mask) { … }
void RendererCanvasCull::canvas_light_set_directional_distance(RID p_light, float p_distance) { … }
void RendererCanvasCull::canvas_light_set_blend_mode(RID p_light, RS::CanvasLightBlendMode p_mode) { … }
void RendererCanvasCull::canvas_light_set_shadow_enabled(RID p_light, bool p_enabled) { … }
void RendererCanvasCull::canvas_light_set_shadow_filter(RID p_light, RS::CanvasLightShadowFilter p_filter) { … }
void RendererCanvasCull::canvas_light_set_shadow_color(RID p_light, const Color &p_color) { … }
void RendererCanvasCull::canvas_light_set_shadow_smooth(RID p_light, float p_smooth) { … }
void RendererCanvasCull::canvas_light_set_interpolated(RID p_light, bool p_interpolated) { … }
void RendererCanvasCull::canvas_light_reset_physics_interpolation(RID p_light) { … }
void RendererCanvasCull::canvas_light_transform_physics_interpolation(RID p_light, const Transform2D &p_transform) { … }
RID RendererCanvasCull::canvas_light_occluder_allocate() { … }
void RendererCanvasCull::canvas_light_occluder_initialize(RID p_rid) { … }
void RendererCanvasCull::canvas_light_occluder_attach_to_canvas(RID p_occluder, RID p_canvas) { … }
void RendererCanvasCull::canvas_light_occluder_set_enabled(RID p_occluder, bool p_enabled) { … }
void RendererCanvasCull::canvas_light_occluder_set_polygon(RID p_occluder, RID p_polygon) { … }
void RendererCanvasCull::canvas_light_occluder_set_as_sdf_collision(RID p_occluder, bool p_enable) { … }
void RendererCanvasCull::canvas_light_occluder_set_transform(RID p_occluder, const Transform2D &p_xform) { … }
void RendererCanvasCull::canvas_light_occluder_set_light_mask(RID p_occluder, int p_mask) { … }
void RendererCanvasCull::canvas_light_occluder_set_interpolated(RID p_occluder, bool p_interpolated) { … }
void RendererCanvasCull::canvas_light_occluder_reset_physics_interpolation(RID p_occluder) { … }
void RendererCanvasCull::canvas_light_occluder_transform_physics_interpolation(RID p_occluder, const Transform2D &p_transform) { … }
RID RendererCanvasCull::canvas_occluder_polygon_allocate() { … }
void RendererCanvasCull::canvas_occluder_polygon_initialize(RID p_rid) { … }
void RendererCanvasCull::canvas_occluder_polygon_set_shape(RID p_occluder_polygon, const Vector<Vector2> &p_shape, bool p_closed) { … }
void RendererCanvasCull::canvas_occluder_polygon_set_cull_mode(RID p_occluder_polygon, RS::CanvasOccluderPolygonCullMode p_mode) { … }
void RendererCanvasCull::canvas_set_shadow_texture_size(int p_size) { … }
RID RendererCanvasCull::canvas_texture_allocate() { … }
void RendererCanvasCull::canvas_texture_initialize(RID p_rid) { … }
void RendererCanvasCull::canvas_texture_set_channel(RID p_canvas_texture, RS::CanvasTextureChannel p_channel, RID p_texture) { … }
void RendererCanvasCull::canvas_texture_set_shading_parameters(RID p_canvas_texture, const Color &p_base_color, float p_shininess) { … }
void RendererCanvasCull::canvas_texture_set_texture_filter(RID p_canvas_texture, RS::CanvasItemTextureFilter p_filter) { … }
void RendererCanvasCull::canvas_texture_set_texture_repeat(RID p_canvas_texture, RS::CanvasItemTextureRepeat p_repeat) { … }
void RendererCanvasCull::canvas_item_set_default_texture_filter(RID p_item, RS::CanvasItemTextureFilter p_filter) { … }
void RendererCanvasCull::canvas_item_set_default_texture_repeat(RID p_item, RS::CanvasItemTextureRepeat p_repeat) { … }
void RendererCanvasCull::update_visibility_notifiers() { … }
Rect2 RendererCanvasCull::_debug_canvas_item_get_rect(RID p_item) { … }
bool RendererCanvasCull::free(RID p_rid) { … }
template <typename T>
void RendererCanvasCull::_free_rids(T &p_owner, const char *p_type) { … }
void RendererCanvasCull::finalize() { … }
void RendererCanvasCull::tick() { … }
void RendererCanvasCull::update_interpolation_tick(bool p_process) { … }
void RendererCanvasCull::InterpolationData::notify_free_canvas_item(RID p_rid, RendererCanvasCull::Item &r_canvas_item) { … }
void RendererCanvasCull::InterpolationData::notify_free_canvas_light(RID p_rid, RendererCanvasRender::Light &r_canvas_light) { … }
void RendererCanvasCull::InterpolationData::notify_free_canvas_light_occluder(RID p_rid, RendererCanvasRender::LightOccluderInstance &r_canvas_light_occluder) { … }
RendererCanvasCull::RendererCanvasCull() { … }
RendererCanvasCull::~RendererCanvasCull() { … }