diff options
author | Cedric Bail <cedric.bail@samsung.com> | 2013-05-29 13:06:47 +0900 |
---|---|---|
committer | Cedric Bail <cedric.bail@samsung.com> | 2013-05-29 13:13:17 +0900 |
commit | 8e3b72b4ba662c1a3a6387a5bb0f6a2eb6caf3b4 (patch) | |
tree | 14c85067cc930fa115fe802f53f645c98feeebae | |
parent | dddb849834194ba8332470f50a31489541b036dd (diff) | |
download | efl-devs/cedric/map_atlas.tar.gz |
evas: round texture allocation to tile size.devs/cedric/map_atlas
-rw-r--r-- | src/modules/evas/engines/gl_x11/evas_engine.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/modules/evas/engines/gl_x11/evas_engine.c b/src/modules/evas/engines/gl_x11/evas_engine.c index 749dfa8387..3ac0430eda 100644 --- a/src/modules/evas/engines/gl_x11/evas_engine.c +++ b/src/modules/evas/engines/gl_x11/evas_engine.c @@ -2909,6 +2909,16 @@ eng_image_map_surface_new(void *data, int w, int h, int alpha) { Render_Engine *re; +#define ROUND_TO_TILE(Value) \ + Value = ((Value % EVAS_GL_UPDATE_TILE_SIZE) == 0) ? \ + (Value / EVAS_GL_UPDATE_TILE_SIZE) * EVAS_GL_UPDATE_TILE_SIZE : \ + ((Value / EVAS_GL_UPDATE_TILE_SIZE) + 1) * EVAS_GL_UPDATE_TILE_SIZE; + + ROUND_TO_TILE(w); + ROUND_TO_TILE(h); + +#undef ROUND_TO_TILE + re = (Render_Engine *)data; return evas_gl_common_image_surface_new(re->win->gl_context, w, h, alpha); } |