[Bf-blender-cvs] [7af548f] master: Tracking: Cleanup, reduce scope of some variables
Sergey Sharybin
noreply at git.blender.org
Fri Jan 8 12:27:20 CET 2016
Commit: 7af548f87e410212eee266b03ca97c9bce7faf88
Author: Sergey Sharybin
Date: Fri Jan 8 16:25:19 2016 +0500
Branches: master
https://developer.blender.org/rB7af548f87e410212eee266b03ca97c9bce7faf88
Tracking: Cleanup, reduce scope of some variables
===================================================================
M source/blender/blenkernel/intern/tracking.c
===================================================================
diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c
index 4409833..094db3c 100644
--- a/source/blender/blenkernel/intern/tracking.c
+++ b/source/blender/blenkernel/intern/tracking.c
@@ -837,29 +837,22 @@ static void track_mask_gpencil_layer_rasterize(int frame_width, int frame_height
while (stroke) {
bGPDspoint *stroke_points = stroke->points;
- int *mask_points, *point;
- int i;
-
if (stroke->flag & GP_STROKE_2DSPACE) {
+ int *mask_points, *point;
point = mask_points = MEM_callocN(2 * stroke->totpoints * sizeof(int),
"track mask rasterization points");
-
- for (i = 0; i < stroke->totpoints; i++, point += 2) {
+ for (int i = 0; i < stroke->totpoints; i++, point += 2) {
point[0] = (stroke_points[i].x - marker->search_min[0]) * frame_width;
point[1] = (stroke_points[i].y - marker->search_min[1]) * frame_height;
}
-
/* TODO: add an option to control whether AA is enabled or not */
fill_poly_v2i_n(0, 0, mask_width, mask_height,
(const int (*)[2])mask_points, stroke->totpoints,
track_mask_set_pixel_cb, &data);
-
MEM_freeN(mask_points);
}
-
stroke = stroke->next;
}
-
frame = frame->next;
}
}
More information about the Bf-blender-cvs
mailing list