From 2b191b3c51e75f9a97612b1ad324ecdf496aa031 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Mon, 30 Jun 2014 15:37:03 +0900 Subject: [PATCH] Evas loader: Introduce border param --- src/lib/evas/Evas_Loader.h | 4 ++++ src/lib/evas/include/evas_common_private.h | 5 +++++ src/modules/evas/loaders/tgv/evas_image_load_tgv.c | 4 ++++ 3 files changed, 13 insertions(+) diff --git a/src/lib/evas/Evas_Loader.h b/src/lib/evas/Evas_Loader.h index c3e7fe153a..1b74253553 100644 --- a/src/lib/evas/Evas_Loader.h +++ b/src/lib/evas/Evas_Loader.h @@ -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 diff --git a/src/lib/evas/include/evas_common_private.h b/src/lib/evas/include/evas_common_private.h index 1470ca5e6a..b1cc92e944 100644 --- a/src/lib/evas/include/evas_common_private.h +++ b/src/lib/evas/include/evas_common_private.h @@ -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; diff --git a/src/modules/evas/loaders/tgv/evas_image_load_tgv.c b/src/modules/evas/loaders/tgv/evas_image_load_tgv.c index c5aa3b7a15..7ff0fc3954 100644 --- a/src/modules/evas/loaders/tgv/evas_image_load_tgv.c +++ b/src/modules/evas/loaders/tgv/evas_image_load_tgv.c @@ -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;