summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_api_ext.c7
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_api_ext_def.h17
-rw-r--r--src/modules/evas/engines/gl_x11/evas_engine.c17
4 files changed, 38 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 80b8096e66..a83354ffd1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
12012-11-22 Sung W. Park (sung_)
2
3 * Fixed a bug where if an image object rendered using Evas GL
4 direct rendering and then another image object using Native
5 Surface rendering, there was a potential for it to fall into
6 the same direct rendering path.
7 * Fixed some minor Evas GL extension bugs that came from refactoring.
8
9
12012-11-21 Carsten Haitzler (The Rasterman) 102012-11-21 Carsten Haitzler (The Rasterman)
2 11
3 * Fixed leak in textblock and text props in general that made 12 * Fixed leak in textblock and text props in general that made
diff --git a/src/modules/evas/engines/gl_common/evas_gl_api_ext.c b/src/modules/evas/engines/gl_common/evas_gl_api_ext.c
index 4f81ccf4dc..0fc757ee94 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_api_ext.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_api_ext.c
@@ -151,7 +151,8 @@ re->info->info.screen);
151 151
152#define _EVASGL_EXT_BEGIN(name) \ 152#define _EVASGL_EXT_BEGIN(name) \
153 { \ 153 { \
154 int *ext_support = &_gl_ext_support_##name; 154 int *ext_support = &_gl_ext_support_##name; \
155 *ext_support = 0;
155 156
156#define _EVASGL_EXT_END() \ 157#define _EVASGL_EXT_END() \
157 } 158 }
@@ -160,7 +161,7 @@ re->info->info.screen);
160 (strstr(glexts, #name) != NULL || strstr(glueexts, #name) != NULL) 161 (strstr(glexts, #name) != NULL || strstr(glueexts, #name) != NULL)
161 162
162#define _EVASGL_EXT_DISCARD_SUPPORT() \ 163#define _EVASGL_EXT_DISCARD_SUPPORT() \
163 ext_support = 0; 164 *ext_support = 0;
164 165
165#define _EVASGL_EXT_DRVNAME(name) \ 166#define _EVASGL_EXT_DRVNAME(name) \
166 if (_EVASGL_EXT_CHECK_SUPPORT(name)) *ext_support = 1; 167 if (_EVASGL_EXT_CHECK_SUPPORT(name)) *ext_support = 1;
@@ -174,7 +175,7 @@ re->info->info.screen);
174 } 175 }
175 176
176#define _EVASGL_EXT_FUNCTION_DRVFUNC(name) \ 177#define _EVASGL_EXT_FUNCTION_DRVFUNC(name) \
177 *drvfunc = name; 178 if ((*drvfunc) == NULL) *drvfunc = name;
178 179
179#include "evas_gl_api_ext_def.h" 180#include "evas_gl_api_ext_def.h"
180 181
diff --git a/src/modules/evas/engines/gl_common/evas_gl_api_ext_def.h b/src/modules/evas/engines/gl_common/evas_gl_api_ext_def.h
index d5d1fa3b2b..ff63913100 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_api_ext_def.h
+++ b/src/modules/evas/engines/gl_common/evas_gl_api_ext_def.h
@@ -52,9 +52,11 @@ _EVASGL_EXT_BEGIN(get_program_binary)
52 52
53 _EVASGL_EXT_FUNCTION_BEGIN(void, glGetProgramBinaryOES, (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary)) 53 _EVASGL_EXT_FUNCTION_BEGIN(void, glGetProgramBinaryOES, (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary))
54 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glGetProgramBinary")) 54 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glGetProgramBinary"))
55 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glGetProgramBinaryOES"))
55 _EVASGL_EXT_FUNCTION_END() 56 _EVASGL_EXT_FUNCTION_END()
56 _EVASGL_EXT_FUNCTION_BEGIN(void, glProgramBinaryOES, (GLuint program, GLenum binaryFormat, const void *binary, GLint length)) 57 _EVASGL_EXT_FUNCTION_BEGIN(void, glProgramBinaryOES, (GLuint program, GLenum binaryFormat, const void *binary, GLint length))
57 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glProgramBinary")) 58 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glProgramBinary"))
59 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glProgramBinaryOES"))
58 _EVASGL_EXT_FUNCTION_END() 60 _EVASGL_EXT_FUNCTION_END()
59_EVASGL_EXT_END() 61_EVASGL_EXT_END()
60 62
@@ -64,12 +66,15 @@ _EVASGL_EXT_BEGIN(mapbuffer)
64 66
65 _EVASGL_EXT_FUNCTION_BEGIN(void *, glMapBufferOES, (GLenum target, GLenum access)) 67 _EVASGL_EXT_FUNCTION_BEGIN(void *, glMapBufferOES, (GLenum target, GLenum access))
66 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glMapBuffer")) 68 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glMapBuffer"))
69 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glMapBufferOES"))
67 _EVASGL_EXT_FUNCTION_END() 70 _EVASGL_EXT_FUNCTION_END()
68 _EVASGL_EXT_FUNCTION_BEGIN(GLboolean, glUnmapBufferOES, (GLenum target)) 71 _EVASGL_EXT_FUNCTION_BEGIN(GLboolean, glUnmapBufferOES, (GLenum target))
69 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glUnmapBuffer")) 72 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glUnmapBuffer"))
73 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glUnmapBufferOES"))
70 _EVASGL_EXT_FUNCTION_END() 74 _EVASGL_EXT_FUNCTION_END()
71 _EVASGL_EXT_FUNCTION_BEGIN(void, glGetBufferPointervOES, (GLenum target, GLenum pname, void** params)) 75 _EVASGL_EXT_FUNCTION_BEGIN(void, glGetBufferPointervOES, (GLenum target, GLenum pname, void** params))
72 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glGetBufferPointerv")) 76 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glGetBufferPointerv"))
77 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glGetBufferPointervOES"))
73 _EVASGL_EXT_FUNCTION_END() 78 _EVASGL_EXT_FUNCTION_END()
74_EVASGL_EXT_END() 79_EVASGL_EXT_END()
75 80
@@ -78,21 +83,27 @@ _EVASGL_EXT_BEGIN(texture_3D)
78 83
79 _EVASGL_EXT_FUNCTION_BEGIN(void, glTexImage3DOES, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void* pixels)) 84 _EVASGL_EXT_FUNCTION_BEGIN(void, glTexImage3DOES, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void* pixels))
80 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glTexImage3D")) 85 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glTexImage3D"))
86 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glTexImage3DOES"))
81 _EVASGL_EXT_FUNCTION_END() 87 _EVASGL_EXT_FUNCTION_END()
82 _EVASGL_EXT_FUNCTION_BEGIN(void, glTexSubImage3DOES, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels)) 88 _EVASGL_EXT_FUNCTION_BEGIN(void, glTexSubImage3DOES, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels))
83 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glTexSubImage3D")) 89 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glTexSubImage3D"))
90 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glTexSubImage3DOES"))
84 _EVASGL_EXT_FUNCTION_END() 91 _EVASGL_EXT_FUNCTION_END()
85 _EVASGL_EXT_FUNCTION_BEGIN(void, glCopyTexSubImage3DOES, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)) 92 _EVASGL_EXT_FUNCTION_BEGIN(void, glCopyTexSubImage3DOES, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height))
86 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glCopyTexSubImage3D")) 93 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glCopyTexSubImage3D"))
94 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glCopyTexSubImage3DOES"))
87 _EVASGL_EXT_FUNCTION_END() 95 _EVASGL_EXT_FUNCTION_END()
88 _EVASGL_EXT_FUNCTION_BEGIN(void, glCompressedTexImage3DOES, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data)) 96 _EVASGL_EXT_FUNCTION_BEGIN(void, glCompressedTexImage3DOES, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data))
89 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glCompressedTexImage3D")) 97 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glCompressedTexImage3D"))
98 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glCompressedTexImage3DOES"))
90 _EVASGL_EXT_FUNCTION_END() 99 _EVASGL_EXT_FUNCTION_END()
91 _EVASGL_EXT_FUNCTION_BEGIN(void, glCompressedTexSubImage3DOES, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data)) 100 _EVASGL_EXT_FUNCTION_BEGIN(void, glCompressedTexSubImage3DOES, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data))
92 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glCompressedTexSubImage3D")) 101 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glCompressedTexSubImage3D"))
102 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glCompressedTexSubImage3DOES"))
93 _EVASGL_EXT_FUNCTION_END() 103 _EVASGL_EXT_FUNCTION_END()
94 _EVASGL_EXT_FUNCTION_BEGIN(void, glFramebufferTexture3DOES, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)) 104 _EVASGL_EXT_FUNCTION_BEGIN(void, glFramebufferTexture3DOES, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset))
95 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glFramebufferTexture3D")) 105 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glFramebufferTexture3D"))
106 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glFramebufferTexture3DOES"))
96 _EVASGL_EXT_FUNCTION_END() 107 _EVASGL_EXT_FUNCTION_END()
97_EVASGL_EXT_END() 108_EVASGL_EXT_END()
98 109
@@ -141,6 +152,7 @@ _EVASGL_EXT_BEGIN(discard_framebuffer)
141 152
142 _EVASGL_EXT_FUNCTION_BEGIN(void, glDiscardFramebufferEXT, (GLenum target, GLsizei numAttachments, const GLenum* attachments)) 153 _EVASGL_EXT_FUNCTION_BEGIN(void, glDiscardFramebufferEXT, (GLenum target, GLsizei numAttachments, const GLenum* attachments))
143 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glDiscardFramebuffer")) 154 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glDiscardFramebuffer"))
155 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glDiscardFramebufferEXT"))
144 _EVASGL_EXT_FUNCTION_END() 156 _EVASGL_EXT_FUNCTION_END()
145_EVASGL_EXT_END() 157_EVASGL_EXT_END()
146 158
@@ -150,8 +162,11 @@ _EVASGL_EXT_BEGIN(multi_draw_arrays)
150 162
151 _EVASGL_EXT_FUNCTION_BEGIN(void, glMultiDrawArraysEXT, (GLenum mode, GLint* first, GLsizei* count, GLsizei primcount)) 163 _EVASGL_EXT_FUNCTION_BEGIN(void, glMultiDrawArraysEXT, (GLenum mode, GLint* first, GLsizei* count, GLsizei primcount))
152 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glMultiDrawArrays")) 164 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glMultiDrawArrays"))
165 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glMultiDrawArraysEXT"))
153 _EVASGL_EXT_FUNCTION_END() 166 _EVASGL_EXT_FUNCTION_END()
154 _EVASGL_EXT_FUNCTION_BEGIN(void, glMultiDrawElementsEXT, (GLenum mode, const GLsizei* count, GLenum type, const GLvoid** indices, GLsizei primcount)) 167 _EVASGL_EXT_FUNCTION_BEGIN(void, glMultiDrawElementsEXT, (GLenum mode, const GLsizei* count, GLenum type, const GLvoid** indices, GLsizei primcount))
168 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glMultiDrawElements"))
169 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glMultiDrawElementsEXT"))
155 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glMultiDrawElementsARB")) 170 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glMultiDrawElementsARB"))
156 _EVASGL_EXT_FUNCTION_END() 171 _EVASGL_EXT_FUNCTION_END()
157_EVASGL_EXT_END() 172_EVASGL_EXT_END()
@@ -254,10 +269,12 @@ _EVASGL_EXT_BEGIN(multisampled_render_to_texture)
254 _EVASGL_EXT_DRVNAME(GL_EXT_multisampled_render_to_texture) 269 _EVASGL_EXT_DRVNAME(GL_EXT_multisampled_render_to_texture)
255 270
256 _EVASGL_EXT_FUNCTION_PRIVATE_BEGIN(void, glRenderbufferStorageMultisample, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)) 271 _EVASGL_EXT_FUNCTION_PRIVATE_BEGIN(void, glRenderbufferStorageMultisample, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height))
272 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glRenderbufferStorageMultisample"))
257 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glRenderbufferStorageMultisampleIMG")) 273 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glRenderbufferStorageMultisampleIMG"))
258 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glRenderbufferStorageMultisampleEXT")) 274 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glRenderbufferStorageMultisampleEXT"))
259 _EVASGL_EXT_FUNCTION_PRIVATE_END() 275 _EVASGL_EXT_FUNCTION_PRIVATE_END()
260 _EVASGL_EXT_FUNCTION_PRIVATE_BEGIN(void, glFramebufferTexture2DMultisample, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples)) 276 _EVASGL_EXT_FUNCTION_PRIVATE_BEGIN(void, glFramebufferTexture2DMultisample, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples))
277 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glFramebufferTexture2DMultisample"))
261 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glFramebufferTexture2DMultisampleIMG")) 278 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glFramebufferTexture2DMultisampleIMG"))
262 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glFramebufferTexture2DMultisampleEXT")) 279 _EVASGL_EXT_FUNCTION_DRVFUNC(GETPROCADDR("glFramebufferTexture2DMultisampleEXT"))
263 _EVASGL_EXT_FUNCTION_PRIVATE_END() 280 _EVASGL_EXT_FUNCTION_PRIVATE_END()
diff --git a/src/modules/evas/engines/gl_x11/evas_engine.c b/src/modules/evas/engines/gl_x11/evas_engine.c
index ae5242a995..fbf897fd25 100644
--- a/src/modules/evas/engines/gl_x11/evas_engine.c
+++ b/src/modules/evas/engines/gl_x11/evas_engine.c
@@ -41,7 +41,6 @@ struct _Render_Engine
41 41
42static int initted = 0; 42static int initted = 0;
43static int gl_wins = 0; 43static int gl_wins = 0;
44static int _ext_initted = 0;
45 44
46typedef void (*_eng_fn) (void); 45typedef void (*_eng_fn) (void);
47typedef _eng_fn (*glsym_func_eng_fn) (); 46typedef _eng_fn (*glsym_func_eng_fn) ();
@@ -513,7 +512,7 @@ static EVGL_Interface evgl_funcs =
513 512
514 513
515static void 514static void
516_ext_sym_init(void) 515gl_symbols(void)
517{ 516{
518 static int done = 0; 517 static int done = 0;
519 518
@@ -584,6 +583,8 @@ _ext_sym_init(void)
584 FINDSYM(glsym_glXSwapIntervalEXT, "glXSwapIntervalEXT", glsym_func_void); 583 FINDSYM(glsym_glXSwapIntervalEXT, "glXSwapIntervalEXT", glsym_func_void);
585 584
586#endif 585#endif
586
587 done = 1;
587} 588}
588 589
589int _evas_engine_GL_X11_log_dom = -1; 590int _evas_engine_GL_X11_log_dom = -1;
@@ -682,6 +683,8 @@ eng_setup(Evas *eo_e, void *in)
682 683
683 if (!initted) 684 if (!initted)
684 { 685 {
686 gl_symbols();
687
685 evas_common_cpu_init(); 688 evas_common_cpu_init();
686 evas_common_blend_init(); 689 evas_common_blend_init();
687 evas_common_image_init(); 690 evas_common_image_init();
@@ -834,12 +837,6 @@ eng_setup(Evas *eo_e, void *in)
834 837
835 re->vsync = 0; 838 re->vsync = 0;
836 839
837 if (!_ext_initted)
838 {
839 _ext_sym_init();
840 _ext_initted = 1 ;
841 }
842
843 return 1; 840 return 1;
844} 841}
845 842
@@ -2491,7 +2488,9 @@ eng_image_draw(void *data, void *context, void *surface, void *image, int src_x,
2491 if (!im) return; 2488 if (!im) return;
2492 n = im->native.data; 2489 n = im->native.data;
2493 2490
2494 if ((n) && (n->ns.type == EVAS_NATIVE_SURFACE_OPENGL) && (evgl_direct_rendered(re->evgl_engine))) 2491 if ((n) && (n->ns.type == EVAS_NATIVE_SURFACE_OPENGL) &&
2492 (n->ns.data.opengl.framebuffer_id == 0) &&
2493 (evgl_direct_rendered(re->evgl_engine)))
2495 { 2494 {
2496 DBG("Rendering Directly to the window"); 2495 DBG("Rendering Directly to the window");
2497 evas_object_image_pixels_dirty_set(evgl_direct_img_obj_get(re->evgl_engine), EINA_TRUE); 2496 evas_object_image_pixels_dirty_set(evgl_direct_img_obj_get(re->evgl_engine), EINA_TRUE);