summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-12-11 15:44:48 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-01-05 15:43:44 +0900
commiteda13b729851605615032a4af400de9b820e2d63 (patch)
tree41ab9d9899d2e5d052c115119605c69ec9c6d2a5
parent7d636630cfc5aeed8e2e1eaeb289e30113d0d6d4 (diff)
Evas filters: Relax limitations about colorspaces
Since Ector Buffer implicitly converts colorspaces, we can allow more commands to work even if they are suboptimal. Now all filters should support any combinaison of input, map/mask and output colorspaces.
-rw-r--r--src/lib/evas/filters/evas_filter.c26
-rw-r--r--src/lib/evas/filters/evas_filter_blend.c24
-rw-r--r--src/lib/evas/filters/evas_filter_blur.c14
-rw-r--r--src/lib/evas/filters/evas_filter_bump.c27
-rw-r--r--src/lib/evas/filters/evas_filter_displace.c9
-rw-r--r--src/lib/evas/filters/evas_filter_mask.c39
-rw-r--r--src/lib/evas/filters/evas_filter_transform.c6
7 files changed, 72 insertions, 73 deletions
diff --git a/src/lib/evas/filters/evas_filter.c b/src/lib/evas/filters/evas_filter.c
index a05037440b..b3068d7466 100644
--- a/src/lib/evas/filters/evas_filter.c
+++ b/src/lib/evas/filters/evas_filter.c
@@ -649,6 +649,9 @@ evas_filter_command_blur_add(Evas_Filter_Context *ctx, void *drawctx,
649 goto fail; 649 goto fail;
650 } 650 }
651 651
652 if (!in->alpha_only && out->alpha_only)
653 DBG("Different color formats, implicit conversion may be slow");
654
652 if (in == out) out->dirty = EINA_FALSE; 655 if (in == out) out->dirty = EINA_FALSE;
653 blend = (out->dirty && !out->transient); 656 blend = (out->dirty && !out->transient);
654 657
@@ -1049,10 +1052,8 @@ evas_filter_command_curve_add(Evas_Filter_Context *ctx,
1049 } 1052 }
1050 1053
1051 if (in->alpha_only != out->alpha_only) 1054 if (in->alpha_only != out->alpha_only)
1052 { 1055 WRN("Incompatible formats for color curves, implicit conversion will be "
1053 ERR("Incompatible formats for color curves"); 1056 "slow and may not produce the desired output.");
1054 return -1;
1055 }
1056 1057
1057 copy = malloc(256 * sizeof(DATA8)); 1058 copy = malloc(256 * sizeof(DATA8));
1058 if (!copy) return -1; 1059 if (!copy) return -1;
@@ -1098,9 +1099,12 @@ evas_filter_command_displacement_map_add(Evas_Filter_Context *ctx,
1098 } 1099 }
1099 1100
1100 if (in->alpha_only != out->alpha_only) 1101 if (in->alpha_only != out->alpha_only)
1102 DBG("Different color formats, implicit conversion may be slow");
1103
1104 if (map->alpha_only)
1101 { 1105 {
1102 ERR("Incompatible formats for displacement map"); 1106 WRN("Displacement map is not an RGBA buffer, X and Y axes will be "
1103 return -1; 1107 "displaced together.");
1104 } 1108 }
1105 1109
1106 if (in == out) 1110 if (in == out)
@@ -1205,6 +1209,13 @@ evas_filter_command_bump_map_add(Evas_Filter_Context *ctx,
1205 return -1; 1209 return -1;
1206 } 1210 }
1207 1211
1212 if (!bumpmap->alpha_only)
1213 DBG("Bump map is not an Alpha buffer, implicit conversion may be slow");
1214
1215 // FIXME: Boo!
1216 if (!in->alpha_only)
1217 WRN("RGBA bump map support is not implemented! This will trigger conversion.");
1218
1208 // FIXME: Must ensure in != out 1219 // FIXME: Must ensure in != out
1209 if (in == out) CRI("Not acceptable"); 1220 if (in == out) CRI("Not acceptable");
1210 if (bumpmap == out) CRI("Not acceptable"); 1221 if (bumpmap == out) CRI("Not acceptable");
@@ -1251,6 +1262,9 @@ evas_filter_command_transform_add(Evas_Filter_Context *ctx,
1251 return -1; 1262 return -1;
1252 } 1263 }
1253 1264
1265 if (in->alpha_only != out->alpha_only)
1266 DBG("Incompatible buffer formats, will trigger implicit conversion.");
1267
1254 cmd = _command_new(ctx, EVAS_FILTER_MODE_TRANSFORM, in, NULL, out); 1268 cmd = _command_new(ctx, EVAS_FILTER_MODE_TRANSFORM, in, NULL, out);
1255 if (!cmd) return -1; 1269 if (!cmd) return -1;
1256 1270
diff --git a/src/lib/evas/filters/evas_filter_blend.c b/src/lib/evas/filters/evas_filter_blend.c
index 153e568a96..344a7c0bdd 100644
--- a/src/lib/evas/filters/evas_filter_blend.c
+++ b/src/lib/evas/filters/evas_filter_blend.c
@@ -21,7 +21,7 @@ struct Filter_Blend_Draw_Context
21#define LINELEN(stride, ptr) (stride / (sizeof(*ptr))) 21#define LINELEN(stride, ptr) (stride / (sizeof(*ptr)))
22 22
23static Eina_Bool 23static Eina_Bool
24_image_draw_cpu_alpha2alpha(void *data EINA_UNUSED, void *context, 24_image_draw_cpu_alpha_alpha(void *data EINA_UNUSED, void *context,
25 const void *src_map, unsigned int src_stride, 25 const void *src_map, unsigned int src_stride,
26 void *dst_map, unsigned int dst_stride, 26 void *dst_map, unsigned int dst_stride,
27 int src_x, int src_y, int src_w, int src_h, 27 int src_x, int src_y, int src_w, int src_h,
@@ -56,7 +56,7 @@ _image_draw_cpu_alpha2alpha(void *data EINA_UNUSED, void *context,
56} 56}
57 57
58static Eina_Bool 58static Eina_Bool
59_image_draw_cpu_alpha2rgba(void *data EINA_UNUSED, void *context, 59_image_draw_cpu_alpha_rgba(void *data EINA_UNUSED, void *context,
60 const void *src_map, unsigned int src_stride, 60 const void *src_map, unsigned int src_stride,
61 void *dst_map, unsigned int dst_stride, 61 void *dst_map, unsigned int dst_stride,
62 int src_x, int src_y, int src_w, int src_h, 62 int src_x, int src_y, int src_w, int src_h,
@@ -91,7 +91,7 @@ _image_draw_cpu_alpha2rgba(void *data EINA_UNUSED, void *context,
91} 91}
92 92
93static Eina_Bool 93static Eina_Bool
94_image_draw_cpu_rgba2rgba(void *data EINA_UNUSED, void *context, 94_image_draw_cpu_rgba_rgba(void *data EINA_UNUSED, void *context,
95 const void *src_map, unsigned int src_stride, 95 const void *src_map, unsigned int src_stride,
96 void *dst_map, unsigned int dst_stride, 96 void *dst_map, unsigned int dst_stride,
97 int src_x, int src_y, int src_w, int src_h, 97 int src_x, int src_y, int src_w, int src_h,
@@ -131,7 +131,7 @@ _image_draw_cpu_rgba2rgba(void *data EINA_UNUSED, void *context,
131} 131}
132 132
133static Eina_Bool 133static Eina_Bool
134_image_draw_cpu_rgba2alpha(void *data EINA_UNUSED, void *context EINA_UNUSED, 134_image_draw_cpu_rgba_alpha(void *data EINA_UNUSED, void *context EINA_UNUSED,
135 const void *src_map, unsigned int src_stride, 135 const void *src_map, unsigned int src_stride,
136 void *dst_map, unsigned int dst_stride, 136 void *dst_map, unsigned int dst_stride,
137 int src_x, int src_y, int src_w, int src_h, 137 int src_x, int src_y, int src_w, int src_h,
@@ -236,25 +236,25 @@ end:
236static Eina_Bool 236static Eina_Bool
237_filter_blend_cpu_alpha(Evas_Filter_Command *cmd) 237_filter_blend_cpu_alpha(Evas_Filter_Command *cmd)
238{ 238{
239 return _filter_blend_cpu_generic_do(cmd, _image_draw_cpu_alpha2alpha); 239 return _filter_blend_cpu_generic_do(cmd, _image_draw_cpu_alpha_alpha);
240} 240}
241 241
242static Eina_Bool 242static Eina_Bool
243_filter_blend_cpu_alpha2rgba(Evas_Filter_Command *cmd) 243_filter_blend_cpu_alpha_rgba(Evas_Filter_Command *cmd)
244{ 244{
245 return _filter_blend_cpu_generic_do(cmd, _image_draw_cpu_alpha2rgba); 245 return _filter_blend_cpu_generic_do(cmd, _image_draw_cpu_alpha_rgba);
246} 246}
247 247
248static Eina_Bool 248static Eina_Bool
249_filter_blend_cpu_rgba2alpha(Evas_Filter_Command *cmd) 249_filter_blend_cpu_rgba_alpha(Evas_Filter_Command *cmd)
250{ 250{
251 return _filter_blend_cpu_generic_do(cmd, _image_draw_cpu_rgba2alpha); 251 return _filter_blend_cpu_generic_do(cmd, _image_draw_cpu_rgba_alpha);
252} 252}
253 253
254static Eina_Bool 254static Eina_Bool
255_filter_blend_cpu_rgba(Evas_Filter_Command *cmd) 255_filter_blend_cpu_rgba(Evas_Filter_Command *cmd)
256{ 256{
257 return _filter_blend_cpu_generic_do(cmd, _image_draw_cpu_rgba2rgba); 257 return _filter_blend_cpu_generic_do(cmd, _image_draw_cpu_rgba_rgba);
258} 258}
259 259
260static Eina_Bool 260static Eina_Bool
@@ -447,12 +447,12 @@ evas_filter_blend_cpu_func_get(Evas_Filter_Command *cmd)
447 if (cmd->output->alpha_only) 447 if (cmd->output->alpha_only)
448 return _filter_blend_cpu_alpha; 448 return _filter_blend_cpu_alpha;
449 else 449 else
450 return _filter_blend_cpu_alpha2rgba; 450 return _filter_blend_cpu_alpha_rgba;
451 } 451 }
452 else 452 else
453 { 453 {
454 if (cmd->output->alpha_only) 454 if (cmd->output->alpha_only)
455 return _filter_blend_cpu_rgba2alpha; 455 return _filter_blend_cpu_rgba_alpha;
456 else 456 else
457 return _filter_blend_cpu_rgba; 457 return _filter_blend_cpu_rgba;
458 } 458 }
diff --git a/src/lib/evas/filters/evas_filter_blur.c b/src/lib/evas/filters/evas_filter_blur.c
index 9cf851faec..3eb59d4f0b 100644
--- a/src/lib/evas/filters/evas_filter_blur.c
+++ b/src/lib/evas/filters/evas_filter_blur.c
@@ -390,39 +390,37 @@ evas_filter_blur_cpu_func_get(Evas_Filter_Command *cmd)
390 switch (cmd->blur.type) 390 switch (cmd->blur.type)
391 { 391 {
392 case EVAS_FILTER_BLUR_BOX: 392 case EVAS_FILTER_BLUR_BOX:
393 if (!cmd->input->alpha_only && !cmd->output->alpha_only) 393 if (!cmd->output->alpha_only)
394 { 394 {
395 if (cmd->blur.dx) 395 if (cmd->blur.dx)
396 return _box_blur_horiz_apply_rgba; 396 return _box_blur_horiz_apply_rgba;
397 else if (cmd->blur.dy) 397 else if (cmd->blur.dy)
398 return _box_blur_vert_apply_rgba; 398 return _box_blur_vert_apply_rgba;
399 } 399 }
400 else if (cmd->input->alpha_only && cmd->output->alpha_only) 400 else
401 { 401 {
402 if (cmd->blur.dx) 402 if (cmd->blur.dx)
403 return _box_blur_horiz_apply_alpha; 403 return _box_blur_horiz_apply_alpha;
404 else if (cmd->blur.dy) 404 else if (cmd->blur.dy)
405 return _box_blur_vert_apply_alpha; 405 return _box_blur_vert_apply_alpha;
406 } 406 }
407 CRI("Unsupported operation: mixing RGBA and Alpha surfaces."); 407
408 return NULL;
409 case EVAS_FILTER_BLUR_GAUSSIAN: 408 case EVAS_FILTER_BLUR_GAUSSIAN:
410 if (!cmd->input->alpha_only && !cmd->output->alpha_only) 409 if (!cmd->output->alpha_only)
411 { 410 {
412 if (cmd->blur.dx) 411 if (cmd->blur.dx)
413 return _gaussian_blur_horiz_apply_rgba; 412 return _gaussian_blur_horiz_apply_rgba;
414 else if (cmd->blur.dy) 413 else if (cmd->blur.dy)
415 return _gaussian_blur_vert_apply_rgba; 414 return _gaussian_blur_vert_apply_rgba;
416 } 415 }
417 else if (cmd->input->alpha_only && cmd->output->alpha_only) 416 else
418 { 417 {
419 if (cmd->blur.dx) 418 if (cmd->blur.dx)
420 return _gaussian_blur_horiz_apply_alpha; 419 return _gaussian_blur_horiz_apply_alpha;
421 else if (cmd->blur.dy) 420 else if (cmd->blur.dy)
422 return _gaussian_blur_vert_apply_alpha; 421 return _gaussian_blur_vert_apply_alpha;
423 } 422 }
424 CRI("Unsupported operation: mixing RGBA and Alpha surfaces."); 423
425 return NULL;
426 default: 424 default:
427 CRI("Unsupported blur type %d", cmd->blur.type); 425 CRI("Unsupported blur type %d", cmd->blur.type);
428 return NULL; 426 return NULL;
diff --git a/src/lib/evas/filters/evas_filter_bump.c b/src/lib/evas/filters/evas_filter_bump.c
index e93f1adda6..f89ec3c2ad 100644
--- a/src/lib/evas/filters/evas_filter_bump.c
+++ b/src/lib/evas/filters/evas_filter_bump.c
@@ -14,7 +14,6 @@
14 14
15static Eina_Bool _bump_map_cpu_alpha_alpha(Evas_Filter_Command *cmd); 15static Eina_Bool _bump_map_cpu_alpha_alpha(Evas_Filter_Command *cmd);
16static Eina_Bool _bump_map_cpu_alpha_rgba(Evas_Filter_Command *cmd); 16static Eina_Bool _bump_map_cpu_alpha_rgba(Evas_Filter_Command *cmd);
17static Eina_Bool _bump_map_cpu_rgba_rgba(Evas_Filter_Command *cmd);
18 17
19Evas_Filter_Apply_Func 18Evas_Filter_Apply_Func
20evas_filter_bump_map_cpu_func_get(Evas_Filter_Command *cmd) 19evas_filter_bump_map_cpu_func_get(Evas_Filter_Command *cmd)
@@ -25,11 +24,7 @@ evas_filter_bump_map_cpu_func_get(Evas_Filter_Command *cmd)
25 EINA_SAFETY_ON_NULL_RETURN_VAL(cmd->input, NULL); 24 EINA_SAFETY_ON_NULL_RETURN_VAL(cmd->input, NULL);
26 EINA_SAFETY_ON_NULL_RETURN_VAL(cmd->mask, NULL); 25 EINA_SAFETY_ON_NULL_RETURN_VAL(cmd->mask, NULL);
27 EINA_SAFETY_ON_NULL_RETURN_VAL(cmd->output, NULL); 26 EINA_SAFETY_ON_NULL_RETURN_VAL(cmd->output, NULL);
28
29 EINA_SAFETY_ON_FALSE_RETURN_VAL(cmd->input != cmd->output, NULL); 27 EINA_SAFETY_ON_FALSE_RETURN_VAL(cmd->input != cmd->output, NULL);
30 EINA_SAFETY_ON_FALSE_RETURN_VAL(cmd->mask->alpha_only, NULL);
31 EINA_SAFETY_ON_FALSE_RETURN_VAL((!cmd->output->alpha_only)
32 || cmd->input->alpha_only, NULL);
33 28
34 w = cmd->input->w; 29 w = cmd->input->w;
35 h = cmd->input->h; 30 h = cmd->input->h;
@@ -38,15 +33,12 @@ evas_filter_bump_map_cpu_func_get(Evas_Filter_Command *cmd)
38 EINA_SAFETY_ON_FALSE_RETURN_VAL(cmd->mask->w == w, NULL); 33 EINA_SAFETY_ON_FALSE_RETURN_VAL(cmd->mask->w == w, NULL);
39 EINA_SAFETY_ON_FALSE_RETURN_VAL(cmd->mask->h == h, NULL); 34 EINA_SAFETY_ON_FALSE_RETURN_VAL(cmd->mask->h == h, NULL);
40 35
41 if (cmd->input->alpha_only) 36 // FIXME: Bump map support is not implemented for RGBA input!
42 { 37
43 if (cmd->output->alpha_only) 38 if (cmd->output->alpha_only)
44 return _bump_map_cpu_alpha_alpha; 39 return _bump_map_cpu_alpha_alpha;
45 else
46 return _bump_map_cpu_alpha_rgba;
47 }
48 else 40 else
49 return _bump_map_cpu_rgba_rgba; 41 return _bump_map_cpu_alpha_rgba;
50} 42}
51 43
52static void 44static void
@@ -417,12 +409,3 @@ end:
417 eo_do(cmd->output->buffer, ector_buffer_unmap(dst_map, dlen)); 409 eo_do(cmd->output->buffer, ector_buffer_unmap(dst_map, dlen));
418 return ret; 410 return ret;
419} 411}
420
421static Eina_Bool
422_bump_map_cpu_rgba_rgba(Evas_Filter_Command *cmd)
423{
424 (void) cmd;
425
426 CRI("Not implemented yet.");
427 return EINA_FALSE;
428}
diff --git a/src/lib/evas/filters/evas_filter_displace.c b/src/lib/evas/filters/evas_filter_displace.c
index 1513a919da..5722c7b51b 100644
--- a/src/lib/evas/filters/evas_filter_displace.c
+++ b/src/lib/evas/filters/evas_filter_displace.c
@@ -316,15 +316,8 @@ evas_filter_displace_cpu_func_get(Evas_Filter_Command *cmd)
316 EINA_SAFETY_ON_NULL_RETURN_VAL(cmd->input, NULL); 316 EINA_SAFETY_ON_NULL_RETURN_VAL(cmd->input, NULL);
317 EINA_SAFETY_ON_NULL_RETURN_VAL(cmd->output, NULL); 317 EINA_SAFETY_ON_NULL_RETURN_VAL(cmd->output, NULL);
318 EINA_SAFETY_ON_NULL_RETURN_VAL(cmd->mask, NULL); 318 EINA_SAFETY_ON_NULL_RETURN_VAL(cmd->mask, NULL);
319 EINA_SAFETY_ON_FALSE_RETURN_VAL(!cmd->mask->alpha_only, NULL);
320 319
321 if (cmd->input->alpha_only != cmd->output->alpha_only) 320 if (cmd->output->alpha_only)
322 {
323 CRI("Invalid color formats");
324 return NULL;
325 }
326
327 if (cmd->input->alpha_only)
328 return _filter_displace_cpu_alpha; 321 return _filter_displace_cpu_alpha;
329 else 322 else
330 return _filter_displace_cpu_rgba; 323 return _filter_displace_cpu_rgba;
diff --git a/src/lib/evas/filters/evas_filter_mask.c b/src/lib/evas/filters/evas_filter_mask.c
index d8d6ddabe7..949caa96f6 100644
--- a/src/lib/evas/filters/evas_filter_mask.c
+++ b/src/lib/evas/filters/evas_filter_mask.c
@@ -28,26 +28,37 @@ evas_filter_mask_cpu_func_get(Evas_Filter_Command *cmd)
28 28
29 if (cmd->input->alpha_only) 29 if (cmd->input->alpha_only)
30 { 30 {
31 if (cmd->mask->alpha_only && cmd->output->alpha_only) 31 if (cmd->output->alpha_only)
32 return _mask_cpu_alpha_alpha_alpha; 32 {
33 else if (!cmd->mask->alpha_only && !cmd->output->alpha_only) 33 if (cmd->mask->alpha_only)
34 {
35 DBG("Input and output are Alpha but mask is RGBA. This is not "
36 "optimal (implicit conversion and loss of color).");
37 }
38 return _mask_cpu_alpha_alpha_alpha;
39 }
40 else if (!cmd->mask->alpha_only)
34 return _mask_cpu_alpha_rgba_rgba; 41 return _mask_cpu_alpha_rgba_rgba;
35 else if (cmd->mask->alpha_only && !cmd->output->alpha_only) 42 else
36 return _mask_cpu_alpha_alpha_rgba; 43 return _mask_cpu_alpha_alpha_rgba;
37 } 44 }
38 else 45 else
39 { 46 {
40 if (cmd->mask->alpha_only && !cmd->output->alpha_only) 47 if (!cmd->output->alpha_only)
41 return _mask_cpu_rgba_alpha_rgba; 48 {
42 else if (!cmd->mask->alpha_only && !cmd->output->alpha_only) 49 // rgba -> rgba
43 return _mask_cpu_rgba_rgba_rgba; 50 if (cmd->mask->alpha_only)
51 return _mask_cpu_rgba_alpha_rgba;
52 else
53 return _mask_cpu_rgba_rgba_rgba;
54 }
55 else
56 {
57 // rgba -> alpha
58 DBG("Input is RGBA but output is Alpha, losing colors.");
59 return _mask_cpu_alpha_alpha_alpha;
60 }
44 } 61 }
45
46 CRI("If input or mask is RGBA, then output must also be RGBA: %s [%s] %s",
47 cmd->input->alpha_only ? "alpha" : "rgba",
48 cmd->mask->alpha_only ? "alpha" : "rgba",
49 cmd->output->alpha_only ? "alpha" : "rgba");
50 return NULL;
51} 62}
52 63
53static Eina_Bool 64static Eina_Bool
diff --git a/src/lib/evas/filters/evas_filter_transform.c b/src/lib/evas/filters/evas_filter_transform.c
index fd05d5c7fa..5f262ee604 100644
--- a/src/lib/evas/filters/evas_filter_transform.c
+++ b/src/lib/evas/filters/evas_filter_transform.c
@@ -13,19 +13,19 @@ _vflip_cpu(Evas_Filter_Command *cmd)
13 unsigned int src_len, src_stride, dst_len, dst_stride; 13 unsigned int src_len, src_stride, dst_len, dst_stride;
14 uint8_t *in, *out = NULL, *span = NULL; 14 uint8_t *in, *out = NULL, *span = NULL;
15 int w, h, sy, dy, oy, center, t, b, objh; 15 int w, h, sy, dy, oy, center, t, b, objh;
16 Efl_Gfx_Colorspace cspace = cmd->output->alpha_only ? E_ALPHA : E_ARGB;
16 int s0, s1, d0, d1; 17 int s0, s1, d0, d1;
17 Eina_Bool ret = 0; 18 Eina_Bool ret = 0;
18 19
19 w = cmd->input->w; 20 w = cmd->input->w;
20 h = cmd->input->h; 21 h = cmd->input->h;
21 in = _buffer_map_all(cmd->input->buffer, &src_len, E_READ, cmd->output->alpha_only ? E_ALPHA : E_ARGB, &src_stride); 22 in = _buffer_map_all(cmd->input->buffer, &src_len, E_READ, cspace, &src_stride);
22 if (cmd->input->buffer != cmd->output->buffer) 23 if (cmd->input->buffer != cmd->output->buffer)
23 out = _buffer_map_all(cmd->output->buffer, &dst_len, E_WRITE, cmd->output->alpha_only ? E_ALPHA : E_ARGB, &dst_stride); 24 out = _buffer_map_all(cmd->output->buffer, &dst_len, E_WRITE, cspace, &dst_stride);
24 25
25 EINA_SAFETY_ON_FALSE_GOTO(cmd->output->w == w, end); 26 EINA_SAFETY_ON_FALSE_GOTO(cmd->output->w == w, end);
26 EINA_SAFETY_ON_FALSE_GOTO(cmd->output->h == h, end); 27 EINA_SAFETY_ON_FALSE_GOTO(cmd->output->h == h, end);
27 EINA_SAFETY_ON_FALSE_GOTO(src_stride <= dst_stride, end); 28 EINA_SAFETY_ON_FALSE_GOTO(src_stride <= dst_stride, end);
28 EINA_SAFETY_ON_FALSE_GOTO(cmd->output->alpha_only == cmd->input->alpha_only, end);
29 29
30 oy = cmd->draw.oy; 30 oy = cmd->draw.oy;
31 t = cmd->ctx->padt; 31 t = cmd->ctx->padt;