Mike Emmel wrote:
> On 7/23/06, Claudio Ciccani <[EMAIL PROTECTED]> wrote:
>> Mike Emmel wrote:
>> > Attached are the changes to add Get/SetProperty to window.
>> >
>> > Plus I added passing in a desc for create subsurface
>> >
>> > --- directfb.h 17 Jul 2006 13:12:21 -0000 1.304
>> > +++ directfb.h 22 Jul 2006 23:33:45 -0000
>> > @@ -3457,6 +3457,7 @@
>> > */
>> > DFBResult (*GetSubSurface) (
>> > IDirectFBSurface *thiz,
>> > + const DFBSurfaceDescription *desc,
>> > const DFBRectangle *rect,
>> > IDirectFBSurface **ret_interface
>> > );
>> >
>> >
>> > I'm working now on figuring out how to add double buffering to
>> subsurfaces
>> > but this gets the api right for allowing subsurfaces to be equal to
>> > "real" surfaces.
>>
>> ...
>>
>> >
>> > ===================================================================
>> > RCS file: /cvs/directfb/DirectFB/src/display/idirectfbsurface.c,v
>> > retrieving revision 1.117
>> > diff -u -r1.117 idirectfbsurface.c
>> > --- src/display/idirectfbsurface.c 23 Jun 2006 06:01:37
>> -0000 1.117
>> > +++ src/display/idirectfbsurface.c 22 Jul 2006 23:32:50 -0000
>> > @@ -1920,6 +1920,7 @@
>> >
>> > static DFBResult
>> > IDirectFBSurface_GetSubSurface( IDirectFBSurface *thiz,
>> > + const DFBSurfaceDescription *desc,
>> > const DFBRectangle *rect,
>> > IDirectFBSurface **surface )
>> > {
>> > @@ -1936,6 +1937,9 @@
>> > if (!surface)
>> > return DFB_INVARG;
>> >
>> > + if (desc && desc->flags & DSDESC_CAPS)
>> > + data->caps = desc->caps;
>> > +
>>
>> You can't change the subsurface's capabilities this way.
>> Moreover adding double-buffering to a subsurface is the same as creating
>> a new surface; this may lead the application to run in
>> out-of-video-memory.
>>
>
> The implementation was not "real" code yet I was just playing there.
> I have it implemented now and fixed that.
>
> And yes thats correct it may run in out-of video memory.
> Thats up to the application they can try to buffer up in video and if
> it fails choose to buffer in main memory or not buffer.
>
> There is nothing wrong with using up the vram if you want to.
>
> Mike
>
I mean that an application expects that a subsurface will not allocate
new memory since, by definition, it's only a portion of an existing
surface. Thus there should be a way to specify if you want a backing
store or not.
Maybe
IDirectFBSurface::GetSubSurface( DFBRectangle *rect,
DFBBoolean backing_store )
or (without affecting GetSubSurface())
IDirectFBSurface::SetBackingStore( IDirectFBSurface *storage )
or something similar.
These are only suggestions, maybe you have already implemented a
similar thing in your "real" code. Please, let me know.
--
Regards,
Claudio Ciccani
[EMAIL PROTECTED]
http://directfb.org
http://sf.net/projects/php-directfb
_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev