Commit: bfa888cef28955501195dfbee002bc793685e527
Author: Campbell Barton
Date:   Fri Apr 21 21:14:11 2017 +1000
Branches: blender2.8
https://developer.blender.org/rBbfa888cef28955501195dfbee002bc793685e527

Cleanup: move draw-cache creation from BKE to DRW

Creating draw-cache should only ever be used by the draw-manager.

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

M       source/blender/blenkernel/BKE_curve.h
D       source/blender/blenkernel/BKE_curve_render.h
D       source/blender/blenkernel/BKE_displist_render.h
M       source/blender/blenkernel/BKE_lattice.h
D       source/blender/blenkernel/BKE_lattice_render.h
M       source/blender/blenkernel/BKE_mesh.h
D       source/blender/blenkernel/BKE_mesh_render.h
M       source/blender/blenkernel/CMakeLists.txt
M       source/blender/blenkernel/intern/curve.c
M       source/blender/blenkernel/intern/lattice.c
M       source/blender/blenkernel/intern/mesh.c
M       source/blender/blenkernel/intern/object_update.c
M       source/blender/draw/CMakeLists.txt
M       source/blender/draw/intern/draw_cache.c
M       source/blender/draw/intern/draw_cache.h
A       source/blender/draw/intern/draw_cache_impl.h
R095    source/blender/blenkernel/intern/curve_render.c 
source/blender/draw/intern/draw_cache_impl_curve.c
R097    source/blender/blenkernel/intern/displist_render.c      
source/blender/draw/intern/draw_cache_impl_displist.c
R093    source/blender/blenkernel/intern/lattice_render.c       
source/blender/draw/intern/draw_cache_impl_lattice.c
R096    source/blender/blenkernel/intern/mesh_render.c  
source/blender/draw/intern/draw_cache_impl_mesh.c
M       source/blender/draw/intern/draw_manager.c
M       source/blender/editors/curve/editfont.c
M       source/blender/editors/space_view3d/drawobject.c
M       source/blender/editors/space_view3d/space_view3d.c

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

