From f8df04ed50676c298e57853d56f6f24424ff70b7 Mon Sep 17 00:00:00 2001 From: lawnjelly Date: Sun, 12 Jun 2022 06:44:59 +0100 Subject: [PATCH] More low priority redraw request cases Some more cases of textures etc causing continuous updates in vital updates only mode are fixed. --- drivers/gles2/rasterizer_canvas_base_gles2.cpp | 4 ++-- drivers/gles2/rasterizer_canvas_gles2.cpp | 4 ++-- drivers/gles2/rasterizer_scene_gles2.cpp | 4 ++-- drivers/gles3/rasterizer_canvas_base_gles3.cpp | 4 ++-- drivers/gles3/rasterizer_canvas_gles3.cpp | 2 +- drivers/gles3/rasterizer_scene_gles3.cpp | 4 ++-- servers/visual/visual_server_scene.cpp | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/gles2/rasterizer_canvas_base_gles2.cpp b/drivers/gles2/rasterizer_canvas_base_gles2.cpp index a71f442cce28..cc1073da163b 100644 --- a/drivers/gles2/rasterizer_canvas_base_gles2.cpp +++ b/drivers/gles2/rasterizer_canvas_base_gles2.cpp @@ -196,7 +196,7 @@ RasterizerStorageGLES2::Texture *RasterizerCanvasBaseGLES2::_bind_canvas_texture } else { if (texture->redraw_if_visible) { - VisualServerRaster::redraw_request(); + VisualServerRaster::redraw_request(false); } texture = texture->get_ptr(); @@ -236,7 +236,7 @@ RasterizerStorageGLES2::Texture *RasterizerCanvasBaseGLES2::_bind_canvas_texture } else { if (normal_map->redraw_if_visible) { //check before proxy, because this is usually used with proxies - VisualServerRaster::redraw_request(); + VisualServerRaster::redraw_request(false); } normal_map = normal_map->get_ptr(); diff --git a/drivers/gles2/rasterizer_canvas_gles2.cpp b/drivers/gles2/rasterizer_canvas_gles2.cpp index 917a9362f13a..4cbd6bbe200e 100644 --- a/drivers/gles2/rasterizer_canvas_gles2.cpp +++ b/drivers/gles2/rasterizer_canvas_gles2.cpp @@ -1697,7 +1697,7 @@ void RasterizerCanvasGLES2::_legacy_canvas_render_item(Item *p_ci, RenderItemSta } if (t->redraw_if_visible) { - VisualServerRaster::redraw_request(); + VisualServerRaster::redraw_request(false); } t = t->get_ptr(); @@ -2059,7 +2059,7 @@ void RasterizerCanvasGLES2::render_joined_item(const BItemJoined &p_bij, RenderI } if (t->redraw_if_visible) { - VisualServerRaster::redraw_request(); + VisualServerRaster::redraw_request(false); } t = t->get_ptr(); diff --git a/drivers/gles2/rasterizer_scene_gles2.cpp b/drivers/gles2/rasterizer_scene_gles2.cpp index 3e82bd339075..8b90051f2f92 100644 --- a/drivers/gles2/rasterizer_scene_gles2.cpp +++ b/drivers/gles2/rasterizer_scene_gles2.cpp @@ -1435,7 +1435,7 @@ bool RasterizerSceneGLES2::_setup_material(RasterizerStorageGLES2::Material *p_m } if (t->redraw_if_visible) { //must check before proxy because this is often used with proxies - VisualServerRaster::redraw_request(); + VisualServerRaster::redraw_request(false); } t = t->get_ptr(); @@ -1812,7 +1812,7 @@ void RasterizerSceneGLES2::_render_geometry(RenderList::Element *p_element) { RasterizerStorageGLES2::Texture *t = storage->texture_owner.get(c.texture); if (t->redraw_if_visible) { - VisualServerRaster::redraw_request(); + VisualServerRaster::redraw_request(false); } t = t->get_ptr(); diff --git a/drivers/gles3/rasterizer_canvas_base_gles3.cpp b/drivers/gles3/rasterizer_canvas_base_gles3.cpp index b3261a184f96..8fa7cdc7264a 100644 --- a/drivers/gles3/rasterizer_canvas_base_gles3.cpp +++ b/drivers/gles3/rasterizer_canvas_base_gles3.cpp @@ -226,7 +226,7 @@ RasterizerStorageGLES3::Texture *RasterizerCanvasBaseGLES3::_bind_canvas_texture } else { if (texture->redraw_if_visible) { //check before proxy, because this is usually used with proxies - VisualServerRaster::redraw_request(); + VisualServerRaster::redraw_request(false); } texture = texture->get_ptr(); @@ -265,7 +265,7 @@ RasterizerStorageGLES3::Texture *RasterizerCanvasBaseGLES3::_bind_canvas_texture } else { if (normal_map->redraw_if_visible) { //check before proxy, because this is usually used with proxies - VisualServerRaster::redraw_request(); + VisualServerRaster::redraw_request(false); } normal_map = normal_map->get_ptr(); diff --git a/drivers/gles3/rasterizer_canvas_gles3.cpp b/drivers/gles3/rasterizer_canvas_gles3.cpp index 376b2314095e..4323d741260a 100644 --- a/drivers/gles3/rasterizer_canvas_gles3.cpp +++ b/drivers/gles3/rasterizer_canvas_gles3.cpp @@ -1292,7 +1292,7 @@ void RasterizerCanvasGLES3::render_joined_item(const BItemJoined &p_bij, RenderI } if (t->redraw_if_visible) { //check before proxy, because this is usually used with proxies - VisualServerRaster::redraw_request(); + VisualServerRaster::redraw_request(false); } t = t->get_ptr(); diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp index f1d21a0865e1..ae8d71d91911 100644 --- a/drivers/gles3/rasterizer_scene_gles3.cpp +++ b/drivers/gles3/rasterizer_scene_gles3.cpp @@ -1161,7 +1161,7 @@ bool RasterizerSceneGLES3::_setup_material(RasterizerStorageGLES3::Material *p_m if (t) { if (t->redraw_if_visible) { //must check before proxy because this is often used with proxies - VisualServerRaster::redraw_request(); + VisualServerRaster::redraw_request(false); } t = t->get_ptr(); //resolve for proxies @@ -1569,7 +1569,7 @@ void RasterizerSceneGLES3::_render_geometry(RenderList::Element *e) { RasterizerStorageGLES3::Texture *t = storage->texture_owner.get(c.texture); if (t->redraw_if_visible) { - VisualServerRaster::redraw_request(); + VisualServerRaster::redraw_request(false); } t = t->get_ptr(); //resolve for proxies diff --git a/servers/visual/visual_server_scene.cpp b/servers/visual/visual_server_scene.cpp index 969b2fa81eaa..9e67237bfd8c 100644 --- a/servers/visual/visual_server_scene.cpp +++ b/servers/visual/visual_server_scene.cpp @@ -3298,7 +3298,7 @@ bool VisualServerScene::_render_reflection_probe_step(Instance *p_instance, int Scenario *scenario = p_instance->scenario; ERR_FAIL_COND_V(!scenario, true); - VisualServerRaster::redraw_request(); //update, so it updates in editor + VisualServerRaster::redraw_request(false); //update, so it updates in editor if (p_step == 0) { if (!VSG::scene_render->reflection_probe_instance_begin_render(reflection_probe->instance, scenario->reflection_atlas)) {