summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSrivardhan Hebbar <sri.hebbar@samsung.com>2015-10-31 02:36:14 +0100
committerCedric BAIL <cedric@osg.samsung.com>2015-10-31 02:36:17 +0100
commit78c723b2ed4fffb1318b0cf407374b7005694f34 (patch)
tree685a3dd660eb74fd735c99360aab3ce687a8a4af
parent63ded24f98bb06de1aee8be30ee8cefae532769b (diff)
evas: removing redundant if case in gl_cocoa backend.
Summary: According to my understanding of this function, this check of im_old is redundant, as im_old will never be NULL. For im_old to be NULL, image should be NULL. But that is checked at line 637. im is assigned image and im is checked for NULL. At line 654 im_old is assigned image and it is not modified till line 673. So this check would always return true and enter if case and would never enter else case. So removing the redundant code. Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com> Reviewers: cedric Reviewed By: cedric Differential Revision: https://phab.enlightenment.org/D3233 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r--src/modules/evas/engines/gl_cocoa/evas_engine.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/modules/evas/engines/gl_cocoa/evas_engine.c b/src/modules/evas/engines/gl_cocoa/evas_engine.c
index 312f5ff026..00e670ac22 100644
--- a/src/modules/evas/engines/gl_cocoa/evas_engine.c
+++ b/src/modules/evas/engines/gl_cocoa/evas_engine.c
@@ -670,15 +670,12 @@ eng_image_size_set(void *data, void *image, int w, int h)
670 ((int)im_old->im->cache_entry.w == w) && 670 ((int)im_old->im->cache_entry.w == w) &&
671 ((int)im_old->im->cache_entry.h == h)) 671 ((int)im_old->im->cache_entry.h == h))
672 return image; 672 return image;
673 if (im_old) 673
674 { 674 im = evas_gl_common_image_new(re->win->gl_context, w, h,
675 im = evas_gl_common_image_new(re->win->gl_context, w, h, 675 eng_image_alpha_get(data, image),
676 eng_image_alpha_get(data, image), 676 eng_image_colorspace_get(data, image));
677 eng_image_colorspace_get(data, image)); 677 evas_gl_common_image_free(im_old);
678 evas_gl_common_image_free(im_old); 678
679 }
680 else
681 im = evas_gl_common_image_new(re->win->gl_context, w, h, 1, EVAS_COLORSPACE_ARGB8888);
682 return im; 679 return im;
683} 680}
684 681