evas: rename Evas_GL_Context to Evas_Engine_GL_Context

patch by Sung W. Park <sungwoo@gmail.com>


SVN revision: 57803
This commit is contained in:
Cedric BAIL 2011-03-16 17:32:49 +00:00
parent 564526ef38
commit 76a0da7a1c
13 changed files with 118 additions and 117 deletions

View File

@ -20,3 +20,4 @@ Iván Briano <ivan@profusion.mobi>
Gustavo Lima Chaves <glima@profusion.mobi> Gustavo Lima Chaves <glima@profusion.mobi>
Saumsung Electronics <tbd> Saumsung Electronics <tbd>
Samsung SAIT <tbd> Samsung SAIT <tbd>
Sung W. Park <sungwoo@gmail.com>

View File

@ -116,44 +116,44 @@ struct _Evas_Cairo_Polygon_Point
#endif #endif
/* /*
Evas_GL_Context *evas_gl_common_context_new(void); Evas_Engine_GL_Context *evas_gl_common_context_new(void);
void evas_gl_common_context_free(Evas_GL_Context *gc); void evas_gl_common_context_free(Evas_Engine_GL_Context *gc);
void evas_gl_common_context_use(Evas_GL_Context *gc); void evas_gl_common_context_use(Evas_Engine_GL_Context *gc);
void evas_gl_common_context_resize(Evas_GL_Context *gc, int w, int h); void evas_gl_common_context_resize(Evas_Engine_GL_Context *gc, int w, int h);
void evas_gl_common_context_color_set(Evas_GL_Context *gc, int r, int g, int b, int a); void evas_gl_common_context_color_set(Evas_Engine_GL_Context *gc, int r, int g, int b, int a);
void evas_gl_common_context_blend_set(Evas_GL_Context *gc, int blend); void evas_gl_common_context_blend_set(Evas_Engine_GL_Context *gc, int blend);
void evas_gl_common_context_dither_set(Evas_GL_Context *gc, int dither); void evas_gl_common_context_dither_set(Evas_Engine_GL_Context *gc, int dither);
void evas_gl_common_context_texture_set(Evas_GL_Context *gc, Evas_GL_Texture *tex, int smooth, int w, int h); void evas_gl_common_context_texture_set(Evas_Engine_GL_Context *gc, Evas_GL_Texture *tex, int smooth, int w, int h);
void evas_gl_common_context_font_texture_set(Evas_GL_Context *gc, Evas_GL_Font_Texture *ft); void evas_gl_common_context_font_texture_set(Evas_Engine_GL_Context *gc, Evas_GL_Font_Texture *ft);
void evas_gl_common_context_clip_set(Evas_GL_Context *gc, int on, int x, int y, int w, int h); void evas_gl_common_context_clip_set(Evas_Engine_GL_Context *gc, int on, int x, int y, int w, int h);
void evas_gl_common_context_read_buf_set(Evas_GL_Context *gc, GLenum buf); void evas_gl_common_context_read_buf_set(Evas_Engine_GL_Context *gc, GLenum buf);
void evas_gl_common_context_write_buf_set(Evas_GL_Context *gc, GLenum buf); void evas_gl_common_context_write_buf_set(Evas_Engine_GL_Context *gc, GLenum buf);
Evas_GL_Texture *evas_gl_common_texture_new(Evas_GL_Context *gc, RGBA_Image *im, int smooth); Evas_GL_Texture *evas_gl_common_texture_new(Evas_Engine_GL_Context *gc, RGBA_Image *im, int smooth);
void evas_gl_common_texture_update(Evas_GL_Texture *tex, RGBA_Image *im, int smooth); void evas_gl_common_texture_update(Evas_GL_Texture *tex, RGBA_Image *im, int smooth);
void evas_gl_common_texture_free(Evas_GL_Texture *tex); void evas_gl_common_texture_free(Evas_GL_Texture *tex);
void evas_gl_common_texture_mipmaps_build(Evas_GL_Texture *tex, RGBA_Image *im, int smooth); void evas_gl_common_texture_mipmaps_build(Evas_GL_Texture *tex, RGBA_Image *im, int smooth);
Evas_GL_Image *evas_gl_common_image_load(Evas_GL_Context *gc, char *file, char *key); Evas_GL_Image *evas_gl_common_image_load(Evas_Engine_GL_Context *gc, char *file, char *key);
Evas_GL_Image *evas_gl_common_image_new_from_data(Evas_GL_Context *gc, int w, int h, int *data); Evas_GL_Image *evas_gl_common_image_new_from_data(Evas_Engine_GL_Context *gc, int w, int h, int *data);
Evas_GL_Image *evas_gl_common_image_new_from_copied_data(Evas_GL_Context *gc, int w, int h, int *data); Evas_GL_Image *evas_gl_common_image_new_from_copied_data(Evas_Engine_GL_Context *gc, int w, int h, int *data);
Evas_GL_Image *evas_gl_common_image_new(Evas_GL_Context *gc, int w, int h); Evas_GL_Image *evas_gl_common_image_new(Evas_Engine_GL_Context *gc, int w, int h);
void evas_gl_common_image_free(Evas_GL_Image *im); void evas_gl_common_image_free(Evas_GL_Image *im);
void evas_gl_common_image_dirty(Evas_GL_Image *im); void evas_gl_common_image_dirty(Evas_GL_Image *im);
Evas_GL_Polygon *evas_gl_common_poly_point_add(Evas_GL_Polygon *poly, int x, int y); Evas_GL_Polygon *evas_gl_common_poly_point_add(Evas_GL_Polygon *poly, int x, int y);
Evas_GL_Polygon *evas_gl_common_poly_points_clear(Evas_GL_Polygon *poly); Evas_GL_Polygon *evas_gl_common_poly_points_clear(Evas_GL_Polygon *poly);
void evas_gl_common_swap_rect(Evas_GL_Context *gc, int x, int y, int w, int h); void evas_gl_common_swap_rect(Evas_Engine_GL_Context *gc, int x, int y, int w, int h);
void evas_gl_common_rect_draw(Evas_GL_Context *gc, RGBA_Draw_Context *dc, int x, int y, int w, int h); void evas_gl_common_rect_draw(Evas_Engine_GL_Context *gc, RGBA_Draw_Context *dc, int x, int y, int w, int h);
void evas_gl_common_image_draw(Evas_GL_Context *gc, RGBA_Draw_Context *dc, Evas_GL_Image *im, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh, int smooth); void evas_gl_common_image_draw(Evas_Engine_GL_Context *gc, RGBA_Draw_Context *dc, Evas_GL_Image *im, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh, int smooth);
void evas_gl_common_line_draw(Evas_GL_Context *gc, RGBA_Draw_Context *dc, int x1, int y1, int x2, int y2); void evas_gl_common_line_draw(Evas_Engine_GL_Context *gc, RGBA_Draw_Context *dc, int x1, int y1, int x2, int y2);
void evas_gl_common_poly_draw(Evas_GL_Context *gc, RGBA_Draw_Context *dc, Evas_GL_Polygon *poly); void evas_gl_common_poly_draw(Evas_Engine_GL_Context *gc, RGBA_Draw_Context *dc, Evas_GL_Polygon *poly);
Evas_GL_Font_Texture *evas_gl_font_texture_new(Evas_GL_Context *gc, RGBA_Font_Glyph *fg); Evas_GL_Font_Texture *evas_gl_font_texture_new(Evas_Engine_GL_Context *gc, RGBA_Font_Glyph *fg);
void evas_gl_font_texture_free(Evas_GL_Font_Texture *ft); void evas_gl_font_texture_free(Evas_GL_Font_Texture *ft);
void evas_gl_font_texture_draw(Evas_GL_Context *gc, void *surface, RGBA_Draw_Context *dc, RGBA_Font_Glyph *fg, int x, int y); void evas_gl_font_texture_draw(Evas_Engine_GL_Context *gc, void *surface, RGBA_Draw_Context *dc, RGBA_Font_Glyph *fg, int x, int y);
*/ */
#endif #endif

