summaryrefslogtreecommitdiff
path: root/src/lib/evas/include/evas_filter.h
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-03-11 18:21:46 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2014-03-12 14:08:02 +0900
commit2a1ba1b9086bdf9d3d474ec7f8a5cfe37fcdd61a (patch)
tree7e3c291caaf08febeb23efde7e67dfab0806c0d7 /src/lib/evas/include/evas_filter.h
parent4e249143a52c370abfb2bf304d7d8dbacb930aeb (diff)
Evas filters: Use box blur by default
BOX blur is a lot faster (and easier to optimize, too) than GAUSSIAN blur. Repeating 2x or 3x BOX blur will also give similar results to GAUSSIAN blur (very smooth), but in much less time. Add a count parameter to the BOX blur instruction.
Diffstat (limited to '')
-rw-r--r--src/lib/evas/include/evas_filter.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/evas/include/evas_filter.h b/src/lib/evas/include/evas_filter.h
index 5445058545..052617e48f 100644
--- a/src/lib/evas/include/evas_filter.h
+++ b/src/lib/evas/include/evas_filter.h
@@ -42,10 +42,10 @@ enum _Evas_Filter_Mode
42 42
43enum _Evas_Filter_Blur_Type 43enum _Evas_Filter_Blur_Type
44{ 44{
45 EVAS_FILTER_BLUR_GAUSSIAN = 0x0, // Gaussian or sine curve. O(nm) 45 EVAS_FILTER_BLUR_DEFAULT = 0x0, // Default blur (GAUSSIAN or series of BOX)
46 EVAS_FILTER_BLUR_BOX = 0x1, // Optimizable on CPU. But, UGLY. O(n) 46 EVAS_FILTER_BLUR_BOX = 0x1, // Optimizable on CPU. But, UGLY. O(n)
47 EVAS_FILTER_BLUR_GAUSSIAN = 0x2, // Gaussian blur (using sine curve)
47 EVAS_FILTER_BLUR_LAST, 48 EVAS_FILTER_BLUR_LAST,
48 EVAS_FILTER_BLUR_DEFAULT = EVAS_FILTER_BLUR_GAUSSIAN
49}; 49};
50 50
51enum _Evas_Filter_Channel 51enum _Evas_Filter_Channel
@@ -141,9 +141,10 @@ int evas_filter_command_blend_add(Evas_Filter_Context *ctx,
141 * @param dy Y radius of blur. Can be negative ONLY for MOTION blur 141 * @param dy Y radius of blur. Can be negative ONLY for MOTION blur
142 * @param ox X offset in the destination buffer 142 * @param ox X offset in the destination buffer
143 * @param oy Y offset in the destination buffer 143 * @param oy Y offset in the destination buffer
144 * @param count Number of times to repeat the operation (used for smooth fast blurs with box blur)
144 * @return Filter command ID or -1 in case of error 145 * @return Filter command ID or -1 in case of error
145 */ 146 */
146int evas_filter_command_blur_add(Evas_Filter_Context *ctx, void *draw_context, int inbuf, int outbuf, Evas_Filter_Blur_Type type, int dx, int dy, int ox, int oy); 147int evas_filter_command_blur_add(Evas_Filter_Context *ctx, void *draw_context, int inbuf, int outbuf, Evas_Filter_Blur_Type type, int dx, int dy, int ox, int oy, int count);
147 148
148/** 149/**
149 * @brief Fill a buffer with the current color 150 * @brief Fill a buffer with the current color