summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2018-08-30 13:41:53 +0900
committerHermet Park <hermetpark@gmail.com>2018-08-30 13:42:55 +0900
commit38ee4167bc461fd34a64047f5493abd5783faed5 (patch)
treeb286fe5f5dc2aa2de65a31832bc5c7740d9bf1d5 /src/modules/evas/engines
parent4e2287ecaf3230c21a114bf68b1b673ed3712dc1 (diff)
evas-software-genereric: Remove cserve2 support
ref T7226 Depends on D6929
Diffstat (limited to 'src/modules/evas/engines')
-rw-r--r--src/modules/evas/engines/software_generic/evas_engine.c188
1 files changed, 9 insertions, 179 deletions
diff --git a/src/modules/evas/engines/software_generic/evas_engine.c b/src/modules/evas/engines/software_generic/evas_engine.c
index 7276e64d60..9c936944e2 100644
--- a/src/modules/evas/engines/software_generic/evas_engine.c
+++ b/src/modules/evas/engines/software_generic/evas_engine.c
@@ -1,9 +1,6 @@
1#include "evas_common_private.h" /* Also includes international specific stuff */ 1#include "evas_common_private.h" /* Also includes international specific stuff */
2#include "evas_private.h" 2#include "evas_private.h"
3#include "evas_blend_private.h" 3#include "evas_blend_private.h"
4#ifdef EVAS_CSERVE2
5#include "evas_cs2_private.h"
6#endif
7 4
8#include "region.h" 5#include "region.h"
9 6
@@ -463,12 +460,7 @@ eng_context_dup(void *data EINA_UNUSED, void *context)
463 if (ctx->clip.mask) 460 if (ctx->clip.mask)
464 { 461 {
465 Image_Entry *im = ctx->clip.mask; 462 Image_Entry *im = ctx->clip.mask;
466#ifdef EVAS_CSERVE2 463 evas_cache_image_ref(im);
467 if (evas_cserve2_use_get())
468 evas_cache2_image_ref(im);
469 else
470#endif
471 evas_cache_image_ref(im);
472 } 464 }
473 465
474 return ctx; 466 return ctx;
@@ -492,14 +484,7 @@ eng_context_clip_image_unset(void *data EINA_UNUSED, void *context)
492 if (ctx->clip.async) 484 if (ctx->clip.async)
493 evas_unref_queue_image_put(ctx->clip.evas, ie); 485 evas_unref_queue_image_put(ctx->clip.evas, ie);
494 else 486 else
495 { 487 evas_cache_image_drop(ie);
496#ifdef EVAS_CSERVE2
497 if (evas_cserve2_use_get())
498 evas_cache2_image_close(ie);
499 else
500#endif
501 evas_cache_image_drop(ie);
502 }
503 ctx->clip.mask = NULL; 488 ctx->clip.mask = NULL;
504 } 489 }
505} 490}
@@ -529,14 +514,7 @@ eng_context_clip_image_set(void *data EINA_UNUSED, void *context, void *surface,
529 { 514 {
530 Image_Entry *ie = surface; 515 Image_Entry *ie = surface;
531 if (!noinc) 516 if (!noinc)
532 { 517 evas_cache_image_ref(ie);
533#ifdef EVAS_CSERVE2
534 if (evas_cserve2_use_get())
535 evas_cache2_image_ref(ie);
536 else
537#endif
538 evas_cache_image_ref(ie);
539 }
540 RECTS_CLIP_TO_RECT(ctx->clip.x, ctx->clip.y, ctx->clip.w, ctx->clip.h, 518 RECTS_CLIP_TO_RECT(ctx->clip.x, ctx->clip.y, ctx->clip.w, ctx->clip.h,
541 x, y, ie->w, ie->h); 519 x, y, ie->w, ie->h);
542 } 520 }
@@ -553,14 +531,7 @@ eng_context_clip_image_get(void *data EINA_UNUSED, void *context, void **ie, int
553 531
554 *ie = im; 532 *ie = im;
555 if (im) 533 if (im)
556 { 534 evas_cache_image_ref(im);
557#ifdef EVAS_CSERVE2
558 if (evas_cserve2_use_get())
559 evas_cache2_image_ref(im);
560 else
561#endif
562 evas_cache_image_ref(im);
563 }
564 } 535 }
565 if (x) *x = ctx->clip.mask_x; 536 if (x) *x = ctx->clip.mask_x;
566 if (y) *y = ctx->clip.mask_y; 537 if (y) *y = ctx->clip.mask_y;
@@ -1040,10 +1011,6 @@ eng_image_can_region_get(void *data EINA_UNUSED, void *image)
1040{ 1011{
1041 Image_Entry *im; 1012 Image_Entry *im;
1042 if (!image) return EINA_FALSE; 1013 if (!image) return EINA_FALSE;
1043#ifdef EVAS_CSERVE2
1044 if (evas_cserve2_use_get())
1045 return EINA_FALSE;
1046#endif
1047 im = image; 1014 im = image;
1048 return ((Evas_Image_Load_Func*) im->info.loader)->do_region; 1015 return ((Evas_Image_Load_Func*) im->info.loader)->do_region;
1049} 1016}
@@ -1172,11 +1139,6 @@ eng_image_native_set(void *data EINA_UNUSED, void *image, void *native)
1172 im->native.func.free(im); 1139 im->native.func.free(im);
1173 } 1140 }
1174 1141
1175#ifdef EVAS_CSERVE2
1176 if (evas_cserve2_use_get() && evas_cache2_image_cached(ie))
1177 evas_cache2_image_close(ie);
1178 else
1179#endif
1180 evas_cache_image_drop(ie); 1142 evas_cache_image_drop(ie);
1181 1143
1182 if (ns->type == EVAS_NATIVE_SURFACE_WL_DMABUF) 1144 if (ns->type == EVAS_NATIVE_SURFACE_WL_DMABUF)
@@ -1200,26 +1162,6 @@ static void *
1200eng_image_mmap(void *data EINA_UNUSED, Eina_File *f, const char *key, int *error, Evas_Image_Load_Opts *lo) 1162eng_image_mmap(void *data EINA_UNUSED, Eina_File *f, const char *key, int *error, Evas_Image_Load_Opts *lo)
1201{ 1163{
1202 *error = EVAS_LOAD_ERROR_NONE; 1164 *error = EVAS_LOAD_ERROR_NONE;
1203#ifdef EVAS_CSERVE2
1204 // FIXME: Need to pass fd to make that useful, so just get the filename for now.
1205 if (evas_cserve2_use_get() && !eina_file_virtual(f))
1206 {
1207 Image_Entry *ie;
1208 ie = evas_cache2_image_open(evas_common_image_cache2_get(),
1209 eina_file_filename_get(f), key, lo, error);
1210 if (ie)
1211 {
1212 *error = evas_cache2_image_open_wait(ie);
1213 if ((*error != EVAS_LOAD_ERROR_NONE) && ie->animated.animated)
1214 {
1215 evas_cache2_image_close(ie);
1216 goto use_local_cache;
1217 }
1218 }
1219 return ie;
1220 }
1221use_local_cache:
1222#endif
1223 1165
1224 return evas_common_load_image_from_mmap(f, key, lo, error); 1166 return evas_common_load_image_from_mmap(f, key, lo, error);
1225} 1167}
@@ -1227,40 +1169,18 @@ use_local_cache:
1227static void * 1169static void *
1228eng_image_new_from_data(void *data EINA_UNUSED, int w, int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace) 1170eng_image_new_from_data(void *data EINA_UNUSED, int w, int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace)
1229{ 1171{
1230#ifdef EVAS_CSERVE2
1231 if (evas_cserve2_use_get())
1232 {
1233 Evas_Cache2 *cache = evas_common_image_cache2_get();
1234 return evas_cache2_image_data(cache, w, h, image_data, alpha, cspace);
1235 }
1236#endif
1237 return evas_cache_image_data(evas_common_image_cache_get(), w, h, image_data, alpha, cspace); 1172 return evas_cache_image_data(evas_common_image_cache_get(), w, h, image_data, alpha, cspace);
1238} 1173}
1239 1174
1240static void * 1175static void *
1241eng_image_new_from_copied_data(void *data EINA_UNUSED, int w, int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace) 1176eng_image_new_from_copied_data(void *data EINA_UNUSED, int w, int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace)
1242{ 1177{
1243#ifdef EVAS_CSERVE2
1244 if (evas_cserve2_use_get())
1245 {
1246 Evas_Cache2 *cache = evas_common_image_cache2_get();
1247 return evas_cache2_image_copied_data(cache, w, h, image_data, alpha,
1248 cspace);
1249 }
1250#endif
1251 return evas_cache_image_copied_data(evas_common_image_cache_get(), w, h, image_data, alpha, cspace); 1178 return evas_cache_image_copied_data(evas_common_image_cache_get(), w, h, image_data, alpha, cspace);
1252} 1179}
1253 1180
1254static void 1181static void
1255eng_image_free(void *data EINA_UNUSED, void *image) 1182eng_image_free(void *data EINA_UNUSED, void *image)
1256{ 1183{
1257#ifdef EVAS_CSERVE2
1258 if (evas_cserve2_use_get() && evas_cache2_image_cached(image))
1259 {
1260 evas_cache2_image_close(image);
1261 return;
1262 }
1263#endif
1264 evas_cache_image_drop(image); 1184 evas_cache_image_drop(image);
1265} 1185}
1266 1186
@@ -1268,13 +1188,6 @@ static void *
1268eng_image_ref(void *data EINA_UNUSED, void *image) 1188eng_image_ref(void *data EINA_UNUSED, void *image)
1269{ 1189{
1270 if (!image) return NULL; 1190 if (!image) return NULL;
1271#ifdef EVAS_CSERVE2
1272 if (evas_cserve2_use_get() && evas_cache2_image_cached(image))
1273 {
1274 evas_cache2_image_ref(image);
1275 return image;
1276 }
1277#endif
1278 evas_cache_image_ref(image); 1191 evas_cache_image_ref(image);
1279 return image; 1192 return image;
1280} 1193}
@@ -1294,10 +1207,6 @@ eng_image_size_set(void *data EINA_UNUSED, void *image, int w, int h)
1294{ 1207{
1295 Image_Entry *im = image; 1208 Image_Entry *im = image;
1296 if (!im) return NULL; 1209 if (!im) return NULL;
1297#ifdef EVAS_CSERVE2
1298 if (evas_cserve2_use_get() && evas_cache2_image_cached(im))
1299 return evas_cache2_image_size_set(im, w, h);
1300#endif
1301 return evas_cache_image_size_set(im, w, h); 1210 return evas_cache_image_size_set(im, w, h);
1302} 1211}
1303 1212
@@ -1306,10 +1215,6 @@ eng_image_dirty_region(void *data EINA_UNUSED, void *image, int x, int y, int w,
1306{ 1215{
1307 Image_Entry *im = image; 1216 Image_Entry *im = image;
1308 if (!im) return NULL; 1217 if (!im) return NULL;
1309#ifdef EVAS_CSERVE2
1310 if (evas_cserve2_use_get() && evas_cache2_image_cached(im))
1311 return evas_cache2_image_dirty(im, x, y, w, h);
1312#endif
1313 return evas_cache_image_dirty(im, x, y, w, h); 1218 return evas_cache_image_dirty(im, x, y, w, h);
1314} 1219}
1315 1220
@@ -1329,24 +1234,6 @@ eng_image_data_get(void *data EINA_UNUSED, void *image, int to_write, DATA32 **i
1329 return NULL; 1234 return NULL;
1330 } 1235 }
1331 1236
1332#ifdef EVAS_CSERVE2
1333 if (evas_cserve2_use_get() && evas_cache2_image_cached(&im->cache_entry))
1334 {
1335 error = evas_cache2_image_load_data(&im->cache_entry);
1336 if (err) *err = error;
1337
1338 if (to_write)
1339 {
1340 im = (RGBA_Image *)evas_cache2_image_writable(&im->cache_entry);
1341 if (!im)
1342 {
1343 if (err) *err = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
1344 return NULL;
1345 }
1346 }
1347 }
1348 else
1349#endif
1350 error = evas_cache_image_load_data(&im->cache_entry); 1237 error = evas_cache_image_load_data(&im->cache_entry);
1351 1238
1352 switch (im->cache_entry.space) 1239 switch (im->cache_entry.space)
@@ -1425,14 +1312,6 @@ eng_image_data_put(void *data, void *image, DATA32 *image_data)
1425 im2 = eng_image_new_from_data(data, w, h, image_data, 1312 im2 = eng_image_new_from_data(data, w, h, image_data,
1426 eng_image_alpha_get(data, image), 1313 eng_image_alpha_get(data, image),
1427 eng_image_colorspace_get(data, image)); 1314 eng_image_colorspace_get(data, image));
1428#ifdef EVAS_CSERVE2
1429 if (evas_cserve2_use_get())
1430 {
1431 evas_cache2_image_close(&im->cache_entry);
1432 im = im2;
1433 break;
1434 }
1435#endif
1436 evas_cache_image_drop(&im->cache_entry); 1315 evas_cache_image_drop(&im->cache_entry);
1437 im = im2; 1316 im = im2;
1438 } 1317 }
@@ -2181,12 +2060,7 @@ eng_image_orient_set(void *data EINA_UNUSED, void *image, Evas_Image_Orient orie
2181 EVAS_COLORSPACE_ARGB8888); 2060 EVAS_COLORSPACE_ARGB8888);
2182 if (!im_new) return im; 2061 if (!im_new) return im;
2183 2062
2184#if EVAS_CSERVE2 2063 evas_cache_image_load_data(im);
2185 if (evas_cserve2_use_get() && evas_cache2_image_cached(im))
2186 evas_cache2_image_load_data(im);
2187 else
2188#endif
2189 evas_cache_image_load_data(im);
2190 2064
2191 pixels_in = evas_cache_image_pixels(im); 2065 pixels_in = evas_cache_image_pixels(im);
2192 pixels_out = evas_cache_image_pixels(im_new); 2066 pixels_out = evas_cache_image_pixels(im_new);
@@ -2336,13 +2210,6 @@ eng_image_data_preload_request(void *data EINA_UNUSED, void *image, const Eo *ta
2336 RGBA_Image *im = image; 2210 RGBA_Image *im = image;
2337 if (!im) return; 2211 if (!im) return;
2338 2212
2339#ifdef EVAS_CSERVE2
2340 if (evas_cserve2_use_get() && evas_cache2_image_cached(&im->cache_entry))
2341 {
2342 evas_cache2_image_preload_data(&im->cache_entry, target, NULL, NULL);
2343 return;
2344 }
2345#endif
2346 evas_cache_image_preload_data(&im->cache_entry, target, NULL, NULL); 2213 evas_cache_image_preload_data(&im->cache_entry, target, NULL, NULL);
2347} 2214}
2348 2215
@@ -2353,14 +2220,6 @@ eng_image_data_preload_cancel(void *data EINA_UNUSED, void *image, const Eo *tar
2353 2220
2354 if (!im) return; 2221 if (!im) return;
2355 2222
2356#ifdef EVAS_CSERVE2
2357 if (evas_cserve2_use_get() && evas_cache2_image_cached(&im->cache_entry))
2358 {
2359 evas_cache2_image_preload_cancel(&im->cache_entry, target);
2360 return;
2361 }
2362#endif
2363
2364 evas_cache_image_preload_cancel(&im->cache_entry, target); 2223 evas_cache_image_preload_cancel(&im->cache_entry, target);
2365} 2224}
2366 2225
@@ -2500,12 +2359,7 @@ eng_image_draw(void *engine EINA_UNUSED, void *data EINA_UNUSED, void *context,
2500 { 2359 {
2501 if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888) 2360 if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888)
2502 { 2361 {
2503#if EVAS_CSERVE2 2362 evas_cache_image_load_data(&im->cache_entry);
2504 if (evas_cserve2_use_get() && evas_cache2_image_cached(&im->cache_entry))
2505 evas_cache2_image_load_data(&im->cache_entry);
2506 else
2507#endif
2508 evas_cache_image_load_data(&im->cache_entry);
2509 if (!im->cache_entry.flags.loaded) 2363 if (!im->cache_entry.flags.loaded)
2510 { 2364 {
2511 if (im->native.func.unbind) 2365 if (im->native.func.unbind)
@@ -2527,10 +2381,6 @@ eng_image_draw(void *engine EINA_UNUSED, void *data EINA_UNUSED, void *context,
2527#ifdef BUILD_PIPE_RENDER 2381#ifdef BUILD_PIPE_RENDER
2528 else if ((cpunum > 1)) 2382 else if ((cpunum > 1))
2529 { 2383 {
2530#ifdef EVAS_CSERVE2
2531 if (evas_cserve2_use_get())
2532 evas_cache2_image_load_data(&im->cache_entry);
2533#endif
2534 evas_common_rgba_image_scalecache_prepare((Image_Entry *)(im), 2384 evas_common_rgba_image_scalecache_prepare((Image_Entry *)(im),
2535 surface, context, smooth, 2385 surface, context, smooth,
2536 src_x, src_y, src_w, src_h, 2386 src_x, src_y, src_w, src_h,
@@ -2853,12 +2703,7 @@ eng_image_map_draw(void *engine EINA_UNUSED, void *data, void *context, void *su
2853 */ 2703 */
2854 if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888) 2704 if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888)
2855 { 2705 {
2856#if EVAS_CSERVE2 2706 evas_cache_image_load_data(&im->cache_entry);
2857 if (evas_cserve2_use_get())
2858 evas_cache2_image_load_data(&im->cache_entry);
2859 else
2860#endif
2861 evas_cache_image_load_data(&im->cache_entry);
2862 2707
2863 if (!im->cache_entry.flags.loaded) return EINA_FALSE; 2708 if (!im->cache_entry.flags.loaded) return EINA_FALSE;
2864 } 2709 }
@@ -2884,17 +2729,7 @@ static void *
2884eng_image_map_surface_new(void *data EINA_UNUSED, int w, int h, int alpha) 2729eng_image_map_surface_new(void *data EINA_UNUSED, int w, int h, int alpha)
2885{ 2730{
2886 void *surface; 2731 void *surface;
2887#ifdef EVAS_CSERVE2 2732
2888 if (evas_cserve2_use_get())
2889 {
2890 surface = evas_cache2_image_copied_data(evas_common_image_cache2_get(),
2891 w, h, NULL, alpha,
2892 EVAS_COLORSPACE_ARGB8888);
2893 if (!surface) return NULL;
2894 evas_cache2_image_pixels(surface);
2895 return surface;
2896 }
2897#endif
2898 surface = evas_cache_image_copied_data(evas_common_image_cache_get(), 2733 surface = evas_cache_image_copied_data(evas_common_image_cache_get(),
2899 w, h, NULL, alpha, 2734 w, h, NULL, alpha,
2900 EVAS_COLORSPACE_ARGB8888); 2735 EVAS_COLORSPACE_ARGB8888);
@@ -3103,12 +2938,7 @@ eng_pixel_alpha_get(void *image, int x, int y, DATA8 *alpha, int src_region_x, i
3103 { 2938 {
3104 DATA32 *pixel; 2939 DATA32 *pixel;
3105 2940
3106#ifdef EVAS_CSERVE2 2941 evas_cache_image_load_data(&im->cache_entry);
3107 if (evas_cserve2_use_get())
3108 evas_cache2_image_load_data(&im->cache_entry);
3109 else
3110#endif
3111 evas_cache_image_load_data(&im->cache_entry);
3112 2942
3113 if (!im->cache_entry.flags.loaded) 2943 if (!im->cache_entry.flags.loaded)
3114 { 2944 {