[Bf-blender-cvs] [3255ddc2f8b] temp-image-engine: Rename some methods to represent their internal flag.

Jeroen Bakker noreply at git.blender.org
Wed Dec 7 15:03:43 CET 2022


Commit: 3255ddc2f8be34153277efade03b364ec4bfa67f
Author: Jeroen Bakker
Date:   Wed Dec 7 15:03:36 2022 +0100
Branches: temp-image-engine
https://developer.blender.org/rB3255ddc2f8be34153277efade03b364ec4bfa67f

Rename some methods to represent their internal flag.

===================================================================

M	source/blender/draw/engines/image/image_drawing_mode.hh
M	source/blender/draw/engines/image/image_instance_data.hh

===================================================================

diff --git a/source/blender/draw/engines/image/image_drawing_mode.hh b/source/blender/draw/engines/image/image_drawing_mode.hh
index b2b6276dc8a..70e8fc3b47a 100644
--- a/source/blender/draw/engines/image/image_drawing_mode.hh
+++ b/source/blender/draw/engines/image/image_drawing_mode.hh
@@ -469,11 +469,12 @@ template<typename TextureMethod> class ScreenSpaceDrawingMode : public AbstractD
     rctf tile_area;
 
     BLI_rctf_init(&texture_area, 0.0, texture_width, 0.0, texture_height);
-    BLI_rctf_init(&tile_area,
-                  tile_buffer.x * (texture_info.clipping_uv_bounds.xmin - image_tile.get_tile_x_offset()),
-                  tile_buffer.x * (texture_info.clipping_uv_bounds.xmax - image_tile.get_tile_x_offset()),
-                  tile_buffer.y * (texture_info.clipping_uv_bounds.ymin - image_tile.get_tile_y_offset()),
-                  tile_buffer.y * (texture_info.clipping_uv_bounds.ymax - image_tile.get_tile_y_offset()));
+    BLI_rctf_init(
+        &tile_area,
+        tile_buffer.x * (texture_info.clipping_uv_bounds.xmin - image_tile.get_tile_x_offset()),
+        tile_buffer.x * (texture_info.clipping_uv_bounds.xmax - image_tile.get_tile_x_offset()),
+        tile_buffer.y * (texture_info.clipping_uv_bounds.ymin - image_tile.get_tile_y_offset()),
+        tile_buffer.y * (texture_info.clipping_uv_bounds.ymax - image_tile.get_tile_y_offset()));
     BLI_rctf_transform_calc_m4_pivot_min(&tile_area, &texture_area, uv_to_texel.ptr());
     invert_m4(uv_to_texel.ptr());
 
@@ -512,7 +513,7 @@ template<typename TextureMethod> class ScreenSpaceDrawingMode : public AbstractD
     TextureMethod method(instance_data);
 
     instance_data->partial_update.ensure_image(image);
-    instance_data->clear_dirty_flag();
+    instance_data->clear_need_full_update_flag();
     instance_data->float_buffers.reset_usage_flags();
 
     /* Step: Find out which screen space textures are needed to draw on the screen. Remove the
diff --git a/source/blender/draw/engines/image/image_instance_data.hh b/source/blender/draw/engines/image/image_instance_data.hh
index 00dbf991724..c8de4d0ac83 100644
--- a/source/blender/draw/engines/image/image_instance_data.hh
+++ b/source/blender/draw/engines/image/image_instance_data.hh
@@ -64,13 +64,13 @@ struct IMAGE_InstanceData {
  public:
   virtual ~IMAGE_InstanceData() = default;
 
-  void clear_dirty_flag()
+  void clear_need_full_update_flag()
   {
-    reset_dirty_flag(false);
+    reset_need_full_update(false);
   }
   void mark_all_texture_slots_dirty()
   {
-    reset_dirty_flag(true);
+    reset_need_full_update(true);
   }
 
   void update_gpu_texture_allocations()
@@ -110,14 +110,14 @@ struct IMAGE_InstanceData {
     ImageUsage usage(image, image_user, flags.do_tile_drawing);
     if (last_usage != usage) {
       last_usage = usage;
-      reset_dirty_flag(true);
+      reset_need_full_update(true);
       float_buffers.clear();
     }
   }
 
  private:
   /** \brief Set dirty flag of all texture slots to the given value. */
-  void reset_dirty_flag(bool new_value)
+  void reset_need_full_update(bool new_value)
   {
     for (int i = 0; i < SCREEN_SPACE_DRAWING_MODE_TEXTURE_LEN; i++) {
       texture_infos[i].need_full_update = new_value;



More information about the Bf-blender-cvs mailing list