[gtk+/wip/otte/shader: 77/127] xxx: Change the clip shader do not use #f



commit 3526db12d105fed03ba994806ce5f2b0ab6c7391
Author: Benjamin Otte <otte redhat com>
Date:   Mon Oct 2 16:59:32 2017 +0200

    xxx: Change the clip shader do not use #f
    
    Use #ifdef instead.

 gsk/resources/vulkan/clip.frag.glsl |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/gsk/resources/vulkan/clip.frag.glsl b/gsk/resources/vulkan/clip.frag.glsl
index 472dc6f..1717e99 100644
--- a/gsk/resources/vulkan/clip.frag.glsl
+++ b/gsk/resources/vulkan/clip.frag.glsl
@@ -11,13 +11,17 @@ vec4 clip(vec2 pos, vec4 color)
 
   return color * rounded_rect_coverage (r, pos);
 }
-#elif defined(CLIP_RECT)
+#else
+#ifdef CLIP_RECT
+//#elif defined(CLIP_RECT)
 vec4 clip(vec2 pos, vec4 color)
 {
   /* clipped in vertex shader already */
   return color;
 }
-#elif defined(CLIP_NONE)
+#else
+#ifdef CLIP_NONE
+//#elif defined(CLIP_NONE)
 vec4 clip(vec2 pos, vec4 color)
 {
   return color;
@@ -25,5 +29,7 @@ vec4 clip(vec2 pos, vec4 color)
 #else
 #error "No clipping define given. Need CLIP_NONE, CLIP_RECT or CLIP_ROUNDED_RECT"
 #endif
+#endif
+#endif
 
 #endif


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]