View File

@ -101,7 +101,7 @@
typedef struct _Evas_GL_Program Evas_GL_Program; typedef struct _Evas_GL_Program Evas_GL_Program;
typedef struct _Evas_GL_Program_Source Evas_GL_Program_Source; typedef struct _Evas_GL_Program_Source Evas_GL_Program_Source;
typedef struct _Evas_GL_Shared Evas_GL_Shared; typedef struct _Evas_GL_Shared Evas_GL_Shared;
typedef struct _Evas_GL_Context Evas_GL_Context; typedef struct _Evas_Engine_GL_Context Evas_Engine_GL_Context;
typedef struct _Evas_GL_Texture_Pool Evas_GL_Texture_Pool; typedef struct _Evas_GL_Texture_Pool Evas_GL_Texture_Pool;
typedef struct _Evas_GL_Texture Evas_GL_Texture; typedef struct _Evas_GL_Texture Evas_GL_Texture;
typedef struct _Evas_GL_Image Evas_GL_Image; typedef struct _Evas_GL_Image Evas_GL_Image;
@ -215,7 +215,7 @@ struct _Evas_GL_Shared
struct _Evas_GL_Context struct _Evas_Engine_GL_Context
{ {
int references; int references;
int w, h; int w, h;
@ -291,7 +291,7 @@ struct _Evas_GL_Context
struct _Evas_GL_Texture_Pool struct _Evas_GL_Texture_Pool
{ {
Evas_GL_Context *gc; Evas_Engine_GL_Context *gc;
GLuint texture, fb; GLuint texture, fb;
GLuint intformat, format, dataformat; GLuint intformat, format, dataformat;
int w, h; int w, h;
@ -312,7 +312,7 @@ struct _Evas_GL_Texture_Pool
struct _Evas_GL_Texture struct _Evas_GL_Texture
{ {
Evas_GL_Context *gc; Evas_Engine_GL_Context *gc;
Evas_GL_Image *im; Evas_GL_Image *im;
Evas_GL_Texture_Pool *pt, *ptu, *ptv; Evas_GL_Texture_Pool *pt, *ptu, *ptv;
int x, y, w, h; int x, y, w, h;
@ -324,7 +324,7 @@ struct _Evas_GL_Texture
struct _Evas_GL_Image struct _Evas_GL_Image
{ {
Evas_GL_Context *gc; Evas_Engine_GL_Context *gc;
RGBA_Image *im; RGBA_Image *im;
Evas_GL_Texture *tex; Evas_GL_Texture *tex;
RGBA_Image_Loadopts load_opts; RGBA_Image_Loadopts load_opts;
@ -402,38 +402,38 @@ extern Evas_GL_Program_Source shader_tex_nomul_vert_src;
void glerr(int err, const char *file, const char *func, int line, const char *op); void glerr(int err, const char *file, const char *func, int line, const char *op);
Evas_GL_Context *evas_gl_common_context_new(void); Evas_Engine_GL_Context *evas_gl_common_context_new(void);
void evas_gl_common_context_free(Evas_GL_Context *gc); void evas_gl_common_context_free(Evas_Engine_GL_Context *gc);
void evas_gl_common_context_use(Evas_GL_Context *gc); void evas_gl_common_context_use(Evas_Engine_GL_Context *gc);
void evas_gl_common_context_newframe(Evas_GL_Context *gc); void evas_gl_common_context_newframe(Evas_Engine_GL_Context *gc);
void evas_gl_common_context_resize(Evas_GL_Context *gc, int w, int h, int rot); void evas_gl_common_context_resize(Evas_Engine_GL_Context *gc, int w, int h, int rot);
void evas_gl_common_context_target_surface_set(Evas_GL_Context *gc, Evas_GL_Image *surface); void evas_gl_common_context_target_surface_set(Evas_Engine_GL_Context *gc, Evas_GL_Image *surface);
void evas_gl_common_context_line_push(Evas_GL_Context *gc, void evas_gl_common_context_line_push(Evas_Engine_GL_Context *gc,
int x1, int y1, int x2, int y2, int x1, int y1, int x2, int y2,
int clip, int cx, int cy, int cw, int ch, int clip, int cx, int cy, int cw, int ch,
int r, int g, int b, int a); int r, int g, int b, int a);
void evas_gl_common_context_rectangle_push(Evas_GL_Context *gc, void evas_gl_common_context_rectangle_push(Evas_Engine_GL_Context *gc,
int x, int y, int w, int h, int x, int y, int w, int h,
int r, int g, int b, int a); int r, int g, int b, int a);
void evas_gl_common_context_image_push(Evas_GL_Context *gc, void evas_gl_common_context_image_push(Evas_Engine_GL_Context *gc,
Evas_GL_Texture *tex, Evas_GL_Texture *tex,
double sx, double sy, double sw, double sh, double sx, double sy, double sw, double sh,
int x, int y, int w, int h, int x, int y, int w, int h,
int r, int g, int b, int a, int r, int g, int b, int a,
Eina_Bool smooth, Eina_Bool tex_only); Eina_Bool smooth, Eina_Bool tex_only);
void evas_gl_common_context_font_push(Evas_GL_Context *gc, void evas_gl_common_context_font_push(Evas_Engine_GL_Context *gc,
Evas_GL_Texture *tex, Evas_GL_Texture *tex,
double sx, double sy, double sw, double sh, double sx, double sy, double sw, double sh,
int x, int y, int w, int h, int x, int y, int w, int h,
int r, int g, int b, int a); int r, int g, int b, int a);
void evas_gl_common_context_yuv_push(Evas_GL_Context *gc, void evas_gl_common_context_yuv_push(Evas_Engine_GL_Context *gc,
Evas_GL_Texture *tex, Evas_GL_Texture *tex,
double sx, double sy, double sw, double sh, double sx, double sy, double sw, double sh,
int x, int y, int w, int h, int x, int y, int w, int h,
int r, int g, int b, int a, int r, int g, int b, int a,
Eina_Bool smooth); Eina_Bool smooth);
void evas_gl_common_context_image_map_push(Evas_GL_Context *gc, void evas_gl_common_context_image_map_push(Evas_Engine_GL_Context *gc,
Evas_GL_Texture *tex, Evas_GL_Texture *tex,
int npoints, int npoints,
RGBA_Map_Point *p, RGBA_Map_Point *p,
@ -442,7 +442,7 @@ void evas_gl_common_context_image_map_push(Evas_GL_Context *gc,
Eina_Bool smooth, Eina_Bool smooth,
Eina_Bool tex_only, Eina_Bool tex_only,
Eina_Bool yuv); Eina_Bool yuv);
void evas_gl_common_context_flush(Evas_GL_Context *gc); void evas_gl_common_context_flush(Evas_Engine_GL_Context *gc);
int evas_gl_common_shader_program_init(Evas_GL_Program *p, int evas_gl_common_shader_program_init(Evas_GL_Program *p,
Evas_GL_Program_Source *vert, Evas_GL_Program_Source *vert,
@ -450,39 +450,39 @@ int evas_gl_common_shader_program_init(Evas_GL_Program *p,
const char *name); const char *name);
void evas_gl_common_shader_program_shutdown(Evas_GL_Program *p); void evas_gl_common_shader_program_shutdown(Evas_GL_Program *p);
void evas_gl_common_rect_draw(Evas_GL_Context *gc, int x, int y, int w, int h); void evas_gl_common_rect_draw(Evas_Engine_GL_Context *gc, int x, int y, int w, int h);
void evas_gl_texture_pool_empty(Evas_GL_Texture_Pool *pt); void evas_gl_texture_pool_empty(Evas_GL_Texture_Pool *pt);
Evas_GL_Texture *evas_gl_common_texture_new(Evas_GL_Context *gc, RGBA_Image *im); Evas_GL_Texture *evas_gl_common_texture_new(Evas_Engine_GL_Context *gc, RGBA_Image *im);
Evas_GL_Texture *evas_gl_common_texture_native_new(Evas_GL_Context *gc, unsigned int w, unsigned int h, int alpha, Evas_GL_Image *im); Evas_GL_Texture *evas_gl_common_texture_native_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha, Evas_GL_Image *im);
Evas_GL_Texture *evas_gl_common_texture_render_new(Evas_GL_Context *gc, unsigned int w, unsigned int h, int alpha); Evas_GL_Texture *evas_gl_common_texture_render_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha);
Evas_GL_Texture *evas_gl_common_texture_dynamic_new(Evas_GL_Context *gc, Evas_GL_Image *im); Evas_GL_Texture *evas_gl_common_texture_dynamic_new(Evas_Engine_GL_Context *gc, Evas_GL_Image *im);
void evas_gl_common_texture_update(Evas_GL_Texture *tex, RGBA_Image *im); void evas_gl_common_texture_update(Evas_GL_Texture *tex, RGBA_Image *im);
void evas_gl_common_texture_free(Evas_GL_Texture *tex); void evas_gl_common_texture_free(Evas_GL_Texture *tex);
Evas_GL_Texture *evas_gl_common_texture_alpha_new(Evas_GL_Context *gc, DATA8 *pixels, unsigned int w, unsigned int h, int fh); Evas_GL_Texture *evas_gl_common_texture_alpha_new(Evas_Engine_GL_Context *gc, DATA8 *pixels, unsigned int w, unsigned int h, int fh);
void evas_gl_common_texture_alpha_update(Evas_GL_Texture *tex, DATA8 *pixels, unsigned int w, unsigned int h, int fh); void evas_gl_common_texture_alpha_update(Evas_GL_Texture *tex, DATA8 *pixels, unsigned int w, unsigned int h, int fh);
Evas_GL_Texture *evas_gl_common_texture_yuv_new(Evas_GL_Context *gc, DATA8 **rows, unsigned int w, unsigned int h); Evas_GL_Texture *evas_gl_common_texture_yuv_new(Evas_Engine_GL_Context *gc, DATA8 **rows, unsigned int w, unsigned int h);
void evas_gl_common_texture_yuv_update(Evas_GL_Texture *tex, DATA8 **rows, unsigned int w, unsigned int h); void evas_gl_common_texture_yuv_update(Evas_GL_Texture *tex, DATA8 **rows, unsigned int w, unsigned int h);
void evas_gl_common_image_all_unload(Evas_GL_Context *gc); void evas_gl_common_image_all_unload(Evas_Engine_GL_Context *gc);
void evas_gl_common_image_ref(Evas_GL_Image *im); void evas_gl_common_image_ref(Evas_GL_Image *im);
void evas_gl_common_image_unref(Evas_GL_Image *im); void evas_gl_common_image_unref(Evas_GL_Image *im);
Evas_GL_Image *evas_gl_common_image_load(Evas_GL_Context *gc, const char *file, const char *key, Evas_Image_Load_Opts *lo, int *error); Evas_GL_Image *evas_gl_common_image_load(Evas_Engine_GL_Context *gc, const char *file, const char *key, Evas_Image_Load_Opts *lo, int *error);
Evas_GL_Image *evas_gl_common_image_new_from_data(Evas_GL_Context *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, int cspace); Evas_GL_Image *evas_gl_common_image_new_from_data(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, int cspace);
Evas_GL_Image *evas_gl_common_image_new_from_copied_data(Evas_GL_Context *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, int cspace); Evas_GL_Image *evas_gl_common_image_new_from_copied_data(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, int cspace);
Evas_GL_Image *evas_gl_common_image_new(Evas_GL_Context *gc, unsigned int w, unsigned int h, int alpha, int cspace); Evas_GL_Image *evas_gl_common_image_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha, int cspace);
Evas_GL_Image *evas_gl_common_image_alpha_set(Evas_GL_Image *im, int alpha); Evas_GL_Image *evas_gl_common_image_alpha_set(Evas_GL_Image *im, int alpha);
void evas_gl_common_image_native_enable(Evas_GL_Image *im); void evas_gl_common_image_native_enable(Evas_GL_Image *im);
void evas_gl_common_image_native_disable(Evas_GL_Image *im); void evas_gl_common_image_native_disable(Evas_GL_Image *im);
void evas_gl_common_image_scale_hint_set(Evas_GL_Image *im, int hint); void evas_gl_common_image_scale_hint_set(Evas_GL_Image *im, int hint);
void evas_gl_common_image_content_hint_set(Evas_GL_Image *im, int hint); void evas_gl_common_image_content_hint_set(Evas_GL_Image *im, int hint);
void evas_gl_common_image_cache_flush(Evas_GL_Context *gc); void evas_gl_common_image_cache_flush(Evas_Engine_GL_Context *gc);
void evas_gl_common_image_free(Evas_GL_Image *im); void evas_gl_common_image_free(Evas_GL_Image *im);
Evas_GL_Image *evas_gl_common_image_surface_new(Evas_GL_Context *gc, unsigned int w, unsigned int h, int alpha); Evas_GL_Image *evas_gl_common_image_surface_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha);
void evas_gl_common_image_dirty(Evas_GL_Image *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h); void evas_gl_common_image_dirty(Evas_GL_Image *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h);
void evas_gl_common_image_map_draw(Evas_GL_Context *gc, Evas_GL_Image *im, int npoints, RGBA_Map_Point *p, int smooth, int level); void evas_gl_common_image_map_draw(Evas_Engine_GL_Context *gc, Evas_GL_Image *im, int npoints, RGBA_Map_Point *p, int smooth, int level);
void evas_gl_common_image_draw(Evas_GL_Context *gc, Evas_GL_Image *im, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh, int smooth); void evas_gl_common_image_draw(Evas_Engine_GL_Context *gc, Evas_GL_Image *im, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh, int smooth);
void *evas_gl_font_texture_new(void *gc, RGBA_Font_Glyph *fg); void *evas_gl_font_texture_new(void *gc, RGBA_Font_Glyph *fg);
void evas_gl_font_texture_free(void *); void evas_gl_font_texture_free(void *);
@ -490,9 +490,9 @@ void evas_gl_font_texture_draw(void *gc, void *surface, void *dc, R
Evas_GL_Polygon *evas_gl_common_poly_point_add(Evas_GL_Polygon *poly, int x, int y); Evas_GL_Polygon *evas_gl_common_poly_point_add(Evas_GL_Polygon *poly, int x, int y);
Evas_GL_Polygon *evas_gl_common_poly_points_clear(Evas_GL_Polygon *poly); Evas_GL_Polygon *evas_gl_common_poly_points_clear(Evas_GL_Polygon *poly);
void evas_gl_common_poly_draw(Evas_GL_Context *gc, Evas_GL_Polygon *poly, int x, int y); void evas_gl_common_poly_draw(Evas_Engine_GL_Context *gc, Evas_GL_Polygon *poly, int x, int y);
void evas_gl_common_line_draw(Evas_GL_Context *gc, int x1, int y1, int x2, int y2); void evas_gl_common_line_draw(Evas_Engine_GL_Context *gc, int x1, int y1, int x2, int y2);
extern void (*glsym_glGenFramebuffers) (GLsizei a, GLuint *b); extern void (*glsym_glGenFramebuffers) (GLsizei a, GLuint *b);
extern void (*glsym_glBindFramebuffer) (GLenum a, GLuint b); extern void (*glsym_glBindFramebuffer) (GLenum a, GLuint b);

View File

@ -107,9 +107,9 @@ gl_symbols(void)
#endif #endif
} }
static void shader_array_flush(Evas_GL_Context *gc); static void shader_array_flush(Evas_Engine_GL_Context *gc);
static Evas_GL_Context *_evas_gl_common_context = NULL; static Evas_Engine_GL_Context *_evas_gl_common_context = NULL;
static Evas_GL_Shared *shared = NULL; static Evas_GL_Shared *shared = NULL;
void void
@ -287,7 +287,7 @@ _evas_gl_common_version_check()
} }
static void static void
_evas_gl_common_viewport_set(Evas_GL_Context *gc) _evas_gl_common_viewport_set(Evas_Engine_GL_Context *gc)
{ {
GLfloat proj[16]; GLfloat proj[16];
int w = 1, h = 1, m = 1, rot = 1, foc = 0; int w = 1, h = 1, m = 1, rot = 1, foc = 0;
@ -470,23 +470,23 @@ _evas_gl_common_viewport_set(Evas_GL_Context *gc)
GLERR(__FUNCTION__, __FILE__, __LINE__, ""); GLERR(__FUNCTION__, __FILE__, __LINE__, "");
} }
Evas_GL_Context * Evas_Engine_GL_Context *
evas_gl_common_context_new(void) evas_gl_common_context_new(void)
{ {
Evas_GL_Context *gc; Evas_Engine_GL_Context *gc;
const char *s; const char *s;
int i; int i;
#if 1 #if 1
if (_evas_gl_common_context) if (_evas_gl_common_context)
{ {
_evas_gl_common_context->references++; _evas_gl_common_context->references++;
return _evas_gl_common_context; return _evas_gl_common_context;
} }
#endif #endif
if (!_evas_gl_common_version_check()) if (!_evas_gl_common_version_check())
return NULL; return NULL;
gc = calloc(1, sizeof(Evas_GL_Context)); gc = calloc(1, sizeof(Evas_Engine_GL_Context));
if (!gc) return NULL; if (!gc) return NULL;
gl_symbols(); gl_symbols();
@ -756,7 +756,7 @@ evas_gl_common_context_new(void)
} }
void void
evas_gl_common_context_free(Evas_GL_Context *gc) evas_gl_common_context_free(Evas_Engine_GL_Context *gc)
{ {
int i, j; int i, j;
Eina_List *l; Eina_List *l;
@ -818,7 +818,7 @@ evas_gl_common_context_free(Evas_GL_Context *gc)
} }
void void
evas_gl_common_context_use(Evas_GL_Context *gc) evas_gl_common_context_use(Evas_Engine_GL_Context *gc)
{ {
if (_evas_gl_common_context == gc) return; if (_evas_gl_common_context == gc) return;
_evas_gl_common_context = gc; _evas_gl_common_context = gc;
@ -826,7 +826,7 @@ evas_gl_common_context_use(Evas_GL_Context *gc)
} }
void void
evas_gl_common_context_newframe(Evas_GL_Context *gc) evas_gl_common_context_newframe(Evas_Engine_GL_Context *gc)
{ {
int i; int i;
@ -930,7 +930,7 @@ evas_gl_common_context_newframe(Evas_GL_Context *gc)
} }
void void
evas_gl_common_context_resize(Evas_GL_Context *gc, int w, int h, int rot) evas_gl_common_context_resize(Evas_Engine_GL_Context *gc, int w, int h, int rot)
{ {
if ((gc->w == w) && (gc->h == h) && (gc->rot == rot)) return; if ((gc->w == w) && (gc->h == h) && (gc->rot == rot)) return;
evas_gl_common_context_flush(gc); evas_gl_common_context_flush(gc);
@ -942,7 +942,7 @@ evas_gl_common_context_resize(Evas_GL_Context *gc, int w, int h, int rot)
} }
void void
evas_gl_common_context_target_surface_set(Evas_GL_Context *gc, evas_gl_common_context_target_surface_set(Evas_Engine_GL_Context *gc,
Evas_GL_Image *surface) Evas_GL_Image *surface)
{ {
if (surface == gc->pipe[0].shader.surface) return; if (surface == gc->pipe[0].shader.surface) return;
@ -1006,7 +1006,7 @@ evas_gl_common_context_target_surface_set(Evas_GL_Context *gc,
gc->pipe[n].array.texuv3[nu3++] = v gc->pipe[n].array.texuv3[nu3++] = v
static inline void static inline void
array_alloc(Evas_GL_Context *gc, int n) array_alloc(Evas_Engine_GL_Context *gc, int n)
{ {
gc->havestuff = EINA_TRUE; gc->havestuff = EINA_TRUE;
if (gc->pipe[n].array.num <= gc->pipe[n].array.alloc) return; if (gc->pipe[n].array.num <= gc->pipe[n].array.alloc) return;
@ -1029,7 +1029,7 @@ array_alloc(Evas_GL_Context *gc, int n)
} }
static int static int
pipe_region_intersects(Evas_GL_Context *gc, int n, pipe_region_intersects(Evas_Engine_GL_Context *gc, int n,
int x, int y, int w, int h) int x, int y, int w, int h)
{ {
int i, rx, ry, rw, rh, ii; int i, rx, ry, rw, rh, ii;
@ -1068,7 +1068,7 @@ pipe_region_intersects(Evas_GL_Context *gc, int n,
} }
static void static void
pipe_region_expand(Evas_GL_Context *gc, int n, pipe_region_expand(Evas_Engine_GL_Context *gc, int n,
int x, int y, int w, int h) int x, int y, int w, int h)
{ {
int x1, y1, x2, y2; int x1, y1, x2, y2;
@ -1096,7 +1096,7 @@ pipe_region_expand(Evas_GL_Context *gc, int n,
} }
static Eina_Bool static Eina_Bool
vertex_array_size_check(Evas_GL_Context *gc, int pn, int n) vertex_array_size_check(Evas_Engine_GL_Context *gc, int pn, int n)
{ {
return 1; return 1;
// this fixup breaks for expedite test 32. why? // this fixup breaks for expedite test 32. why?
@ -1109,7 +1109,7 @@ vertex_array_size_check(Evas_GL_Context *gc, int pn, int n)
} }
void void
evas_gl_common_context_line_push(Evas_GL_Context *gc, evas_gl_common_context_line_push(Evas_Engine_GL_Context *gc,
int x1, int y1, int x2, int y2, int x1, int y1, int x2, int y2,
int clip, int cx, int cy, int cw, int ch, int clip, int cx, int cy, int cw, int ch,
int r, int g, int b, int a) int r, int g, int b, int a)
@ -1165,7 +1165,7 @@ evas_gl_common_context_line_push(Evas_GL_Context *gc,
} }
void void
evas_gl_common_context_rectangle_push(Evas_GL_Context *gc, evas_gl_common_context_rectangle_push(Evas_Engine_GL_Context *gc,
int x, int y, int w, int h, int x, int y, int w, int h,
int r, int g, int b, int a) int r, int g, int b, int a)
{ {
@ -1299,7 +1299,7 @@ again:
} }
void void
evas_gl_common_context_image_push(Evas_GL_Context *gc, evas_gl_common_context_image_push(Evas_Engine_GL_Context *gc,
Evas_GL_Texture *tex, Evas_GL_Texture *tex,
double sx, double sy, double sw, double sh, double sx, double sy, double sw, double sh,
int x, int y, int w, int h, int x, int y, int w, int h,
@ -1540,7 +1540,7 @@ again:
} }
void void
evas_gl_common_context_font_push(Evas_GL_Context *gc, evas_gl_common_context_font_push(Evas_Engine_GL_Context *gc,
Evas_GL_Texture *tex, Evas_GL_Texture *tex,
double sx, double sy, double sw, double sh, double sx, double sy, double sw, double sh,
int x, int y, int w, int h, int x, int y, int w, int h,
@ -1699,7 +1699,7 @@ again:
} }
void void
evas_gl_common_context_yuv_push(Evas_GL_Context *gc, evas_gl_common_context_yuv_push(Evas_Engine_GL_Context *gc,
Evas_GL_Texture *tex, Evas_GL_Texture *tex,
double sx, double sy, double sw, double sh, double sx, double sy, double sw, double sh,
int x, int y, int w, int h, int x, int y, int w, int h,
@ -1886,7 +1886,7 @@ again:
} }
void void
evas_gl_common_context_image_map_push(Evas_GL_Context *gc, evas_gl_common_context_image_map_push(Evas_Engine_GL_Context *gc,
Evas_GL_Texture *tex, Evas_GL_Texture *tex,
int npoints, int npoints,
RGBA_Map_Point *p, RGBA_Map_Point *p,
@ -2281,13 +2281,13 @@ again:
} }
void void
evas_gl_common_context_flush(Evas_GL_Context *gc) evas_gl_common_context_flush(Evas_Engine_GL_Context *gc)
{ {
shader_array_flush(gc); shader_array_flush(gc);
} }
static void static void
shader_array_flush(Evas_GL_Context *gc) shader_array_flush(Evas_Engine_GL_Context *gc)
{ {
int i, gw, gh, setclip, cy, fbo = 0, done = 0; int i, gw, gh, setclip, cy, fbo = 0, done = 0;

View File

@ -3,7 +3,7 @@
void * void *
evas_gl_font_texture_new(void *context, RGBA_Font_Glyph *fg) evas_gl_font_texture_new(void *context, RGBA_Font_Glyph *fg)
{ {
Evas_GL_Context *gc = context; Evas_Engine_GL_Context *gc = context;
Evas_GL_Texture *tex; Evas_GL_Texture *tex;
DATA8 *data; DATA8 *data;
int w, h, j, nw; int w, h, j, nw;
@ -99,7 +99,7 @@ evas_gl_font_texture_free(void *tex)
void void
evas_gl_font_texture_draw(void *context, void *surface __UNUSED__, void *draw_context, RGBA_Font_Glyph *fg, int x, int y) evas_gl_font_texture_draw(void *context, void *surface __UNUSED__, void *draw_context, RGBA_Font_Glyph *fg, int x, int y)
{ {
Evas_GL_Context *gc = context; Evas_Engine_GL_Context *gc = context;
RGBA_Draw_Context *dc = draw_context; RGBA_Draw_Context *dc = draw_context;
Evas_GL_Texture *tex; Evas_GL_Texture *tex;
Cutout_Rects *rects; Cutout_Rects *rects;

View File

@ -1,7 +1,7 @@
#include "evas_gl_private.h" #include "evas_gl_private.h"
void void
evas_gl_common_image_all_unload(Evas_GL_Context *gc) evas_gl_common_image_all_unload(Evas_Engine_GL_Context *gc)
{ {
Eina_List *l; Eina_List *l;
Evas_GL_Image *im; Evas_GL_Image *im;
@ -21,7 +21,7 @@ evas_gl_common_image_all_unload(Evas_GL_Context *gc)
} }
static void static void
_evas_gl_image_cache_trim(Evas_GL_Context *gc) _evas_gl_image_cache_trim(Evas_Engine_GL_Context *gc)
{ {
int size = evas_common_image_get_cache(); int size = evas_common_image_get_cache();
@ -97,7 +97,7 @@ evas_gl_common_image_unref(Evas_GL_Image *im)
} }
Evas_GL_Image * Evas_GL_Image *
evas_gl_common_image_load(Evas_GL_Context *gc, const char *file, const char *key, Evas_Image_Load_Opts *lo, int *error) evas_gl_common_image_load(Evas_Engine_GL_Context *gc, const char *file, const char *key, Evas_Image_Load_Opts *lo, int *error)
{ {
Evas_GL_Image *im; Evas_GL_Image *im;
RGBA_Image *im_im; RGBA_Image *im_im;
@ -142,7 +142,7 @@ evas_gl_common_image_load(Evas_GL_Context *gc, const char *file, const char *key
} }
Evas_GL_Image * Evas_GL_Image *
evas_gl_common_image_new_from_data(Evas_GL_Context *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, int cspace) evas_gl_common_image_new_from_data(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, int cspace)
{ {
Evas_GL_Image *im; Evas_GL_Image *im;
Eina_List *l; Eina_List *l;
@ -196,7 +196,7 @@ evas_gl_common_image_new_from_data(Evas_GL_Context *gc, unsigned int w, unsigned
} }
Evas_GL_Image * Evas_GL_Image *
evas_gl_common_image_new_from_copied_data(Evas_GL_Context *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, int cspace) evas_gl_common_image_new_from_copied_data(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, int cspace)
{ {
Evas_GL_Image *im; Evas_GL_Image *im;
@ -237,7 +237,7 @@ evas_gl_common_image_new_from_copied_data(Evas_GL_Context *gc, unsigned int w, u
} }
Evas_GL_Image * Evas_GL_Image *
evas_gl_common_image_new(Evas_GL_Context *gc, unsigned int w, unsigned int h, int alpha, int cspace) evas_gl_common_image_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha, int cspace)
{ {
Evas_GL_Image *im; Evas_GL_Image *im;
@ -425,7 +425,7 @@ evas_gl_common_image_content_hint_set(Evas_GL_Image *im, int hint)
} }
void void
evas_gl_common_image_cache_flush(Evas_GL_Context *gc) evas_gl_common_image_cache_flush(Evas_Engine_GL_Context *gc)
{ {
_evas_gl_image_cache_trim(gc); _evas_gl_image_cache_trim(gc);
} }
@ -453,7 +453,7 @@ evas_gl_common_image_free(Evas_GL_Image *im)
} }
Evas_GL_Image * Evas_GL_Image *
evas_gl_common_image_surface_new(Evas_GL_Context *gc, unsigned int w, unsigned int h, int alpha) evas_gl_common_image_surface_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha)
{ {
Evas_GL_Image *im; Evas_GL_Image *im;
@ -486,7 +486,7 @@ evas_gl_common_image_dirty(Evas_GL_Image *im, unsigned int x, unsigned int y, un
} }
static void static void
_evas_gl_common_image_update(Evas_GL_Context *gc, Evas_GL_Image *im) _evas_gl_common_image_update(Evas_Engine_GL_Context *gc, Evas_GL_Image *im)
{ {
if (!im->im) return; if (!im->im) return;
/* /*
@ -553,7 +553,7 @@ _evas_gl_common_image_update(Evas_GL_Context *gc, Evas_GL_Image *im)
} }
void void
evas_gl_common_image_map_draw(Evas_GL_Context *gc, Evas_GL_Image *im, evas_gl_common_image_map_draw(Evas_Engine_GL_Context *gc, Evas_GL_Image *im,
int npoints, RGBA_Map_Point *p, int smooth, int level __UNUSED__) int npoints, RGBA_Map_Point *p, int smooth, int level __UNUSED__)
{ {
RGBA_Draw_Context *dc; RGBA_Draw_Context *dc;
@ -590,7 +590,7 @@ evas_gl_common_image_map_draw(Evas_GL_Context *gc, Evas_GL_Image *im,
} }
void void
evas_gl_common_image_draw(Evas_GL_Context *gc, Evas_GL_Image *im, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh, int smooth) evas_gl_common_image_draw(Evas_Engine_GL_Context *gc, Evas_GL_Image *im, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh, int smooth)
{ {
RGBA_Draw_Context *dc; RGBA_Draw_Context *dc;
int r, g, b, a; int r, g, b, a;

View File

@ -1,7 +1,7 @@
#include "evas_gl_private.h" #include "evas_gl_private.h"
void void
evas_gl_common_line_draw(Evas_GL_Context *gc, int x1, int y1, int x2, int y2) evas_gl_common_line_draw(Evas_Engine_GL_Context *gc, int x1, int y1, int x2, int y2)
{ {
RGBA_Draw_Context *dc; RGBA_Draw_Context *dc;
int r, g, b, a; int r, g, b, a;

View File

@ -120,7 +120,7 @@ polygon_edge_sorter(const void *a, const void *b)
} }
void void
evas_gl_common_poly_draw(Evas_GL_Context *gc, Evas_GL_Polygon *poly, int dx, int dy) evas_gl_common_poly_draw(Evas_Engine_GL_Context *gc, Evas_GL_Polygon *poly, int dx, int dy)
{ {
Cutout_Rects *rects; Cutout_Rects *rects;
Cutout_Rect *r; Cutout_Rect *r;

View File

@ -1,7 +1,7 @@
#include "evas_gl_private.h" #include "evas_gl_private.h"
void void
evas_gl_common_rect_draw(Evas_GL_Context *gc, int x, int y, int w, int h) evas_gl_common_rect_draw(Evas_Engine_GL_Context *gc, int x, int y, int w, int h)
{ {
Cutout_Rects *rects; Cutout_Rects *rects;
Cutout_Rect *r; Cutout_Rect *r;

View File

@ -63,7 +63,7 @@ _nearest_pow2(int num)
} }
static void static void
_tex_adjust(Evas_GL_Context *gc, int *w, int *h) _tex_adjust(Evas_Engine_GL_Context *gc, int *w, int *h)
{ {
if (gc->shared->info.tex_npo2) return; if (gc->shared->info.tex_npo2) return;
/*if (gc->shared->info.tex_rect) return;*/ /*if (gc->shared->info.tex_rect) return;*/
@ -72,7 +72,7 @@ _tex_adjust(Evas_GL_Context *gc, int *w, int *h)
} }
static int static int
_tex_round_slot(Evas_GL_Context *gc, int h) _tex_round_slot(Evas_Engine_GL_Context *gc, int h)
{ {
if (!gc->shared->info.tex_npo2) if (!gc->shared->info.tex_npo2)
h = _nearest_pow2(h); h = _nearest_pow2(h);
@ -117,7 +117,7 @@ _tex_sub_2d(int x, int y, int w, int h, int fmt, int type, const void *pix)
} }
static Evas_GL_Texture_Pool * static Evas_GL_Texture_Pool *
_pool_tex_new(Evas_GL_Context *gc, int w, int h, int intformat, GLenum format) _pool_tex_new(Evas_Engine_GL_Context *gc, int w, int h, int intformat, GLenum format)
{ {
Evas_GL_Texture_Pool *pt; Evas_GL_Texture_Pool *pt;
@ -215,7 +215,7 @@ _pool_tex_alloc(Evas_GL_Texture_Pool *pt, int w, int h __UNUSED__, int *u, int *
} }
static Evas_GL_Texture_Pool * static Evas_GL_Texture_Pool *
_pool_tex_find(Evas_GL_Context *gc, int w, int h, _pool_tex_find(Evas_Engine_GL_Context *gc, int w, int h,
int intformat, int format, int *u, int *v, int intformat, int format, int *u, int *v,
Eina_List **l_after, int atlas_w) Eina_List **l_after, int atlas_w)
{ {
@ -264,7 +264,7 @@ _pool_tex_find(Evas_GL_Context *gc, int w, int h,
} }
Evas_GL_Texture * Evas_GL_Texture *
evas_gl_common_texture_new(Evas_GL_Context *gc, RGBA_Image *im) evas_gl_common_texture_new(Evas_Engine_GL_Context *gc, RGBA_Image *im)
{ {
Evas_GL_Texture *tex; Evas_GL_Texture *tex;
Eina_List *l_after = NULL; Eina_List *l_after = NULL;
@ -331,7 +331,7 @@ evas_gl_common_texture_new(Evas_GL_Context *gc, RGBA_Image *im)
} }
static Evas_GL_Texture_Pool * static Evas_GL_Texture_Pool *
_pool_tex_render_new(Evas_GL_Context *gc, int w, int h, int intformat, int format) _pool_tex_render_new(Evas_Engine_GL_Context *gc, int w, int h, int intformat, int format)
{ {
Evas_GL_Texture_Pool *pt; Evas_GL_Texture_Pool *pt;
@ -396,7 +396,7 @@ _pool_tex_render_new(Evas_GL_Context *gc, int w, int h, int intformat, int forma
} }
static Evas_GL_Texture_Pool * static Evas_GL_Texture_Pool *
_pool_tex_native_new(Evas_GL_Context *gc, int w, int h, int intformat, int format, Evas_GL_Image *im) _pool_tex_native_new(Evas_Engine_GL_Context *gc, int w, int h, int intformat, int format, Evas_GL_Image *im)
{ {
Evas_GL_Texture_Pool *pt; Evas_GL_Texture_Pool *pt;
@ -457,7 +457,7 @@ _pool_tex_native_new(Evas_GL_Context *gc, int w, int h, int intformat, int forma
} }
static Evas_GL_Texture_Pool * static Evas_GL_Texture_Pool *
_pool_tex_dynamic_new(Evas_GL_Context *gc, int w, int h, int intformat, int format) _pool_tex_dynamic_new(Evas_Engine_GL_Context *gc, int w, int h, int intformat, int format)
{ {
Evas_GL_Texture_Pool *pt = NULL; Evas_GL_Texture_Pool *pt = NULL;
@ -696,7 +696,7 @@ pt_unref(Evas_GL_Texture_Pool *pt)
} }
Evas_GL_Texture * Evas_GL_Texture *
evas_gl_common_texture_native_new(Evas_GL_Context *gc, unsigned int w, unsigned int h, int alpha, Evas_GL_Image *im) evas_gl_common_texture_native_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha, Evas_GL_Image *im)
{ {
Evas_GL_Texture *tex; Evas_GL_Texture *tex;
@ -734,7 +734,7 @@ evas_gl_common_texture_native_new(Evas_GL_Context *gc, unsigned int w, unsigned
} }
Evas_GL_Texture * Evas_GL_Texture *
evas_gl_common_texture_render_new(Evas_GL_Context *gc, unsigned int w, unsigned int h, int alpha) evas_gl_common_texture_render_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha)
{ {
Evas_GL_Texture *tex; Evas_GL_Texture *tex;
@ -772,7 +772,7 @@ evas_gl_common_texture_render_new(Evas_GL_Context *gc, unsigned int w, unsigned
} }
Evas_GL_Texture * Evas_GL_Texture *
evas_gl_common_texture_dynamic_new(Evas_GL_Context *gc, Evas_GL_Image *im) evas_gl_common_texture_dynamic_new(Evas_Engine_GL_Context *gc, Evas_GL_Image *im)
{ {
Evas_GL_Texture *tex; Evas_GL_Texture *tex;
@ -916,7 +916,7 @@ evas_gl_common_texture_free(Evas_GL_Texture *tex)
} }
Evas_GL_Texture * Evas_GL_Texture *
evas_gl_common_texture_alpha_new(Evas_GL_Context *gc, DATA8 *pixels, evas_gl_common_texture_alpha_new(Evas_Engine_GL_Context *gc, DATA8 *pixels,
unsigned int w, unsigned int h, int fh) unsigned int w, unsigned int h, int fh)
{ {
Evas_GL_Texture *tex; Evas_GL_Texture *tex;
@ -973,7 +973,7 @@ evas_gl_common_texture_alpha_update(Evas_GL_Texture *tex, DATA8 *pixels,
} }
Evas_GL_Texture * Evas_GL_Texture *
evas_gl_common_texture_yuv_new(Evas_GL_Context *gc, DATA8 **rows, unsigned int w, unsigned int h) evas_gl_common_texture_yuv_new(Evas_Engine_GL_Context *gc, DATA8 **rows, unsigned int w, unsigned int h)
{ {
Evas_GL_Texture *tex; Evas_GL_Texture *tex;

View File

@ -48,7 +48,7 @@ struct _Evas_GL_Glew_Window
int width; int width;
int height; int height;
int depth; int depth;
Evas_GL_Context *gl_context; Evas_Engine_GL_Context *gl_context;
struct { struct {
int x1; int x1;
int y1; int y1;

View File

@ -55,7 +55,7 @@ struct _Render_Engine
Evas_Engine_Info_GL_SDL *info; Evas_Engine_Info_GL_SDL *info;
int w, h; int w, h;
Evas_GL_Context *gl_context; Evas_Engine_GL_Context *gl_context;
struct { struct {
int redraw : 1; int redraw : 1;
int drew : 1; int drew : 1;

View File

@ -82,7 +82,7 @@ struct _Evas_GL_X11_Window
int depth; int depth;
int alpha; int alpha;
int rot; int rot;
Evas_GL_Context *gl_context; Evas_Engine_GL_Context *gl_context;
struct { struct {
int redraw : 1; int redraw : 1;
int drew : 1; int drew : 1;