[Bf-blender-cvs] [c4120da72db] greasepencil-refactor: GPencil: Disable AA using simplify

Antonio Vazquez noreply at git.blender.org
Mon Jan 6 11:16:11 CET 2020


Commit: c4120da72dbdcc4f010da0f4a26ae3063c5d78a7
Author: Antonio Vazquez
Date:   Mon Jan 6 11:16:02 2020 +0100
Branches: greasepencil-refactor
https://developer.blender.org/rBc4120da72dbdcc4f010da0f4a26ae3063c5d78a7

GPencil: Disable AA using simplify

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

M	source/blender/blenkernel/BKE_gpencil.h
M	source/blender/draw/engines/gpencil/gpencil_engine.c

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

diff --git a/source/blender/blenkernel/BKE_gpencil.h b/source/blender/blenkernel/BKE_gpencil.h
index 1e13158c0c4..e85db82b26e 100644
--- a/source/blender/blenkernel/BKE_gpencil.h
+++ b/source/blender/blenkernel/BKE_gpencil.h
@@ -65,7 +65,7 @@ struct MDeformVert;
   ((GPENCIL_SIMPLIFY_ONPLAY(playing) && (GPENCIL_SIMPLIFY(scene)) && \
     (scene->r.simplify_gpencil & SIMPLIFY_GPENCIL_TINT)))
 #define GPENCIL_SIMPLIFY_AA(scene) \
-  ((GPENCIL_SIMPLIFY(scene)) && (scene->r.simplify_gpencil & SIMPLIFY_GPENCIL_AA)))
+  ((GPENCIL_SIMPLIFY(scene)) && (scene->r.simplify_gpencil & SIMPLIFY_GPENCIL_AA))
 
 /* Vertex Color macros. */
 #define GPENCIL_USE_VERTEX_COLOR(toolsettings) \
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index 6964198650f..8459ac12bc7 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -1682,6 +1682,7 @@ static void GPENCIL_draw_scene_new(void *ved)
   GPENCIL_PrivateData *pd = vedata->stl->pd;
   GPENCIL_FramebufferList *fbl = vedata->fbl;
   DefaultFramebufferList *dfbl = DRW_viewport_framebuffer_list_get();
+  const DRWContextState *draw_ctx = DRW_context_state_get();
   float clear_cols[2][4] = {{0.0f, 0.0f, 0.0f, 0.0f}, {1.0f, 1.0f, 1.0f, 1.0f}};
 
   if (pd->draw_depth_only) {
@@ -1710,7 +1711,9 @@ static void GPENCIL_draw_scene_new(void *ved)
     GPENCIL_fast_draw_end(vedata);
   }
 
-  GPENCIL_antialiasing_draw(vedata);
+  if (!GPENCIL_SIMPLIFY_AA(draw_ctx->scene)) {
+    GPENCIL_antialiasing_draw(vedata);
+  }
 
   if (dfbl->default_fb) {
     GPU_framebuffer_bind(dfbl->default_fb);



More information about the Bf-blender-cvs mailing list