Evas loader: Introduce border param

This commit is contained in:
Jean-Philippe Andre 2014-06-30 15:37:03 +09:00
parent 8c80b1a7f4
commit 2b191b3c51
3 changed files with 13 additions and 0 deletions

View File

@ -181,6 +181,10 @@ struct _Evas_Image_Property
const Evas_Colorspace *cspaces; /**< Specify the color space handled by the loader @since 1.10 */
Evas_Colorspace cspace; /**< Specify the color space handle by the engine @since 1.10 */
struct {
unsigned char l, r, t, b; /**< Specify the dimensions of duplicated pixels borders (for OpenGL compressed textures). Set by the loader. @since 1.11 */
} borders;
};
struct _Evas_Image_Animated

View File

@ -607,6 +607,11 @@ struct _Image_Entry
unsigned int h;
} allocated;
struct
{
unsigned char l, r, t, b;
} borders; // Duplicated borders for use by GL engines.
struct
{
Evas_Module *module;

View File

@ -239,6 +239,10 @@ evas_image_load_file_head_tgv(void *loader_data,
prop->w = loader->size.width;
prop->h = loader->size.height;
prop->borders.l = 1;
prop->borders.t = 1;
prop->borders.r = roundup(loader->size.width + 2, 4) - prop->w - 1;
prop->borders.b = roundup(loader->size.height + 2, 4) - prop->h - 1;
ret = EINA_TRUE;