diff --git a/source/blender/blenkernel/BKE_curve.h 
b/source/blender/blenkernel/BKE_curve.h
index e111bd0e16b..411e71e31e3 100644
--- a/source/blender/blenkernel/BKE_curve.h
+++ b/source/blender/blenkernel/BKE_curve.h
@@ -219,4 +219,12 @@ void BKE_curve_eval_geometry(struct EvaluationContext 
*eval_ctx,
 void BKE_curve_eval_path(struct EvaluationContext *eval_ctx,
                          struct Curve *curve);
 
+/* Draw Cache */
+enum {
+       BKE_CURVE_BATCH_DIRTY_ALL = 0,
+       BKE_CURVE_BATCH_DIRTY_SELECT,
+};
+void BKE_curve_batch_cache_dirty(struct Curve *cu, int mode);
+void BKE_curve_batch_cache_free(struct Curve *cu);
+
 #endif  /* __BKE_CURVE_H__ */
diff --git a/source/blender/blenkernel/BKE_curve_render.h 
b/source/blender/blenkernel/BKE_curve_render.h
deleted file mode 100644
index be6da731d7c..00000000000
--- a/source/blender/blenkernel/BKE_curve_render.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-#ifndef __BKE_CURVE_RENDER_H__
-#define __BKE_CURVE_RENDER_H__
-
-/** \file BKE_curve_render.h
- *  \ingroup bke
- */
-
-struct Batch;
-struct Curve;
-
-void BKE_curve_batch_cache_dirty(struct Curve *cu);
-void BKE_curve_batch_selection_dirty(struct Curve *cu);
-void BKE_curve_batch_cache_clear(struct Curve *cu);
-void BKE_curve_batch_cache_free(struct Curve *cu);
-struct Batch *BKE_curve_batch_cache_get_wire_edge(struct Curve *cu, struct 
CurveCache *ob_curve_cache);
-struct Batch *BKE_curve_batch_cache_get_normal_edge(
-        struct Curve *cu, struct CurveCache *ob_curve_cache, float 
normal_size);
-struct Batch *BKE_curve_batch_cache_get_overlay_edges(struct Curve *cu);
-struct Batch *BKE_curve_batch_cache_get_overlay_verts(struct Curve *cu);
-
-struct Batch *BKE_curve_batch_cache_get_triangles_with_normals(struct Curve 
*cu, struct CurveCache *ob_curve_cache);
-
-/* OB_FONT */
-struct Batch *BKE_curve_batch_cache_get_overlay_cursor(struct Curve *cu);
-struct Batch *BKE_curve_batch_cache_get_overlay_select(struct Curve *cu);
-
-#endif /* __BKE_CURVE_RENDER_H__ */
diff --git a/source/blender/blenkernel/BKE_displist_render.h 
b/source/blender/blenkernel/BKE_displist_render.h
deleted file mode 100644
index 0724bdd29cd..00000000000
--- a/source/blender/blenkernel/BKE_displist_render.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-#ifndef __BKE_DISPLIST_RENDER_H__
-#define __BKE_DISPLIST_RENDER_H__
-
-/** \file BKE_displist_render.h
- *  \ingroup bke
- */
-
-struct Batch;
-struct ListBase;
-struct VertexBuffer;
-
-struct Batch *BLI_displist_batch_calc_surface(struct ListBase *lb);
-
-#endif /* __BKE_DISPLIST_RENDER_H__ */
diff --git a/source/blender/blenkernel/BKE_lattice.h 
b/source/blender/blenkernel/BKE_lattice.h
index 226c82da295..1f8da15fcb7 100644
--- a/source/blender/blenkernel/BKE_lattice.h
+++ b/source/blender/blenkernel/BKE_lattice.h
@@ -103,4 +103,12 @@ struct EvaluationContext;
 void BKE_lattice_eval_geometry(struct EvaluationContext *eval_ctx,
                                struct Lattice *latt);
 
+/* Draw Cache */
+enum {
+       BKE_LATTICE_BATCH_DIRTY_ALL = 0,
+       BKE_LATTICE_BATCH_DIRTY_SELECT,
+};
+void BKE_lattice_batch_cache_dirty(struct Lattice *lt, int mode);
+void BKE_lattice_batch_cache_free(struct Lattice *lt);
+
 #endif  /* __BKE_LATTICE_H__ */
diff --git a/source/blender/blenkernel/BKE_lattice_render.h 
b/source/blender/blenkernel/BKE_lattice_render.h
deleted file mode 100644
index dc71a82b893..00000000000
--- a/source/blender/blenkernel/BKE_lattice_render.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-#ifndef __BKE_LATTICE_RENDER_H__
-#define __BKE_LATTICE_RENDER_H__
-
-/** \file BKE_lattice_render.h
- *  \ingroup bke
- */
-
-struct Batch;
-struct Lattice;
-
-void BKE_lattice_batch_cache_dirty(struct Lattice *lt);
-void BKE_lattice_batch_selection_dirty(struct Lattice *lt);
-void BKE_lattice_batch_cache_clear(struct Lattice *lt);
-void BKE_lattice_batch_cache_free(struct Lattice *lt);
-struct Batch *BKE_lattice_batch_cache_get_all_edges(struct Lattice *lt);
-struct Batch *BKE_lattice_batch_cache_get_all_verts(struct Lattice *lt);
-struct Batch *BKE_lattice_batch_cache_get_overlay_verts(struct Lattice *lt);
-
-#endif /* __BKE_LATTICE_RENDER_H__ */
diff --git a/source/blender/blenkernel/BKE_mesh.h 
b/source/blender/blenkernel/BKE_mesh.h
index b83bec5a302..a24ce490262 100644
--- a/source/blender/blenkernel/BKE_mesh.h
+++ b/source/blender/blenkernel/BKE_mesh.h
@@ -407,6 +407,14 @@ struct EvaluationContext;
 void BKE_mesh_eval_geometry(struct EvaluationContext *eval_ctx,
                             struct Mesh *mesh);
 
+/* Draw Cache */
+enum {
+       BKE_MESH_BATCH_DIRTY_ALL = 0,
+       BKE_MESH_BATCH_DIRTY_SELECT,
+};
+void BKE_mesh_batch_cache_dirty(struct Mesh *me, int mode);
+void BKE_mesh_batch_cache_free(struct Mesh *me);
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/source/blender/blenkernel/BKE_mesh_render.h 
b/source/blender/blenkernel/BKE_mesh_render.h
deleted file mode 100644
index 0869c96abf0..00000000000
--- a/source/blender/blenkernel/BKE_mesh_render.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2017 by Blender Foundation.
- * All rights reserved.
- *
- * Contributor(s): Blender Foundation, Mike Erwin, Dalai Felinto
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-#ifndef __BKE_MESH_RENDER_H__
-#define __BKE_MESH_RENDER_H__
-
-/** \file BKE_mesh_render.h
- *  \ingroup bke
- */
-
-struct Batch;
-struct Mesh;
-
-void BKE_mesh_batch_cache_dirty(struct Mesh *me);
-void BKE_mesh_batch_selection_dirty(struct Mesh *me);
-void BKE_mesh_batch_cache_clear(struct Mesh *me);
-void BKE_mesh_batch_cache_free(struct Mesh *me);
-struct Batch *BKE_mesh_batch_cache_get_all_edges(struct Mesh *me);
-struct Batch *BKE_mesh_batch_cache_get_all_triangles(struct Mesh *me);
-struct Batch *BKE_mesh_batch_cache_get_triangles_with_normals(struct Mesh *me);
-struct Batch *BKE_mesh_batch_cache_get_points_with_normals(struct Mesh *me);
-struct Batch *BKE_mesh_batch_cache_get_all_verts(struct Mesh *me);
-struct Batch *BKE_mesh_batch_cache_get_fancy_edges(struct Mesh *me);
-struct Batch *BKE_mesh_batch_cache_get_overlay_triangles(struct Mesh *me);
-struct Batch *BKE_mesh_batch_cache_get_overlay_loose_edges(struct Mesh *me);
-struct Batch *BKE_mesh_batch_cache_get_overlay_loose_verts(struct Mesh *me);
-struct Batch *BKE_mesh_batch_cache_get_overlay_facedots(struct Mesh *me);
-
-#endif /* __BKE_MESH_RENDER_H__ */
diff --git a/source/blender/blenkernel/CMakeLists.txt 
b/source/blender/blenkernel/CMakeLists.txt
index fb35c08fd42..9fa6b7cc3cf 100644
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@ -93,14 +93,12 @@ set(SRC
        intern/context.c
        intern/crazyspace.c
        intern/curve.c
-       intern/curve_render.c
        intern/customdata.c
        intern/customdata_file.c
        intern/data_transfer.c
        intern/deform.c
        intern/depsgraph.c
        intern/displist.c
-       intern/displist_render.c
        intern/dynamicpaint.c
        intern/editderivedmesh.c
        intern/editmesh.c
@@ -122,7 +120,6 @@ set(SRC
        intern/key.c
        intern/lamp.c
        intern/lattice.c
-       intern/lattice_render.c
        intern/

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to