On Fri, 21 Oct 2011, Enlightenment SVN wrote:
> Log: > add call to get maximum image size (eg max texture size) changelog, and @since in the doc Vincent > > > > Author: raster > Date: 2011-10-21 01:17:14 -0700 (Fri, 21 Oct 2011) > New Revision: 64244 > Trac: http://trac.enlightenment.org/e/changeset/64244 > > Modified: > trunk/evas/src/lib/Evas.h trunk/evas/src/lib/canvas/evas_object_image.c > trunk/evas/src/lib/include/evas_private.h > trunk/evas/src/modules/engines/gl_x11/evas_engine.c > > Modified: trunk/evas/src/lib/Evas.h > =================================================================== > --- trunk/evas/src/lib/Evas.h 2011-10-21 07:25:02 UTC (rev 64243) > +++ trunk/evas/src/lib/Evas.h 2011-10-21 08:17:14 UTC (rev 64244) > @@ -2653,22 +2653,38 @@ > * @param e The given evas pointer. > * @param size The cache size. > * > - * This function sets the image cache of canvas. > + * This function sets the image cache of canvas in bytes. > * > */ > EAPI void evas_image_cache_set (Evas *e, int size) > EINA_ARG_NONNULL(1); > > /** > - * Set the image cache > + * Get the image cache > * > * @param e The given evas pointer. > * > - * This function returns the image cache of canvas. > + * This function returns the image cache size of canvas in bytes. > * > */ > EAPI int evas_image_cache_get (const Evas *e) > EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; > > /** > + * Get the maximum image size evas can possibly handle > + * > + * @param e The given evas pointer. > + * @param maxw Pointer to hold the return value in pixels of the maxumum > width > + * @param maxh Pointer to hold the return value in pixels of the maximum > height > + * > + * This function returns the larges image or surface size that evas can > handle > + * in pixels, and if there is one, returns EINA_TRUE. It returns EINA_FALSE > + * if no extra constraint on maximum image size exists. You still should > + * check the return values of @p maxw and @p maxh as there may still be a > + * limit, just a much higher one. > + * > + */ > +EAPI Eina_Bool evas_image_max_size_get (const Evas *e, int > *maxw, int *maxh) EINA_ARG_NONNULL(1) EINA_PURE; > + > +/** > * @} > */ > > > Modified: trunk/evas/src/lib/canvas/evas_object_image.c > =================================================================== > --- trunk/evas/src/lib/canvas/evas_object_image.c 2011-10-21 07:25:02 UTC > (rev 64243) > +++ trunk/evas/src/lib/canvas/evas_object_image.c 2011-10-21 08:17:14 UTC > (rev 64244) > @@ -2139,6 +2139,23 @@ > return e->engine.func->image_cache_get(e->engine.data.output); > } > > +EAPI Eina_Bool > +evas_image_max_size_get(const Evas *e, int *maxw, int *maxh) > +{ > + int w = 0, h = 0; > + MAGIC_CHECK(e, Evas, MAGIC_EVAS); > + return EINA_FALSE; > + MAGIC_CHECK_END(); > + > + if (maxw) *maxw = 0xffff; > + if (maxh) *maxh = 0xffff; > + if (!e->engine.func->image_max_size_get) return EINA_FALSE; > + e->engine.func->image_max_size_get(e->engine.data.output, &w, &h); > + if (maxw) *maxw = w; > + if (maxh) *maxh = h; > + return EINA_TRUE; > +} > + > /* all nice and private */ > static void > _proxy_unset(Evas_Object *proxy) > > Modified: trunk/evas/src/lib/include/evas_private.h > =================================================================== > --- trunk/evas/src/lib/include/evas_private.h 2011-10-21 07:25:02 UTC (rev > 64243) > +++ trunk/evas/src/lib/include/evas_private.h 2011-10-21 08:17:14 UTC (rev > 64244) > @@ -834,6 +834,9 @@ > int (*image_animated_loop_count_get) (void *data, void *image); > double (*image_animated_frame_duration_get) (void *data, void *image, int > start_frame, int frame_num); > Eina_Bool (*image_animated_frame_set) (void *data, void *image, int > frame_index); > + > + /* max size query */ > + void (*image_max_size_get) (void *data, int *maxw, int *maxh); > }; > > struct _Evas_Image_Load_Func > > Modified: trunk/evas/src/modules/engines/gl_x11/evas_engine.c > =================================================================== > --- trunk/evas/src/modules/engines/gl_x11/evas_engine.c 2011-10-21 > 07:25:02 UTC (rev 64243) > +++ trunk/evas/src/modules/engines/gl_x11/evas_engine.c 2011-10-21 > 08:17:14 UTC (rev 64244) > @@ -3764,6 +3764,14 @@ > return EINA_TRUE; > } > > +static void > +eng_image_max_size_get(void *data, int *maxw, int *maxh) > +{ > + Render_Engine *re = (Render_Engine *)data; > + if (maxw) *maxw = re->win->gl_context->shared->info.max_texture_size; > + if (maxh) *maxh = re->win->gl_context->shared->info.max_texture_size; > +} > + > static int > module_open(Evas_Module *em) > { > @@ -3880,6 +3888,8 @@ > ORD(image_animated_frame_duration_get); > ORD(image_animated_frame_set); > > + ORD(image_max_size_get); > + > /* now advertise out own api */ > em->functions = (void *)(&func); > return 1; > > > ------------------------------------------------------------------------------ > The demand for IT networking professionals continues to grow, and the > demand for specialized networking skills is growing even more rapidly. > Take a complimentary Learning@Cisco Self-Assessment and learn > about Cisco certifications, training, and career opportunities. > http://p.sf.net/sfu/cisco-dev2dev > _______________________________________________ > enlightenment-svn mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn > > ------------------------------------------------------------------------------ The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
