[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [48242] trunk/blender/intern/raskter/ raskter.c: Mark some utility functions as static to avoid namespace conflicts

Sergey Sharybin sergey.vfx at gmail.com
Sun Jun 24 17:54:41 CEST 2012


Revision: 48242
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48242
Author:   nazgul
Date:     2012-06-24 15:54:36 +0000 (Sun, 24 Jun 2012)
Log Message:
-----------
Mark some utility functions as static to avoid namespace conflicts
and make export symbol table smaller.

Modified Paths:
--------------
    trunk/blender/intern/raskter/raskter.c

Modified: trunk/blender/intern/raskter/raskter.c
===================================================================
--- trunk/blender/intern/raskter/raskter.c	2012-06-24 15:31:40 UTC (rev 48241)
+++ trunk/blender/intern/raskter/raskter.c	2012-06-24 15:54:36 UTC (rev 48242)
@@ -31,6 +31,8 @@
 #include <stdlib.h>
 #include "raskter.h"
 
+#define __PLX__FAKE_AA__
+
 /* from BLI_utildefines.h */
 #define MIN2(x, y)               ( (x) < (y) ? (x) : (y) )
 #define MAX2(x, y)               ( (x) > (y) ? (x) : (y) )
@@ -759,12 +761,14 @@
 	return i;                                   /* Return the value returned by the rasterizer. */
 }
 
-int get_range_expanded_pixel_coord(float normalized_value, int max_value)
+#ifndef __PLX__FAKE_AA__
+
+static int get_range_expanded_pixel_coord(float normalized_value, int max_value)
 {
 	return (int)((normalized_value * (float)(max_value)) + 0.5f);
 }
 
-float get_pixel_intensity(float *buf, int buf_x, int buf_y, int pos_x, int pos_y)
+static float get_pixel_intensity(float *buf, int buf_x, int buf_y, int pos_x, int pos_y)
 {
 	if(pos_x < 0 || pos_x >= buf_x || pos_y < 0 || pos_y >= buf_y) {
 		return 0.0f;
@@ -772,7 +776,7 @@
 	return buf[(pos_y * buf_y) + buf_x];
 }
 
-float get_pixel_intensity_bilinear(float *buf, int buf_x, int buf_y, float u, float v)
+static float get_pixel_intensity_bilinear(float *buf, int buf_x, int buf_y, float u, float v)
 {
 	int a;
 	int b;
@@ -799,14 +803,15 @@
 
 }
 
-void set_pixel_intensity(float *buf, int buf_x, int buf_y, int pos_x, int pos_y, float intensity)
+static void set_pixel_intensity(float *buf, int buf_x, int buf_y, int pos_x, int pos_y, float intensity)
 {
 	if(pos_x < 0 || pos_x >= buf_x || pos_y < 0 || pos_y >= buf_y) {
 		return;
 	}
 	buf[(pos_y * buf_y) + buf_x] = intensity;
 }
-#define __PLX__FAKE_AA__
+#endif
+
 int PLX_antialias_buffer(float *buf, int buf_x, int buf_y)
 {
 #ifdef __PLX__FAKE_AA__




More information about the Bf-blender-cvs mailing list