summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2013-10-10 11:09:22 +0100
committerRobin Watts <robin.watts@artifex.com>2013-10-10 11:17:00 +0100
commit8e1874aa72be41117f96880be07cde360a31b405 (patch)
tree141090a5676fc6e6d9bce5d7f41637341f4446cc
parent535bd30810ba46cc781178584f43b9cfe60f86f7 (diff)
downloadmupdf-8e1874aa72be41117f96880be07cde360a31b405.tar.xz
Rename the draw devices 'stack_max' member to be 'stack_cap'
For consistency with the rest of the code.
-rw-r--r--source/fitz/draw-device.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/fitz/draw-device.c b/source/fitz/draw-device.c
index 66c670ba..dc00561b 100644
--- a/source/fitz/draw-device.c
+++ b/source/fitz/draw-device.c
@@ -41,7 +41,7 @@ struct fz_draw_device_s
fz_scale_cache *cache_x;
fz_scale_cache *cache_y;
fz_draw_state *stack;
- int stack_max;
+ int stack_cap;
fz_draw_state init_stack[STACK_SIZE];
};
@@ -75,20 +75,20 @@ static void dump_spaces(int x, const char *s)
static void fz_grow_stack(fz_draw_device *dev)
{
- int max = dev->stack_max * 2;
+ int max = dev->stack_cap * 2;
fz_draw_state *stack;
if (dev->stack == &dev->init_stack[0])
{
stack = fz_malloc(dev->ctx, sizeof(*stack) * max);
- memcpy(stack, dev->stack, sizeof(*stack) * dev->stack_max);
+ memcpy(stack, dev->stack, sizeof(*stack) * dev->stack_cap);
}
else
{
stack = fz_resize_array(dev->ctx, dev->stack, max, sizeof(*stack));
}
dev->stack = stack;
- dev->stack_max = max;
+ dev->stack_cap = max;
}
/* 'Push' the stack. Returns a pointer to the current state, with state[1]
@@ -99,7 +99,7 @@ push_stack(fz_draw_device *dev)
{
fz_draw_state *state;
- if (dev->top == dev->stack_max-1)
+ if (dev->top == dev->stack_cap-1)
fz_grow_stack(dev);
state = &dev->stack[dev->top];
dev->top++;
@@ -2000,7 +2000,7 @@ fz_new_draw_device(fz_context *ctx, fz_pixmap *dest)
ddev->cache_x = fz_new_scale_cache(ctx);
ddev->cache_y = fz_new_scale_cache(ctx);
ddev->stack = &ddev->init_stack[0];
- ddev->stack_max = STACK_SIZE;
+ ddev->stack_cap = STACK_SIZE;
ddev->stack[0].dest = dest;
ddev->stack[0].shape = NULL;
ddev->stack[0].mask = NULL;