[Bf-blender-cvs] [b29fd7bab80] master: GPencil: Cleanup - Replace gp_ prefix with gpencil_

Antonio Vazquez noreply at git.blender.org
Mon Jun 29 22:37:15 CEST 2020


Commit: b29fd7bab80b236b9aa4d94a9ff6ccb64f76cd45
Author: Antonio Vazquez
Date:   Mon Jun 29 22:36:32 2020 +0200
Branches: master
https://developer.blender.org/rBb29fd7bab80b236b9aa4d94a9ff6ccb64f76cd45

GPencil: Cleanup - Replace gp_ prefix with gpencil_

This was missing in previous cleanup commits.

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

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

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

diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index f658356c1b4..dded83bacf1 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -384,7 +384,7 @@ static void gpencil_drawcall_flush(gpIterPopulateData *iter)
 }
 
 /* Group drawcalls that are consecutive and with the same type. Reduces GPU driver overhead. */
-static void gp_drawcall_add(
+static void gpencil_drawcall_add(
     gpIterPopulateData *iter, struct GPUBatch *geom, bool instancing, int v_first, int v_count)
 {
 #if DISABLE_BATCHING
@@ -414,7 +414,7 @@ static void gpencil_stroke_cache_populate(bGPDlayer *gpl,
                                           bGPDstroke *gps,
                                           void *thunk);
 
-static void gp_sbuffer_cache_populate(gpIterPopulateData *iter)
+static void gpencil_sbuffer_cache_populate(gpIterPopulateData *iter)
 {
   iter->do_sbuffer_call = DRAW_NOW;
   /* In order to draw the sbuffer stroke correctly mixed with other strokes,
@@ -451,7 +451,7 @@ static void gpencil_layer_cache_populate(bGPDlayer *gpl,
   gpencil_drawcall_flush(iter);
 
   if (iter->do_sbuffer_call) {
-    gp_sbuffer_cache_populate(iter);
+    gpencil_sbuffer_cache_populate(iter);
   }
   else {
     iter->do_sbuffer_call = !pd->do_fast_drawing && (gpd == pd->sbuffer_gpd) &&
@@ -540,7 +540,7 @@ static void gpencil_stroke_cache_populate(bGPDlayer *gpl,
                                   DRW_cache_gpencil_fills_get(iter->ob, iter->pd->cfra);
     int vfirst = gps->runtime.fill_start * 3;
     int vcount = gps->tot_triangles * 3;
-    gp_drawcall_add(iter, geom, false, vfirst, vcount);
+    gpencil_drawcall_add(iter, geom, false, vfirst, vcount);
   }
 
   if (show_stroke) {
@@ -550,13 +550,13 @@ static void gpencil_stroke_cache_populate(bGPDlayer *gpl,
     int vfirst = gps->runtime.stroke_start - 1;
     /* Include "potential" cyclic vertex and start adj vertex (see shader). */
     int vcount = gps->totpoints + 1 + 1;
-    gp_drawcall_add(iter, geom, true, vfirst, vcount);
+    gpencil_drawcall_add(iter, geom, true, vfirst, vcount);
   }
 
   iter->stroke_index_last = gps->runtime.stroke_start + gps->totpoints + 1;
 }
 
-static void gp_sbuffer_cache_populate_fast(GPENCIL_Data *vedata, gpIterPopulateData *iter)
+static void gpencil_sbuffer_cache_populate_fast(GPENCIL_Data *vedata, gpIterPopulateData *iter)
 {
   bGPdata *gpd = (bGPdata *)iter->ob->data;
   if (gpd != iter->pd->sbuffer_gpd) {
@@ -633,13 +633,13 @@ void GPENCIL_cache_populate(void *ved, Object *ob)
     gpencil_drawcall_flush(&iter);
 
     if (iter.do_sbuffer_call) {
-      gp_sbuffer_cache_populate(&iter);
+      gpencil_sbuffer_cache_populate(&iter);
     }
 
     gpencil_vfx_cache_populate(vedata, ob, iter.tgp_ob);
 
     if (pd->do_fast_drawing) {
-      gp_sbuffer_cache_populate_fast(vedata, &iter);
+      gpencil_sbuffer_cache_populate_fast(vedata, &iter);
     }
   }
 
diff --git a/source/blender/draw/intern/draw_cache_impl_gpencil.c b/source/blender/draw/intern/draw_cache_impl_gpencil.c
index b4974330043..53e04fb61ee 100644
--- a/source/blender/draw/intern/draw_cache_impl_gpencil.c
+++ b/source/blender/draw/intern/draw_cache_impl_gpencil.c
@@ -349,10 +349,10 @@ static void gpencil_stroke_iter_cb(bGPDlayer *UNUSED(gpl),
   }
 }
 
-static void gp_object_verts_count_cb(bGPDlayer *UNUSED(gpl),
-                                     bGPDframe *UNUSED(gpf),
-                                     bGPDstroke *gps,
-                                     void *thunk)
+static void gpencil_object_verts_count_cb(bGPDlayer *UNUSED(gpl),
+                                          bGPDframe *UNUSED(gpf),
+                                          bGPDstroke *gps,
+                                          void *thunk)
 {
   gpIterData *iter = (gpIterData *)thunk;
 
@@ -387,7 +387,7 @@ static void gpencil_batches_ensure(Object *ob, GpencilBatchCache *cache, int cfr
         .tri_len = 0,
     };
     BKE_gpencil_visible_stroke_iter(
-        NULL, ob, NULL, gp_object_verts_count_cb, &iter, do_onion, cfra);
+        NULL, ob, NULL, gpencil_object_verts_count_cb, &iter, do_onion, cfra);
 
     /* Create VBOs. */
     GPUVertFormat *format = gpencil_stroke_format();
@@ -441,10 +441,10 @@ GPUBatch *DRW_cache_gpencil_fills_get(Object *ob, int cfra)
   return cache->fill_batch;
 }
 
-static void gp_lines_indices_cb(bGPDlayer *UNUSED(gpl),
-                                bGPDframe *UNUSED(gpf),
-                                bGPDstroke *gps,
-                                void *thunk)
+static void gpencil_lines_indices_cb(bGPDlayer *UNUSED(gpl),
+                                     bGPDframe *UNUSED(gpf),
+                                     bGPDstroke *gps,
+                                     void *thunk)
 {
   gpIterData *iter = (gpIterData *)thunk;
   int pts_len = gps->totpoints + gpencil_stroke_is_cyclic(gps);
@@ -477,7 +477,8 @@ GPUBatch *DRW_cache_gpencil_face_wireframe_get(Object *ob)
 
     /* IMPORTANT: Keep in sync with gpencil_edit_batches_ensure() */
     bool do_onion = true;
-    BKE_gpencil_visible_stroke_iter(NULL, ob, NULL, gp_lines_indices_cb, &iter, do_onion, cfra);
+    BKE_gpencil_visible_stroke_iter(
+        NULL, ob, NULL, gpencil_lines_indices_cb, &iter, do_onion, cfra);
 
     GPUIndexBuf *ibo = GPU_indexbuf_build(&iter.ibo);



More information about the Bf-blender-cvs mailing list