[Bf-blender-cvs] [d44a93f4110] lanpr-under-gp: LineArt: Memory optimizations by removing obsolete variables.

YimingWu noreply at git.blender.org
Wed Jul 29 17:48:34 CEST 2020


Commit: d44a93f41103ccd03c17de2eec9773d45a41ac4e
Author: YimingWu
Date:   Wed Jul 29 23:48:02 2020 +0800
Branches: lanpr-under-gp
https://developer.blender.org/rBd44a93f41103ccd03c17de2eec9773d45a41ac4e

LineArt: Memory optimizations by removing obsolete variables.

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

M	source/blender/editors/include/ED_lineart.h
M	source/blender/editors/lineart/lineart_cpu.c

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

diff --git a/source/blender/editors/include/ED_lineart.h b/source/blender/editors/include/ED_lineart.h
index 3555dde36bd..4a37e2909e2 100644
--- a/source/blender/editors/include/ED_lineart.h
+++ b/source/blender/editors/include/ED_lineart.h
@@ -86,13 +86,18 @@ typedef struct LineartRenderLineSegment {
   double at;
   /** Occlusion level after "at" point */
   unsigned char occlusion;
-  /** For determining lines beind a glass window material. (TODO: implement this) */
-  short material_mask_mark;
+
+  /** For determining lines beind a glass window material. (TODO: implement this)
+   *  the size of this variable should also be dynamically decided, 1 byte to 8 byte,
+   *  allows 8 to 64 materials for "transparent mask". 1 byte (8 materials) should be
+   *  enought for most cases.
+   */
+  /* short material_mask_mark; */
 } LineartRenderLineSegment;
 
 typedef struct LineartRenderVert {
   struct LineartRenderVert *next, *prev;
-  double gloc[4];
+  double gloc[3];
   double fbcoord[4];
   /**  Used as "r" when intersecting */
   struct BMVert *v;
@@ -116,9 +121,6 @@ typedef struct LineartRenderLine {
 
   /**  Still need this entry because culled lines will not add to object reln node */
   struct Object *object_ref;
-
-  /**  For gpencil stroke modifier */
-  int edge_idx;
 } LineartRenderLine;
 
 typedef struct LineartRenderLineChain {
diff --git a/source/blender/editors/lineart/lineart_cpu.c b/source/blender/editors/lineart/lineart_cpu.c
index e0d575086e0..b6deec21fd5 100644
--- a/source/blender/editors/lineart/lineart_cpu.c
+++ b/source/blender/editors/lineart/lineart_cpu.c
@@ -1428,7 +1428,6 @@ static void lineart_geometry_object_load(Object *ob,
         }
       }
       if (use_smooth_contour_modifier_contour) {
-        rl->edge_idx = i;
         if (BM_elem_flag_test(e->v1, BM_ELEM_SELECT) && BM_elem_flag_test(e->v2, BM_ELEM_SELECT)) {
           rl->flags |= LRT_EDGE_FLAG_CONTOUR;
         }



More information about the Bf-blender-cvs mailing list