remove white space and tab

SVN revision: 65009
This commit is contained in:
Jiyoun Park 2011-11-10 08:59:09 +00:00
parent 9e55698aec
commit c049c0e12b
1 changed files with 191 additions and 191 deletions

View File

@ -71,7 +71,7 @@ struct _Render_Engine_GL_Context
#else #else
GLXContext context; GLXContext context;
#endif #endif
GLuint context_fbo; GLuint context_fbo;
GLuint current_fbo; GLuint current_fbo;
Render_Engine_GL_Surface *current_sfc; Render_Engine_GL_Surface *current_sfc;
@ -90,7 +90,7 @@ struct _Render_Engine_GL_Resource
}; };
// Extension Handling // Extension Handling
struct _Extension_Entry struct _Extension_Entry
{ {
const char *name; const char *name;
const char *real_name; const char *real_name;
@ -158,7 +158,7 @@ const char *(*glsym_glXQueryExtensionsString) (Display *a, int screen) = NULL;
// GLES2 Extensions // GLES2 Extensions
void (*glsym_glGetProgramBinaryOES) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary) = NULL; void (*glsym_glGetProgramBinaryOES) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary) = NULL;
void (*glsym_glProgramBinaryOES) (GLuint program, GLenum binaryFormat, const void *binary, GLint length) = NULL; void (*glsym_glProgramBinaryOES) (GLuint program, GLenum binaryFormat, const void *binary, GLint length) = NULL;
void* (*glsym_glMapBufferOES) (GLenum target, GLenum access) = NULL; void* (*glsym_glMapBufferOES) (GLenum target, GLenum access) = NULL;
unsigned char (*glsym_glUnmapBufferOES) (GLenum target) = NULL; unsigned char (*glsym_glUnmapBufferOES) (GLenum target) = NULL;
void (*glsym_glGetBufferPointervOES) (GLenum target, GLenum pname, void** params) = NULL; void (*glsym_glGetBufferPointervOES) (GLenum target, GLenum pname, void** params) = NULL;
@ -227,27 +227,27 @@ static Extension_Entry _gl_ext_entries[] = {
{ "GL_OES_compressed_paletted_texture", "compressed_paletted_texture", 0 }, { "GL_OES_compressed_paletted_texture", "compressed_paletted_texture", 0 },
{ "GL_OES_depth24", "depth24", 0 }, { "GL_OES_depth24", "depth24", 0 },
{ "GL_OES_depth32", "depth32", 0 }, { "GL_OES_depth32", "depth32", 0 },
{ "GL_OES_EvasGL_image", "EGL_image", 0 }, { "GL_OES_EvasGL_image", "EGL_image", 0 },
{ "GL_OES_packed_depth_stencil", "packed_depth_stencil", 0 }, { "GL_OES_packed_depth_stencil", "packed_depth_stencil", 0 },
{ "GL_OES_rgb8_rgba8", "rgb8_rgba8", 0 }, { "GL_OES_rgb8_rgba8", "rgb8_rgba8", 0 },
{ "GL_OES_standard_derivatives", "standard_derivatives", 0 }, { "GL_OES_standard_derivatives", "standard_derivatives", 0 },
{ "GL_OES_stencil1", "stencil1", 0 }, { "GL_OES_stencil1", "stencil1", 0 },
{ "GL_OES_stencil4", "stencil4", 0 }, { "GL_OES_stencil4", "stencil4", 0 },
{ "GL_OES_texture_float", "texture_float", 0 }, { "GL_OES_texture_float", "texture_float", 0 },
{ "GL_OES_texture_half_float", "texture_half_float", 0 }, { "GL_OES_texture_half_float", "texture_half_float", 0 },
{ "GL_OES_texture_half_float_linear", "texture_half_float_linear", 0 }, { "GL_OES_texture_half_float_linear", "texture_half_float_linear", 0 },
{ "GL_OES_texture_npot", "texture_npot", 0 }, { "GL_OES_texture_npot", "texture_npot", 0 },
{ "GL_OES_vertex_half_float", "vertex_half_float", 0 }, { "GL_OES_vertex_half_float", "vertex_half_float", 0 },
{ "GL_OES_vertex_type_10_10_10_2", "vertex_type_10_10_10_2", 0 }, { "GL_OES_vertex_type_10_10_10_2", "vertex_type_10_10_10_2", 0 },
{ "GL_AMD_compressed_3DC_texture", "compressed_3DC_texture", 0 }, { "GL_AMD_compressed_3DC_texture", "compressed_3DC_texture", 0 },
{ "GL_AMD_compressed_ATC_texture", "compressed_ATC_texture", 0 }, { "GL_AMD_compressed_ATC_texture", "compressed_ATC_texture", 0 },
{ "GL_AMD_program_binary_Z400", "program_binary_Z400", 0 }, { "GL_AMD_program_binary_Z400", "program_binary_Z400", 0 },
{ "GL_EXT_blend_minmax", "blend_minmax", 0 }, { "GL_EXT_blend_minmax", "blend_minmax", 0 },
{ "GL_EXT_read_format_bgra", "read_format_bgra", 0 }, { "GL_EXT_read_format_bgra", "read_format_bgra", 0 },
{ "GL_EXT_texture_filter_anisotropic", "texture_filter_anisotrophic", 0 }, { "GL_EXT_texture_filter_anisotropic", "texture_filter_anisotrophic", 0 },
{ "GL_EXT_texture_format_BGRA8888", "texture_format_BGRA8888", 0 }, { "GL_EXT_texture_format_BGRA8888", "texture_format_BGRA8888", 0 },
{ "GL_EXT_texture_type_2_10_10_10_REV", "texture_type_2_10_10_10_rev", 0 }, { "GL_EXT_texture_type_2_10_10_10_REV", "texture_type_2_10_10_10_rev", 0 },
{ "GL_IMG_program_binary", "IMG_program_binary", 0 }, { "GL_IMG_program_binary", "IMG_program_binary", 0 },
{ "GL_IMG_read_format", "IMG_read_format", 0 }, { "GL_IMG_read_format", "IMG_read_format", 0 },
{ "GL_IMG_shader_binary", "IMG_shader_binary", 0 }, { "GL_IMG_shader_binary", "IMG_shader_binary", 0 },
{ "GL_IMG_texture_compression_pvrtc", "IMG_texture_compression_pvrtc", 0 }, { "GL_IMG_texture_compression_pvrtc", "IMG_texture_compression_pvrtc", 0 },
@ -271,10 +271,10 @@ static Extension_Entry _gl_ext_entries[] = {
{ "GL_OES_compressed_paletted_texture", "compressed_paletted_texture", 0 }, { "GL_OES_compressed_paletted_texture", "compressed_paletted_texture", 0 },
{ "GL_OES_depth24", "depth24", 0 }, { "GL_OES_depth24", "depth24", 0 },
{ "GL_OES_depth32", "depth32", 0 }, { "GL_OES_depth32", "depth32", 0 },
{ "GL_OES_EvasGL_image", "EGL_image", 0 }, { "GL_OES_EvasGL_image", "EGL_image", 0 },
{ "GL_OES_packed_depth_stencil", "packed_depth_stencil", 0 }, { "GL_OES_packed_depth_stencil", "packed_depth_stencil", 0 },
{ "GL_OES_rgb8_rgba8", "rgb8_rgba8", 0 }, { "GL_OES_rgb8_rgba8", "rgb8_rgba8", 0 },
{ "GL_OES_standard_derivatives", "standard_derivatives", 0 }, { "GL_OES_standard_derivatives", "standard_derivatives", 0 },
{ "GL_OES_stencil1", "stencil1", 0 }, { "GL_OES_stencil1", "stencil1", 0 },
{ "GL_OES_stencil4", "stencil4", 0 }, { "GL_OES_stencil4", "stencil4", 0 },
{ "GL_OES_texture_float", "texture_float", 0 }, { "GL_OES_texture_float", "texture_float", 0 },
@ -291,7 +291,7 @@ static Extension_Entry _gl_ext_entries[] = {
{ "GL_EXT_texture_filter_anisotropic", "texture_filter_anisotrophic", 0 }, { "GL_EXT_texture_filter_anisotropic", "texture_filter_anisotrophic", 0 },
{ "GL_EXT_texture_format_BGRA8888", "bgra", 0 }, // Desktop differs { "GL_EXT_texture_format_BGRA8888", "bgra", 0 }, // Desktop differs
{ "GL_EXT_texture_type_2_10_10_10_REV", "vertex_type_2_10_10_10_rev", 0 }, // Desktop differs ??? { "GL_EXT_texture_type_2_10_10_10_REV", "vertex_type_2_10_10_10_rev", 0 }, // Desktop differs ???
{ "GL_IMG_program_binary", "IMG_program_binary", 0 }, { "GL_IMG_program_binary", "IMG_program_binary", 0 },
{ "GL_IMG_read_format", "IMG_read_format", 0 }, { "GL_IMG_read_format", "IMG_read_format", 0 },
{ "GL_IMG_shader_binary", "IMG_shader_binary", 0 }, { "GL_IMG_shader_binary", "IMG_shader_binary", 0 },
{ "GL_IMG_texture_compression_pvrtc", "IMG_texture_compression_pvrtc", 0 }, { "GL_IMG_texture_compression_pvrtc", "IMG_texture_compression_pvrtc", 0 },
@ -314,7 +314,7 @@ static Extension_Entry _evasgl_ext_entries[] = {
#else #else
#endif #endif
{ NULL, NULL, 0 } { NULL, NULL, 0 }
}; };
static void static void
_sym_init(void) _sym_init(void)
@ -657,7 +657,7 @@ xrdb_user_query(const char *name, const char *cls, char **type, XrmValue *val)
return EINA_FALSE; return EINA_FALSE;
} }
*/ */
static void * static void *
eng_info(Evas *e) eng_info(Evas *e)
{ {
@ -720,7 +720,7 @@ _create_internal_glue_resources(void *data)
context_attrs[2] = EGL_NONE; context_attrs[2] = EGL_NONE;
// Create resource surface for EGL // Create resource surface for EGL
rsc->surface = eglCreateWindowSurface(re->win->egl_disp, rsc->surface = eglCreateWindowSurface(re->win->egl_disp,
re->win->egl_config, re->win->egl_config,
(EGLNativeWindowType)DefaultRootWindow(re->info->info.display), (EGLNativeWindowType)DefaultRootWindow(re->info->info.display),
NULL); NULL);
@ -737,7 +737,7 @@ _create_internal_glue_resources(void *data)
re->win->egl_context[0], // Evas' GL Context re->win->egl_context[0], // Evas' GL Context
context_attrs); context_attrs);
if (!rsc->context) if (!rsc->context)
{ {
ERR("Internal Resource Context Creations Failed."); ERR("Internal Resource Context Creations Failed.");
free(rsc); free(rsc);
return NULL; return NULL;
@ -763,7 +763,7 @@ _create_internal_glue_resources(void *data)
re->win->context, // Evas' GL Context re->win->context, // Evas' GL Context
1); 1);
if (!rsc->context) if (!rsc->context)
{ {
ERR("Internal Resource Context Creations Failed."); ERR("Internal Resource Context Creations Failed.");
free(rsc); free(rsc);
return NULL; return NULL;
@ -816,7 +816,7 @@ _destroy_internal_glue_resources(void *data)
LKL(resource_lock); LKL(resource_lock);
EINA_LIST_FOREACH(resource_list, l, rsc) EINA_LIST_FOREACH(resource_list, l, rsc)
{ {
if (rsc) if (rsc)
{ {
glXDestroyContext(re->info->info.display, rsc->context); glXDestroyContext(re->info->info.display, rsc->context);
free(rsc); free(rsc);
@ -847,31 +847,31 @@ eng_setup(Evas *e, void *in)
#else #else
int eb, evb; int eb, evb;
if (!glXQueryExtension(info->info.display, &eb, &evb)) return 0; if (!glXQueryExtension(info->info.display, &eb, &evb)) return 0;
#endif #endif
re = calloc(1, sizeof(Render_Engine)); re = calloc(1, sizeof(Render_Engine));
if (!re) return 0; if (!re) return 0;
re->info = info; re->info = info;
re->evas = e; re->evas = e;
e->engine.data.output = re; e->engine.data.output = re;
re->w = e->output.w; re->w = e->output.w;
re->h = e->output.h; re->h = e->output.h;
re->win = eng_window_new(re->info->info.display, re->win = eng_window_new(re->info->info.display,
re->info->info.drawable, re->info->info.drawable,
re->info->info.screen, re->info->info.screen,
re->info->info.visual, re->info->info.visual,
re->info->info.colormap, re->info->info.colormap,
re->info->info.depth, re->info->info.depth,
re->w, re->w,
re->h, re->h,
re->info->indirect, re->info->indirect,
re->info->info.destination_alpha, re->info->info.destination_alpha,
re->info->info.rotation); re->info->info.rotation);
if (!re->win) if (!re->win)
{ {
free(re); free(re);
e->engine.data.output = NULL; e->engine.data.output = NULL;
return 0; return 0;
} }
gl_wins++; gl_wins++;
@ -955,7 +955,7 @@ eng_setup(Evas *e, void *in)
} }
else else
{ {
re = e->engine.data.output; re = e->engine.data.output;
if (_re_wincheck(re)) if (_re_wincheck(re))
{ {
if ((re->info->info.display != re->win->disp) || if ((re->info->info.display != re->win->disp) ||
@ -1022,7 +1022,7 @@ eng_setup(Evas *e, void *in)
free(re); free(re);
return 0; return 0;
} }
re->tb = evas_common_tilebuf_new(re->win->w, re->win->h); re->tb = evas_common_tilebuf_new(re->win->w, re->win->h);
if (!re->tb) if (!re->tb)
{ {
if (re->win) if (re->win)
@ -1034,7 +1034,7 @@ eng_setup(Evas *e, void *in)
return 0; return 0;
} }
evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE);
if (!e->engine.data.context) if (!e->engine.data.context)
e->engine.data.context = e->engine.data.context =
e->engine.func->context_new(e->engine.data.output); e->engine.func->context_new(e->engine.data.output);
@ -1111,7 +1111,7 @@ static void
eng_output_tile_size_set(void *data, int w, int h) eng_output_tile_size_set(void *data, int w, int h)
{ {
Render_Engine *re; Render_Engine *re;
re = (Render_Engine *)data; re = (Render_Engine *)data;
evas_common_tilebuf_set_tile_size(re->tb, w, h); evas_common_tilebuf_set_tile_size(re->tb, w, h);
} }
@ -1672,34 +1672,34 @@ eng_image_colorspace_set(void *data, void *image, int cspace)
switch (cspace) switch (cspace)
{ {
case EVAS_COLORSPACE_ARGB8888: case EVAS_COLORSPACE_ARGB8888:
if (im->cs.data) if (im->cs.data)
{ {
if (!im->cs.no_free) free(im->cs.data); if (!im->cs.no_free) free(im->cs.data);
im->cs.data = NULL; im->cs.data = NULL;
im->cs.no_free = 0; im->cs.no_free = 0;
} }
break; break;
case EVAS_COLORSPACE_YCBCR422P601_PL: case EVAS_COLORSPACE_YCBCR422P601_PL:
case EVAS_COLORSPACE_YCBCR422P709_PL: case EVAS_COLORSPACE_YCBCR422P709_PL:
case EVAS_COLORSPACE_YCBCR422601_PL: case EVAS_COLORSPACE_YCBCR422601_PL:
case EVAS_COLORSPACE_YCBCR420NV12601_PL: case EVAS_COLORSPACE_YCBCR420NV12601_PL:
case EVAS_COLORSPACE_YCBCR420TM12601_PL: case EVAS_COLORSPACE_YCBCR420TM12601_PL:
if (im->tex) evas_gl_common_texture_free(im->tex); if (im->tex) evas_gl_common_texture_free(im->tex);
im->tex = NULL; im->tex = NULL;
if (im->cs.data) if (im->cs.data)
{ {
if (!im->cs.no_free) free(im->cs.data); if (!im->cs.no_free) free(im->cs.data);
} }
if (im->im->cache_entry.h > 0) if (im->im->cache_entry.h > 0)
im->cs.data = im->cs.data =
calloc(1, im->im->cache_entry.h * sizeof(unsigned char *) * 2); calloc(1, im->im->cache_entry.h * sizeof(unsigned char *) * 2);
else else
im->cs.data = NULL; im->cs.data = NULL;
im->cs.no_free = 0; im->cs.no_free = 0;
break; break;
default: default:
abort(); abort();
break; break;
} }
im->cs.space = cspace; im->cs.space = cspace;
} }
@ -2293,9 +2293,9 @@ eng_image_size_get(void *data __UNUSED__, void *image, int *w, int *h)
{ {
if (!image) if (!image)
{ {
*w = 0; *w = 0;
*h = 0; *h = 0;
return; return;
} }
if (w) *w = ((Evas_GL_Image *)image)->w; if (w) *w = ((Evas_GL_Image *)image)->w;
if (h) *h = ((Evas_GL_Image *)image)->h; if (h) *h = ((Evas_GL_Image *)image)->h;
@ -2345,10 +2345,10 @@ eng_image_size_set(void *data, void *image, int w, int h)
return image; return image;
if (im_old) if (im_old)
{ {
im = evas_gl_common_image_new(re->win->gl_context, w, h, im = evas_gl_common_image_new(re->win->gl_context, w, h,
eng_image_alpha_get(data, image), eng_image_alpha_get(data, image),
eng_image_colorspace_get(data, image)); eng_image_colorspace_get(data, image));
/* /*
evas_common_load_image_data_from_file(im_old->im); evas_common_load_image_data_from_file(im_old->im);
if (im_old->im->image->data) if (im_old->im->image->data)
{ {
@ -2387,9 +2387,9 @@ eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data, i
re = (Render_Engine *)data; re = (Render_Engine *)data;
if (!image) if (!image)
{ {
*image_data = NULL; *image_data = NULL;
if (err) *err = EVAS_LOAD_ERROR_GENERIC; if (err) *err = EVAS_LOAD_ERROR_GENERIC;
return NULL; return NULL;
} }
im = image; im = image;
if (im->native.data) if (im->native.data)
@ -2428,7 +2428,7 @@ eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data, i
#endif #endif
/* Engine can be fail to create texture after cache drop like eng_image_content_hint_set function, /* Engine can be fail to create texture after cache drop like eng_image_content_hint_set function,
so it is need to add code which check im->im's NULL value*/ so it is need to add code which check im->im's NULL value*/
if (!im->im) if (!im->im)
{ {
@ -2441,41 +2441,41 @@ eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data, i
switch (im->cs.space) switch (im->cs.space)
{ {
case EVAS_COLORSPACE_ARGB8888: case EVAS_COLORSPACE_ARGB8888:
if (to_write) if (to_write)
{ {
if (im->references > 1) if (im->references > 1)
{ {
Evas_GL_Image *im_new; Evas_GL_Image *im_new;
im_new = evas_gl_common_image_new_from_copied_data im_new = evas_gl_common_image_new_from_copied_data
(im->gc, im->im->cache_entry.w, im->im->cache_entry.h, (im->gc, im->im->cache_entry.w, im->im->cache_entry.h,
im->im->image.data, im->im->image.data,
eng_image_alpha_get(data, image), eng_image_alpha_get(data, image),
eng_image_colorspace_get(data, image)); eng_image_colorspace_get(data, image));
if (!im_new) if (!im_new)
{ {
*image_data = NULL; *image_data = NULL;
if (err) *err = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; if (err) *err = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
return NULL; return NULL;
} }
evas_gl_common_image_free(im); evas_gl_common_image_free(im);
im = im_new; im = im_new;
} }
else else
evas_gl_common_image_dirty(im, 0, 0, 0, 0); evas_gl_common_image_dirty(im, 0, 0, 0, 0);
} }
*image_data = im->im->image.data; *image_data = im->im->image.data;
break; break;
case EVAS_COLORSPACE_YCBCR422P601_PL: case EVAS_COLORSPACE_YCBCR422P601_PL:
case EVAS_COLORSPACE_YCBCR422P709_PL: case EVAS_COLORSPACE_YCBCR422P709_PL:
case EVAS_COLORSPACE_YCBCR422601_PL: case EVAS_COLORSPACE_YCBCR422601_PL:
case EVAS_COLORSPACE_YCBCR420NV12601_PL: case EVAS_COLORSPACE_YCBCR420NV12601_PL:
case EVAS_COLORSPACE_YCBCR420TM12601_PL: case EVAS_COLORSPACE_YCBCR420TM12601_PL:
*image_data = im->cs.data; *image_data = im->cs.data;
break; break;
default: default:
abort(); abort();
break; break;
} }
if (err) *err = error; if (err) *err = error;
return im; return im;
@ -2502,7 +2502,7 @@ eng_image_data_put(void *data, void *image, DATA32 *image_data)
glsym_eglUnmapImageSEC(re->win->egl_disp, im->tex->pt->dyn.img); glsym_eglUnmapImageSEC(re->win->egl_disp, im->tex->pt->dyn.img);
#endif #endif
if (im->tex->pt->dyn.data == image_data) if (im->tex->pt->dyn.data == image_data)
return image; return image;
w = im->im->cache_entry.w; w = im->im->cache_entry.w;
h = im->im->cache_entry.h; h = im->im->cache_entry.h;
@ -2518,38 +2518,38 @@ eng_image_data_put(void *data, void *image, DATA32 *image_data)
switch (im->cs.space) switch (im->cs.space)
{ {
case EVAS_COLORSPACE_ARGB8888: case EVAS_COLORSPACE_ARGB8888:
if (image_data != im->im->image.data) if (image_data != im->im->image.data)
{ {
int w, h; int w, h;
w = im->im->cache_entry.w; w = im->im->cache_entry.w;
h = im->im->cache_entry.h; h = im->im->cache_entry.h;
im2 = eng_image_new_from_data(data, w, h, image_data, im2 = eng_image_new_from_data(data, w, h, image_data,
eng_image_alpha_get(data, image), eng_image_alpha_get(data, image),
eng_image_colorspace_get(data, image)); eng_image_colorspace_get(data, image));
if (!im2) return im; if (!im2) return im;
evas_gl_common_image_free(im); evas_gl_common_image_free(im);
im = im2; im = im2;
} }
break; break;
case EVAS_COLORSPACE_YCBCR422P601_PL: case EVAS_COLORSPACE_YCBCR422P601_PL:
case EVAS_COLORSPACE_YCBCR422P709_PL: case EVAS_COLORSPACE_YCBCR422P709_PL:
case EVAS_COLORSPACE_YCBCR422601_PL: case EVAS_COLORSPACE_YCBCR422601_PL:
case EVAS_COLORSPACE_YCBCR420NV12601_PL: case EVAS_COLORSPACE_YCBCR420NV12601_PL:
case EVAS_COLORSPACE_YCBCR420TM12601_PL: case EVAS_COLORSPACE_YCBCR420TM12601_PL:
if (image_data != im->cs.data) if (image_data != im->cs.data)
{ {
if (im->cs.data) if (im->cs.data)
{ {
if (!im->cs.no_free) free(im->cs.data); if (!im->cs.no_free) free(im->cs.data);
} }
im->cs.data = image_data; im->cs.data = image_data;
} }
evas_gl_common_image_dirty(im, 0, 0, 0, 0); evas_gl_common_image_dirty(im, 0, 0, 0, 0);
break; break;
default: default:
abort(); abort();
break; break;
} }
return im; return im;
} }
@ -2744,24 +2744,24 @@ eng_font_draw(void *data, void *context, void *surface, Evas_Font_Set *font, int
re->win->gl_context->dc = context; re->win->gl_context->dc = context;
{ {
// FIXME: put im into context so we can free it // FIXME: put im into context so we can free it
static RGBA_Image *im = NULL; static RGBA_Image *im = NULL;
if (!im) if (!im)
im = (RGBA_Image *)evas_cache_image_empty(evas_common_image_cache_get()); im = (RGBA_Image *)evas_cache_image_empty(evas_common_image_cache_get());
im->cache_entry.w = re->win->w; im->cache_entry.w = re->win->w;
im->cache_entry.h = re->win->h; im->cache_entry.h = re->win->h;
evas_common_draw_context_font_ext_set(context, evas_common_draw_context_font_ext_set(context,
re->win->gl_context, re->win->gl_context,
evas_gl_font_texture_new, evas_gl_font_texture_new,
evas_gl_font_texture_free, evas_gl_font_texture_free,
evas_gl_font_texture_draw); evas_gl_font_texture_draw);
evas_common_font_draw(im, context, (RGBA_Font *) font, x, y, evas_common_font_draw(im, context, (RGBA_Font *) font, x, y,
intl_props); intl_props);
evas_common_draw_context_font_ext_set(context, evas_common_draw_context_font_ext_set(context,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL); NULL);
} }
} }
@ -2983,7 +2983,7 @@ eng_gl_surface_create(void *data, void *config, int w, int h)
#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
ret = eglMakeCurrent(re->win->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); ret = eglMakeCurrent(re->win->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
#else #else
ret = glXMakeCurrent(re->info->info.display, None, NULL); ret = glXMakeCurrent(re->info->info.display, None, NULL);
#endif #endif
if (!ret) if (!ret)
{ {
@ -3225,9 +3225,9 @@ eng_gl_make_current(void *data __UNUSED__, void *surface, void *context)
#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
if ((rsc = eina_tls_get(resource_key)) == EINA_FALSE) return 0; if ((rsc = eina_tls_get(resource_key)) == EINA_FALSE) return 0;
if ((eglGetCurrentContext() != ctx->context) || if ((eglGetCurrentContext() != ctx->context) ||
(eglGetCurrentSurface(EGL_READ) != rsc->surface) || (eglGetCurrentSurface(EGL_READ) != rsc->surface) ||
(eglGetCurrentSurface(EGL_DRAW) != rsc->surface) ) (eglGetCurrentSurface(EGL_DRAW) != rsc->surface) )
{ {
// Flush remainder of what's in Evas' pipeline // Flush remainder of what's in Evas' pipeline
if (re->win) eng_window_use(NULL); if (re->win) eng_window_use(NULL);
@ -3250,7 +3250,7 @@ eng_gl_make_current(void *data __UNUSED__, void *surface, void *context)
// Do a make current // Do a make current
ret = glXMakeCurrent(re->info->info.display, re->win->win, ctx->context); ret = glXMakeCurrent(re->info->info.display, re->win->win, ctx->context);
if (!ret) if (!ret)
{ {
ERR("xxxMakeCurrent() failed!"); ERR("xxxMakeCurrent() failed!");
return 0; return 0;
@ -3460,7 +3460,7 @@ evgl_evasglCreateImage(int target, void* buffer, int *attrib_list)
ERR("Invalid Engine... (Can't acccess EGL Display)\n"); ERR("Invalid Engine... (Can't acccess EGL Display)\n");
} }
static void static void
evgl_evasglDestroyImage(EvasGLImage image) evgl_evasglDestroyImage(EvasGLImage image)
{ {
if (current_engine) if (current_engine)
@ -3641,54 +3641,54 @@ eng_gl_api_get(void *data)
#define ORD(f) EVAS_API_OVERRIDE(f, &gl_funcs, glsym_) #define ORD(f) EVAS_API_OVERRIDE(f, &gl_funcs, glsym_)
// Extensions // Extensions
ORD(glGetProgramBinaryOES); ORD(glGetProgramBinaryOES);
ORD(glProgramBinaryOES); ORD(glProgramBinaryOES);
ORD(glMapBufferOES); ORD(glMapBufferOES);
ORD(glUnmapBufferOES); ORD(glUnmapBufferOES);
ORD(glGetBufferPointervOES); ORD(glGetBufferPointervOES);
ORD(glTexImage3DOES); ORD(glTexImage3DOES);
ORD(glTexSubImage3DOES); ORD(glTexSubImage3DOES);
ORD(glCopyTexSubImage3DOES); ORD(glCopyTexSubImage3DOES);
ORD(glCompressedTexImage3DOES); ORD(glCompressedTexImage3DOES);
ORD(glCompressedTexSubImage3DOES); ORD(glCompressedTexSubImage3DOES);
ORD(glFramebufferTexture3DOES); ORD(glFramebufferTexture3DOES);
ORD(glGetPerfMonitorGroupsAMD); ORD(glGetPerfMonitorGroupsAMD);
ORD(glGetPerfMonitorCountersAMD); ORD(glGetPerfMonitorCountersAMD);
ORD(glGetPerfMonitorGroupStringAMD); ORD(glGetPerfMonitorGroupStringAMD);
ORD(glGetPerfMonitorCounterStringAMD); ORD(glGetPerfMonitorCounterStringAMD);
ORD(glGetPerfMonitorCounterInfoAMD); ORD(glGetPerfMonitorCounterInfoAMD);
ORD(glGenPerfMonitorsAMD); ORD(glGenPerfMonitorsAMD);
ORD(glDeletePerfMonitorsAMD); ORD(glDeletePerfMonitorsAMD);
ORD(glSelectPerfMonitorCountersAMD); ORD(glSelectPerfMonitorCountersAMD);
ORD(glBeginPerfMonitorAMD); ORD(glBeginPerfMonitorAMD);
ORD(glEndPerfMonitorAMD); ORD(glEndPerfMonitorAMD);
ORD(glGetPerfMonitorCounterDataAMD); ORD(glGetPerfMonitorCounterDataAMD);
ORD(glDiscardFramebufferEXT); ORD(glDiscardFramebufferEXT);
ORD(glMultiDrawArraysEXT); ORD(glMultiDrawArraysEXT);
ORD(glMultiDrawElementsEXT); ORD(glMultiDrawElementsEXT);
ORD(glDeleteFencesNV); ORD(glDeleteFencesNV);
ORD(glGenFencesNV); ORD(glGenFencesNV);
ORD(glIsFenceNV); ORD(glIsFenceNV);
ORD(glTestFenceNV); ORD(glTestFenceNV);
ORD(glGetFenceivNV); ORD(glGetFenceivNV);
ORD(glFinishFenceNV); ORD(glFinishFenceNV);
ORD(glSetFenceNV); ORD(glSetFenceNV);
ORD(glGetDriverControlsQCOM); ORD(glGetDriverControlsQCOM);
ORD(glGetDriverControlStringQCOM); ORD(glGetDriverControlStringQCOM);
ORD(glEnableDriverControlQCOM); ORD(glEnableDriverControlQCOM);
ORD(glDisableDriverControlQCOM); ORD(glDisableDriverControlQCOM);
ORD(glExtGetTexturesQCOM); ORD(glExtGetTexturesQCOM);
ORD(glExtGetBuffersQCOM); ORD(glExtGetBuffersQCOM);
ORD(glExtGetRenderbuffersQCOM); ORD(glExtGetRenderbuffersQCOM);
ORD(glExtGetFramebuffersQCOM); ORD(glExtGetFramebuffersQCOM);
ORD(glExtGetTexLevelParameterivQCOM); ORD(glExtGetTexLevelParameterivQCOM);
ORD(glExtTexObjectStateOverrideiQCOM); ORD(glExtTexObjectStateOverrideiQCOM);
ORD(glExtGetTexSubImageQCOM); ORD(glExtGetTexSubImageQCOM);
ORD(glExtGetBufferPointervQCOM); ORD(glExtGetBufferPointervQCOM);
ORD(glExtGetShadersQCOM); ORD(glExtGetShadersQCOM);
ORD(glExtGetProgramsQCOM); ORD(glExtGetProgramsQCOM);
ORD(glExtIsProgramBinaryQCOM); ORD(glExtIsProgramBinaryQCOM);
ORD(glExtGetProgramBinarySourceQCOM); ORD(glExtGetProgramBinarySourceQCOM);
#undef ORD #undef ORD
// Override functions wrapped by Evas_GL // Override functions wrapped by Evas_GL
@ -3828,8 +3828,8 @@ module_open(Evas_Module *em)
static Eina_Bool xrm_inited = EINA_FALSE; static Eina_Bool xrm_inited = EINA_FALSE;
if (!xrm_inited) if (!xrm_inited)
{ {
xrm_inited = EINA_TRUE; xrm_inited = EINA_TRUE;
XrmInitialize(); XrmInitialize();
} }
if (!em) return 0; if (!em) return 0;
@ -3939,7 +3939,7 @@ module_open(Evas_Module *em)
ORD(image_animated_frame_set); ORD(image_animated_frame_set);
ORD(image_max_size_get); ORD(image_max_size_get);
/* now advertise out own api */ /* now advertise out own api */
em->functions = (void *)(&func); em->functions = (void *)(&func);
return 1; return 1;