[evasgl] Delete checking checksum when copy old shader 92/138592/2
authorsunghyun kim <scholb.kim@samsung.com>
Thu, 13 Jul 2017 02:07:53 +0000 (11:07 +0900)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Tue, 18 Jul 2017 01:08:18 +0000 (01:08 +0000)
when application use runtime shader, it add runtime shader when application shutdown.
for add runtime shader, they copy old shader file to temp file  and modify,rename this.
but in this case, eet_open & checksum check is failed.
because temp file is empty (it didn't write checksum)

so delete checking checksum when copy old shader to temp file.

Change-Id: I4930bd14922429e4eb85ad41d5ffd0b7dbff6d75

src/modules/evas/engines/gl_common/evas_gl_shader.c

index e77b9b2..bf2a42d 100644 (file)
@@ -321,16 +321,10 @@ _evas_gl_common_shader_binary_save(Evas_GL_Shared *shared)
    /* copy old file */
    if (copy)
      {
-        ef = eet_open(tmp_file_path, EET_FILE_MODE_READ);
-        if (!ef) goto save;
-        if (!_evas_gl_common_shader_binary_checksum_check(shared, ef))
-          copy = EINA_FALSE;
-        eet_close(ef);
-        if (copy)
-          eina_file_copy(bin_file_path, tmp_file_path, EINA_FILE_COPY_DATA, NULL, NULL);
+        if(!eina_file_copy(bin_file_path, tmp_file_path, EINA_FILE_COPY_DATA, NULL, NULL))
+          ERR("fail to copy old shader");
      }
 
-save:
    ef = eet_open(tmp_file_path, copy ? EET_FILE_MODE_READ_WRITE : EET_FILE_MODE_WRITE);
    if (!ef) goto error;