[Bf-blender-cvs] [c874324c480] greasepencil-object: GPencil: Cleanup code

Antonio Vazquez noreply at git.blender.org
Thu Feb 13 10:08:49 CET 2020


Commit: c874324c4800b9daaf3cdc5115aa433561f7091b
Author: Antonio Vazquez
Date:   Thu Feb 13 10:08:38 2020 +0100
Branches: greasepencil-object
https://developer.blender.org/rBc874324c4800b9daaf3cdc5115aa433561f7091b

GPencil: Cleanup code

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

M	source/blender/draw/engines/gpencil/gpencil_draw_data.c
M	source/blender/draw/intern/draw_cache_impl_gpencil.c

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

diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_data.c b/source/blender/draw/engines/gpencil/gpencil_draw_data.c
index 58b1b72dd66..b679bc165c0 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_data.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_data.c
@@ -80,30 +80,6 @@ static struct GPUTexture *gpencil_image_texture_get(Image *image, bool *r_alpha_
   return gpu_tex;
 }
 
-#if 0 /* Old implementation. Reference for doing versioning code. TODO remove. */
-static void gpencil_uv_transform_get(const float ofs[2],
-                                     const float scale[2],
-                                     const float rotation,
-                                     float r_uvmat[3][2])
-{
-  /* OPTI this could use 3x2 matrices and reduce the number of operations drastically. */
-  float mat[4][4];
-  float scale_v3[3] = {scale[0], scale[1], 0.0};
-  /* Scale */
-  size_to_mat4(mat, scale_v3);
-  /* Offset to center. */
-  translate_m4(mat, 0.5f + ofs[0], 0.5f + ofs[1], 0.0f);
-  /* Rotation; */
-  rotate_m4(mat, 'Z', -rotation);
-  /* Translate. */
-  translate_m4(mat, -0.5f, -0.5f, 0.0f);
-  /* Convert to 3x2 */
-  copy_v2_v2(r_uvmat[0], mat[0]);
-  copy_v2_v2(r_uvmat[1], mat[1]);
-  copy_v2_v2(r_uvmat[2], mat[3]);
-}
-#endif
-
 static void gpencil_uv_transform_get(const float ofs[2],
                                      const float scale[2],
                                      const float rotation,
diff --git a/source/blender/draw/intern/draw_cache_impl_gpencil.c b/source/blender/draw/intern/draw_cache_impl_gpencil.c
index 0c7c426f81e..7e7a02503e6 100644
--- a/source/blender/draw/intern/draw_cache_impl_gpencil.c
+++ b/source/blender/draw/intern/draw_cache_impl_gpencil.c
@@ -86,7 +86,6 @@ static bool gpencil_batch_cache_valid(GpencilBatchCache *cache, bGPdata *gpd, in
     valid = false;
   }
   else if (cache->is_dirty) {
-    /* TODO, maybe get rid of the other dirty flags. */
     valid = false;
   }



More information about the Bf-blender-cvs mailing list