evas: Avoid glTexSubImage2D() COW problem 41/76141/5
authorhuiyu.eun <huiyu.eun@samsung.com>
Thu, 23 Jun 2016 02:41:30 +0000 (11:41 +0900)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Tue, 28 Jun 2016 06:00:48 +0000 (23:00 -0700)
commit4d3759d083156d7b9dd3a7c188e3605343b969f0
treeacfd2f78c85272bd0a66bb65c15d1d0a5d26d9d4
parent863df65c10b1d0f1e62ad45ba8ab3afaf2273537
evas: Avoid glTexSubImage2D() COW problem

[Problem] If you try to update image while rendering that image, Copy On Write occur. So performace goes bad.
[Cause] Every images use 9-glTexSubImage2D(). glTexSubImage2D() takes more time than glTexImage2D.
[Solution]Change texture uploading policy.
1. If (image > atlas size), Do not call glTexSubImage2D.
 glTexImage2D is enough. (Maybe edge 1-pixels are not clear than before.)
2. If (image < atlas_size) && (image > memcpy_size), Do 9-glTexSubImage2D.
3. If (image < atlas_size) && (image < memcpy_size),
 Do memcpy from the image data and borders to new memory.
 Then do 1-glTexSubImage2D. (This will be reduce probablity of COW.)
[Team] Graphics

Change-Id: I663f2d3ec3c39995d9b7fd17b1dad170ce00a506
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
src/modules/evas/engines/gl_common/evas_gl_common.h
src/modules/evas/engines/gl_common/evas_gl_context.c
src/modules/evas/engines/gl_common/evas_gl_texture.c [changed mode: 0644->0755]