summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2013-09-23 17:51:06 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2013-10-28 15:47:15 +0900
commit1e82480c9a074163ec6788a8a60ead403f7b0658 (patch)
tree0c1458c5a0a0149c0f4a16e11f4d3523934cdb74 /src/modules
parentfc73405c40653a5fc0166690e3657ffd87069efc (diff)
evas/cserve2: Use scalecache with cserve2
Let's reuse the logic from scalecache and call cserve2 functions when the scalecache should be used. So, now, cserve2 server will not scale any image... This is too computationally intensive for the server's main thread. This is not optimal but makes a hell of a lot more sense for the moment. (since cserve2 manages the SHM segments)
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/evas/engines/software_generic/evas_engine.c54
1 files changed, 8 insertions, 46 deletions
diff --git a/src/modules/evas/engines/software_generic/evas_engine.c b/src/modules/evas/engines/software_generic/evas_engine.c
index 577d3af4b0..57766ef34c 100644
--- a/src/modules/evas/engines/software_generic/evas_engine.c
+++ b/src/modules/evas/engines/software_generic/evas_engine.c
@@ -1352,52 +1352,14 @@ eng_image_draw(void *data EINA_UNUSED, void *context, void *surface, void *image
1352#endif 1352#endif
1353 else 1353 else
1354 { 1354 {
1355#if 0 1355 evas_common_rgba_image_scalecache_prepare
1356#ifdef EVAS_CSERVE2 1356 (&im->cache_entry, surface, context, smooth,
1357 if (evas_cserve2_use_get()) 1357 src_x, src_y, src_w, src_h,
1358 { 1358 dst_x, dst_y, dst_w, dst_h);
1359 evas_cache2_image_load_data(&im->cache_entry); 1359 evas_common_rgba_image_scalecache_do
1360 goto image_loaded; 1360 (&im->cache_entry, surface, context, smooth,
1361 } 1361 src_x, src_y, src_w, src_h,
1362#endif 1362 dst_x, dst_y, dst_w, dst_h);
1363 if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888)
1364 evas_cache_image_load_data(&im->cache_entry);
1365 evas_common_image_colorspace_normalize(im);
1366
1367image_loaded:
1368#endif
1369#ifdef EVAS_CSERVE2
1370 if (evas_cserve2_use_get())
1371 {
1372 if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888)
1373 evas_cache2_image_load_data(&im->cache_entry);
1374
1375 if (!im->cache_entry.flags.loaded) return EINA_FALSE;
1376 evas_common_image_colorspace_normalize(im);
1377
1378 if (smooth)
1379 evas_common_scale_rgba_in_to_out_clip_smooth
1380 (im, surface, context,
1381 src_x, src_y, src_w, src_h,
1382 dst_x, dst_y, dst_w, dst_h);
1383 else
1384 evas_common_scale_rgba_in_to_out_clip_sample
1385 (im, surface, context,
1386 src_x, src_y, src_w, src_h,
1387 dst_x, dst_y, dst_w, dst_h);
1388 }
1389 else
1390#endif
1391 {
1392 evas_common_rgba_image_scalecache_prepare
1393 (&im->cache_entry, surface, context, smooth,
1394 src_x, src_y, src_w, src_h,
1395 dst_x, dst_y, dst_w, dst_h);
1396 evas_common_rgba_image_scalecache_do
1397 (&im->cache_entry, surface, context, smooth,
1398 src_x, src_y, src_w, src_h,
1399 dst_x, dst_y, dst_w, dst_h);
1400 }
1401 1363
1402 evas_common_cpu_end_opt(); 1364 evas_common_cpu_end_opt();
1403 } 1365 }