You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Stefano Mazzocchi <st...@apache.org> on 2006/02/11 18:08:55 UTC

Using Cairo for Harmony graphic stuff? [was Re: Using APR for Harmony's native link to the OS?]

Ryan Bloom wrote:
> As one of the original authors of APR, I would like to suggest that
> instead of using OS dependant native code, when we get to the point of
> writing awt, we should create an apr-window project, and create the
> library for the abstraction layer.  I have had enough conversations
> with other APR developers to be relatively certain that this idea
> would be well received.

Hi Ryan, nice to see you around here.

I'm happy that Enrico has changed his mind about APR and I would also be 
in favor of harmony committing back code to APR.

Another think that I wonder, for the windowing stuff, why don't we use 
Cairo[1]?

Firefox 2.0 is going to be based on it, so you would expect lots of 
polishing/fixing/profiling/OS-portability going on on that front that we 
would just reuse and it's dual-licensed under LGPL or MPL 1.1, so if we 
release it under the MPL 1.1 license it's also compatible.

What do you think?

[1] http://cairographics.org/

-- 
Stefano.


Re: Using Cairo for Harmony graphic stuff?

Posted by Leo Simons <ma...@leosimons.com>.
On Sat, Feb 11, 2006 at 12:08:55PM -0500, Stefano Mazzocchi wrote:
> Ryan Bloom wrote:
> >As one of the original authors of APR, I would like to suggest that
> >instead of using OS dependant native code, when we get to the point of
> >writing awt, we should create an apr-window project, and create the
> >library for the abstraction layer.  I have had enough conversations
> >with other APR developers to be relatively certain that this idea
> >would be well received.

Whoah, that's a load of work you're describing there! :-)

> Hi Ryan, nice to see you around here.
> 
> I'm happy that Enrico has changed his mind about APR and I would also be 
> in favor of harmony committing back code to APR.
> 
> Another think that I wonder, for the windowing stuff, why don't we use 
> Cairo[1]?
> 
> Firefox 2.0 is going to be based on it, so you would expect lots of 
> polishing/fixing/profiling/OS-portability going on on that front that we 
> would just reuse and it's dual-licensed under LGPL or MPL 1.1, so if we 
> release it under the MPL 1.1 license it's also compatible.
> 
> What do you think?

Thought about it. I would've mention that the Java-GNOME people are
working on an AWT peer for Cairo and have a sizeable amount of the 
java bindings already done (http://cvs.cairographics.org/cairo-java/),
but I don't wan't to cause more mudslinging...

- LSD


Re: Using Cairo for Harmony graphic stuff?

Posted by Stefano Mazzocchi <st...@apache.org>.
Tim Ellison wrote:
> ... or the sound a user makes when they see a Swing app start up.

ROTFL :-)

> Tim
> 
> Davanum Srinivas wrote:
>> Pluggable look and feel
>> (http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/plaf/package-summary.html)
>>
>> -- dims
>>
>> On 2/14/06, Stefano Mazzocchi <st...@apache.org> wrote:
>>> Anton Avtamonov wrote:
>>>> Yeah, thank you Tim.
>>>>
>>>> I also thought about SwingWT when saw Stefano's letter.
>>>> Unfortunately such approach have serious problem with supporting PLAF
>>>> concept, as I know :-(, but really very fast (thanks to swt :-))
>>> what's PLAF?
>>>
>>>> --
>>>> Anton Avtamonov,
>>>> Intel Middleware Products Division
>>>>
>>>>
>>>> On 2/13/06, Tim Ellison <t....@gmail.com> wrote:
>>>>> http://swingwt.sourceforge.net/
>>>>>
>>>>> (I merely mention it, not recommending it)
>>>>>
>>>>> Regards,
>>>>> Tim
>>>>>
>>>>> Stefano Mazzocchi wrote:
>>>>>> Anton Avtamonov wrote:
>>>>>>> On 2/13/06, Stefano Mazzocchi <st...@apache.org> wrote:
>>>>>>> [snip]
>>>>>>>> The other thing to consider is to follow apple's advice and implement
>>>>>>>> Swing using native widgets. I don't know what this entails in terms of
>>>>>>>> complexity but I always found stupid that swing is barely scratching the
>>>>>>>> surface of what my GPU accelerator could do for me.
>>>>>>>>
>>>>>>> [snip]
>>>>>>>> --
>>>>>>>> Stefano.
>>>>>>>>
>>>>>>> Hi Stefano,
>>>>>>>
>>>>>>> Am I right you propose to implement Swing on native widgets? I mean
>>>>>>> using real native push buttons, etc. and get rid of 'standard' Swing
>>>>>>> approach to have lightweight platform-independent stuff? Sorry if I
>>>>>>> caught you wrong...
>>>>>> I don't even know what I'm saying myself :-)
>>>>>>
>>>>>> All I know is that I want something fast that feels as solid as SWT on
>>>>>> windows or swing/java2d on macosx.
>>>>>>
>>>>>> Unfortunately, I don't think I know enough how to figure out how to get
>>>>>> there though, but I suspect you guys do ;-)
>>>>>>
>>>>> --
>>>>>
>>>>> Tim Ellison (t.p.ellison@gmail.com)
>>>>> IBM Java technology centre, UK.
>>>>>
>>> --
>>> Stefano.
>>>
>>>
>>
>> --
>> Davanum Srinivas : http://wso2.com/blogs/
>>
> 


-- 
Stefano.


Re: Using Cairo for Harmony graphic stuff?

Posted by Tim Ellison <t....@gmail.com>.
... or the sound a user makes when they see a Swing app start up.

Tim

Davanum Srinivas wrote:
> Pluggable look and feel
> (http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/plaf/package-summary.html)
> 
> -- dims
> 
> On 2/14/06, Stefano Mazzocchi <st...@apache.org> wrote:
>> Anton Avtamonov wrote:
>>> Yeah, thank you Tim.
>>>
>>> I also thought about SwingWT when saw Stefano's letter.
>>> Unfortunately such approach have serious problem with supporting PLAF
>>> concept, as I know :-(, but really very fast (thanks to swt :-))
>> what's PLAF?
>>
>>> --
>>> Anton Avtamonov,
>>> Intel Middleware Products Division
>>>
>>>
>>> On 2/13/06, Tim Ellison <t....@gmail.com> wrote:
>>>> http://swingwt.sourceforge.net/
>>>>
>>>> (I merely mention it, not recommending it)
>>>>
>>>> Regards,
>>>> Tim
>>>>
>>>> Stefano Mazzocchi wrote:
>>>>> Anton Avtamonov wrote:
>>>>>> On 2/13/06, Stefano Mazzocchi <st...@apache.org> wrote:
>>>>>> [snip]
>>>>>>> The other thing to consider is to follow apple's advice and implement
>>>>>>> Swing using native widgets. I don't know what this entails in terms of
>>>>>>> complexity but I always found stupid that swing is barely scratching the
>>>>>>> surface of what my GPU accelerator could do for me.
>>>>>>>
>>>>>> [snip]
>>>>>>> --
>>>>>>> Stefano.
>>>>>>>
>>>>>> Hi Stefano,
>>>>>>
>>>>>> Am I right you propose to implement Swing on native widgets? I mean
>>>>>> using real native push buttons, etc. and get rid of 'standard' Swing
>>>>>> approach to have lightweight platform-independent stuff? Sorry if I
>>>>>> caught you wrong...
>>>>> I don't even know what I'm saying myself :-)
>>>>>
>>>>> All I know is that I want something fast that feels as solid as SWT on
>>>>> windows or swing/java2d on macosx.
>>>>>
>>>>> Unfortunately, I don't think I know enough how to figure out how to get
>>>>> there though, but I suspect you guys do ;-)
>>>>>
>>>> --
>>>>
>>>> Tim Ellison (t.p.ellison@gmail.com)
>>>> IBM Java technology centre, UK.
>>>>
>>
>> --
>> Stefano.
>>
>>
> 
> 
> --
> Davanum Srinivas : http://wso2.com/blogs/
> 

-- 

Tim Ellison (t.p.ellison@gmail.com)
IBM Java technology centre, UK.

Re: Using Cairo for Harmony graphic stuff?

Posted by Davanum Srinivas <da...@gmail.com>.
Pluggable look and feel
(http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/plaf/package-summary.html)

-- dims

On 2/14/06, Stefano Mazzocchi <st...@apache.org> wrote:
> Anton Avtamonov wrote:
> > Yeah, thank you Tim.
> >
> > I also thought about SwingWT when saw Stefano's letter.
> > Unfortunately such approach have serious problem with supporting PLAF
> > concept, as I know :-(, but really very fast (thanks to swt :-))
>
> what's PLAF?
>
> >
> > --
> > Anton Avtamonov,
> > Intel Middleware Products Division
> >
> >
> > On 2/13/06, Tim Ellison <t....@gmail.com> wrote:
> >> http://swingwt.sourceforge.net/
> >>
> >> (I merely mention it, not recommending it)
> >>
> >> Regards,
> >> Tim
> >>
> >> Stefano Mazzocchi wrote:
> >>> Anton Avtamonov wrote:
> >>>> On 2/13/06, Stefano Mazzocchi <st...@apache.org> wrote:
> >>>> [snip]
> >>>>> The other thing to consider is to follow apple's advice and implement
> >>>>> Swing using native widgets. I don't know what this entails in terms of
> >>>>> complexity but I always found stupid that swing is barely scratching the
> >>>>> surface of what my GPU accelerator could do for me.
> >>>>>
> >>>> [snip]
> >>>>> --
> >>>>> Stefano.
> >>>>>
> >>>> Hi Stefano,
> >>>>
> >>>> Am I right you propose to implement Swing on native widgets? I mean
> >>>> using real native push buttons, etc. and get rid of 'standard' Swing
> >>>> approach to have lightweight platform-independent stuff? Sorry if I
> >>>> caught you wrong...
> >>> I don't even know what I'm saying myself :-)
> >>>
> >>> All I know is that I want something fast that feels as solid as SWT on
> >>> windows or swing/java2d on macosx.
> >>>
> >>> Unfortunately, I don't think I know enough how to figure out how to get
> >>> there though, but I suspect you guys do ;-)
> >>>
> >> --
> >>
> >> Tim Ellison (t.p.ellison@gmail.com)
> >> IBM Java technology centre, UK.
> >>
>
>
> --
> Stefano.
>
>


--
Davanum Srinivas : http://wso2.com/blogs/

Re: Using Cairo for Harmony graphic stuff?

Posted by Davanum Srinivas <da...@gmail.com>.
hehe :) good one for those uninitiated...that's with an 'i' like so
(http://images.google.com/images?hl=en&q=pilaf)

-- dims

On 2/14/06, Geir Magnusson Jr <ge...@pobox.com> wrote:
> Isn't it a rice dish?
>
> Stefano Mazzocchi wrote:
> > Anton Avtamonov wrote:
> >> Yeah, thank you Tim.
> >>
> >> I also thought about SwingWT when saw Stefano's letter.
> >> Unfortunately such approach have serious problem with supporting PLAF
> >> concept, as I know :-(, but really very fast (thanks to swt :-))
> >
> > what's PLAF?
> >
> >>
> >> --
> >> Anton Avtamonov,
> >> Intel Middleware Products Division
> >>
> >>
> >> On 2/13/06, Tim Ellison <t....@gmail.com> wrote:
> >>> http://swingwt.sourceforge.net/
> >>>
> >>> (I merely mention it, not recommending it)
> >>>
> >>> Regards,
> >>> Tim
> >>>
> >>> Stefano Mazzocchi wrote:
> >>>> Anton Avtamonov wrote:
> >>>>> On 2/13/06, Stefano Mazzocchi <st...@apache.org> wrote:
> >>>>> [snip]
> >>>>>> The other thing to consider is to follow apple's advice and implement
> >>>>>> Swing using native widgets. I don't know what this entails in
> >>>>>> terms of
> >>>>>> complexity but I always found stupid that swing is barely
> >>>>>> scratching the
> >>>>>> surface of what my GPU accelerator could do for me.
> >>>>>>
> >>>>> [snip]
> >>>>>> --
> >>>>>> Stefano.
> >>>>>>
> >>>>> Hi Stefano,
> >>>>>
> >>>>> Am I right you propose to implement Swing on native widgets? I mean
> >>>>> using real native push buttons, etc. and get rid of 'standard' Swing
> >>>>> approach to have lightweight platform-independent stuff? Sorry if I
> >>>>> caught you wrong...
> >>>> I don't even know what I'm saying myself :-)
> >>>>
> >>>> All I know is that I want something fast that feels as solid as SWT on
> >>>> windows or swing/java2d on macosx.
> >>>>
> >>>> Unfortunately, I don't think I know enough how to figure out how to get
> >>>> there though, but I suspect you guys do ;-)
> >>>>
> >>> --
> >>>
> >>> Tim Ellison (t.p.ellison@gmail.com)
> >>> IBM Java technology centre, UK.
> >>>
> >
> >
>


--
Davanum Srinivas : http://wso2.com/blogs/

Re: Using Cairo for Harmony graphic stuff?

Posted by Geir Magnusson Jr <ge...@pobox.com>.
Isn't it a rice dish?

Stefano Mazzocchi wrote:
> Anton Avtamonov wrote:
>> Yeah, thank you Tim.
>>
>> I also thought about SwingWT when saw Stefano's letter.
>> Unfortunately such approach have serious problem with supporting PLAF
>> concept, as I know :-(, but really very fast (thanks to swt :-))
> 
> what's PLAF?
> 
>>
>> -- 
>> Anton Avtamonov,
>> Intel Middleware Products Division
>>
>>
>> On 2/13/06, Tim Ellison <t....@gmail.com> wrote:
>>> http://swingwt.sourceforge.net/
>>>
>>> (I merely mention it, not recommending it)
>>>
>>> Regards,
>>> Tim
>>>
>>> Stefano Mazzocchi wrote:
>>>> Anton Avtamonov wrote:
>>>>> On 2/13/06, Stefano Mazzocchi <st...@apache.org> wrote:
>>>>> [snip]
>>>>>> The other thing to consider is to follow apple's advice and implement
>>>>>> Swing using native widgets. I don't know what this entails in 
>>>>>> terms of
>>>>>> complexity but I always found stupid that swing is barely 
>>>>>> scratching the
>>>>>> surface of what my GPU accelerator could do for me.
>>>>>>
>>>>> [snip]
>>>>>> -- 
>>>>>> Stefano.
>>>>>>
>>>>> Hi Stefano,
>>>>>
>>>>> Am I right you propose to implement Swing on native widgets? I mean
>>>>> using real native push buttons, etc. and get rid of 'standard' Swing
>>>>> approach to have lightweight platform-independent stuff? Sorry if I
>>>>> caught you wrong...
>>>> I don't even know what I'm saying myself :-)
>>>>
>>>> All I know is that I want something fast that feels as solid as SWT on
>>>> windows or swing/java2d on macosx.
>>>>
>>>> Unfortunately, I don't think I know enough how to figure out how to get
>>>> there though, but I suspect you guys do ;-)
>>>>
>>> -- 
>>>
>>> Tim Ellison (t.p.ellison@gmail.com)
>>> IBM Java technology centre, UK.
>>>
> 
> 

Re: Using Cairo for Harmony graphic stuff?

Posted by Stefano Mazzocchi <st...@apache.org>.
Anton Avtamonov wrote:
> Yeah, thank you Tim.
> 
> I also thought about SwingWT when saw Stefano's letter.
> Unfortunately such approach have serious problem with supporting PLAF
> concept, as I know :-(, but really very fast (thanks to swt :-))

what's PLAF?

> 
> --
> Anton Avtamonov,
> Intel Middleware Products Division
> 
> 
> On 2/13/06, Tim Ellison <t....@gmail.com> wrote:
>> http://swingwt.sourceforge.net/
>>
>> (I merely mention it, not recommending it)
>>
>> Regards,
>> Tim
>>
>> Stefano Mazzocchi wrote:
>>> Anton Avtamonov wrote:
>>>> On 2/13/06, Stefano Mazzocchi <st...@apache.org> wrote:
>>>> [snip]
>>>>> The other thing to consider is to follow apple's advice and implement
>>>>> Swing using native widgets. I don't know what this entails in terms of
>>>>> complexity but I always found stupid that swing is barely scratching the
>>>>> surface of what my GPU accelerator could do for me.
>>>>>
>>>> [snip]
>>>>> --
>>>>> Stefano.
>>>>>
>>>> Hi Stefano,
>>>>
>>>> Am I right you propose to implement Swing on native widgets? I mean
>>>> using real native push buttons, etc. and get rid of 'standard' Swing
>>>> approach to have lightweight platform-independent stuff? Sorry if I
>>>> caught you wrong...
>>> I don't even know what I'm saying myself :-)
>>>
>>> All I know is that I want something fast that feels as solid as SWT on
>>> windows or swing/java2d on macosx.
>>>
>>> Unfortunately, I don't think I know enough how to figure out how to get
>>> there though, but I suspect you guys do ;-)
>>>
>> --
>>
>> Tim Ellison (t.p.ellison@gmail.com)
>> IBM Java technology centre, UK.
>>


-- 
Stefano.


Re: Using Cairo for Harmony graphic stuff?

Posted by Anton Avtamonov <an...@gmail.com>.
Yeah, thank you Tim.

I also thought about SwingWT when saw Stefano's letter.
Unfortunately such approach have serious problem with supporting PLAF
concept, as I know :-(, but really very fast (thanks to swt :-))

--
Anton Avtamonov,
Intel Middleware Products Division


On 2/13/06, Tim Ellison <t....@gmail.com> wrote:
> http://swingwt.sourceforge.net/
>
> (I merely mention it, not recommending it)
>
> Regards,
> Tim
>
> Stefano Mazzocchi wrote:
> > Anton Avtamonov wrote:
> >> On 2/13/06, Stefano Mazzocchi <st...@apache.org> wrote:
> >> [snip]
> >>> The other thing to consider is to follow apple's advice and implement
> >>> Swing using native widgets. I don't know what this entails in terms of
> >>> complexity but I always found stupid that swing is barely scratching the
> >>> surface of what my GPU accelerator could do for me.
> >>>
> >> [snip]
> >>> --
> >>> Stefano.
> >>>
> >>
> >> Hi Stefano,
> >>
> >> Am I right you propose to implement Swing on native widgets? I mean
> >> using real native push buttons, etc. and get rid of 'standard' Swing
> >> approach to have lightweight platform-independent stuff? Sorry if I
> >> caught you wrong...
> >
> > I don't even know what I'm saying myself :-)
> >
> > All I know is that I want something fast that feels as solid as SWT on
> > windows or swing/java2d on macosx.
> >
> > Unfortunately, I don't think I know enough how to figure out how to get
> > there though, but I suspect you guys do ;-)
> >
>
> --
>
> Tim Ellison (t.p.ellison@gmail.com)
> IBM Java technology centre, UK.
>

Re: Using Cairo for Harmony graphic stuff?

Posted by Tim Ellison <t....@gmail.com>.
http://swingwt.sourceforge.net/

(I merely mention it, not recommending it)

Regards,
Tim

Stefano Mazzocchi wrote:
> Anton Avtamonov wrote:
>> On 2/13/06, Stefano Mazzocchi <st...@apache.org> wrote:
>> [snip]
>>> The other thing to consider is to follow apple's advice and implement
>>> Swing using native widgets. I don't know what this entails in terms of
>>> complexity but I always found stupid that swing is barely scratching the
>>> surface of what my GPU accelerator could do for me.
>>>
>> [snip]
>>> -- 
>>> Stefano.
>>>
>>
>> Hi Stefano,
>>
>> Am I right you propose to implement Swing on native widgets? I mean
>> using real native push buttons, etc. and get rid of 'standard' Swing
>> approach to have lightweight platform-independent stuff? Sorry if I
>> caught you wrong...
> 
> I don't even know what I'm saying myself :-)
> 
> All I know is that I want something fast that feels as solid as SWT on
> windows or swing/java2d on macosx.
> 
> Unfortunately, I don't think I know enough how to figure out how to get
> there though, but I suspect you guys do ;-)
> 

-- 

Tim Ellison (t.p.ellison@gmail.com)
IBM Java technology centre, UK.

Re: Using Cairo for Harmony graphic stuff?

Posted by Stefano Mazzocchi <st...@apache.org>.
Anton Avtamonov wrote:
> On 2/13/06, Stefano Mazzocchi <st...@apache.org> wrote:
> [snip]
>> The other thing to consider is to follow apple's advice and implement
>> Swing using native widgets. I don't know what this entails in terms of
>> complexity but I always found stupid that swing is barely scratching the
>> surface of what my GPU accelerator could do for me.
>>
> [snip]
>> --
>> Stefano.
>>
> 
> Hi Stefano,
> 
> Am I right you propose to implement Swing on native widgets? I mean
> using real native push buttons, etc. and get rid of 'standard' Swing
> approach to have lightweight platform-independent stuff? Sorry if I
> caught you wrong...

I don't even know what I'm saying myself :-)

All I know is that I want something fast that feels as solid as SWT on 
windows or swing/java2d on macosx.

Unfortunately, I don't think I know enough how to figure out how to get 
there though, but I suspect you guys do ;-)

-- 
Stefano.


Re: Using Cairo for Harmony graphic stuff?

Posted by Anton Avtamonov <an...@gmail.com>.
On 2/13/06, Stefano Mazzocchi <st...@apache.org> wrote:
[snip]
> The other thing to consider is to follow apple's advice and implement
> Swing using native widgets. I don't know what this entails in terms of
> complexity but I always found stupid that swing is barely scratching the
> surface of what my GPU accelerator could do for me.
>
[snip]
> --
> Stefano.
>

Hi Stefano,

Am I right you propose to implement Swing on native widgets? I mean
using real native push buttons, etc. and get rid of 'standard' Swing
approach to have lightweight platform-independent stuff? Sorry if I
caught you wrong...

--
Anton Avtamonov,
Intel Middleware Products Division

Re: Using Cairo for Harmony graphic stuff?

Posted by Stefano Mazzocchi <st...@apache.org>.
Alexey Petrenko wrote:
> I'll check the Cairo. Thanks for pointing...

my pleasure.

>> Well, that Graphics object at some points needs rendering to the screen
>> doesn't it? :-)
> Yep. :)
> But Graphics object is a small part of AWT...

agreed, yet having a solid and hardware accelerated graphics part (I'm 
thinking java2d mostly) would make me *very* happy.

The other thing to consider is to follow apple's advice and implement 
Swing using native widgets. I don't know what this entails in terms of 
complexity but I always found stupid that swing is barely scratching the 
surface of what my GPU accelerator could do for me.

Anyway, I suggest we focus on server side stuff first anyway.

-- 
Stefano.


Re: Using Cairo for Harmony graphic stuff?

Posted by Alexey Petrenko <al...@gmail.com>.
I'll check the Cairo. Thanks for pointing...

> Well, that Graphics object at some points needs rendering to the screen
> doesn't it? :-)
Yep. :)
But Graphics object is a small part of AWT...

--
Alexey A. Petrenko
Intel Middleware Products Division

Re: Using Cairo for Harmony graphic stuff?

Posted by Dalibor Topic <ro...@kaffe.org>.
Sergey Soldatov wrote:
> In my opinion the only area to use Cairo is the Java2D part of AWT.
> Unfortunately any additional layer between 2D and native calls may
> dramatically affect the performance of UI, especially Swing.
> 

Yes, that's what GNU Classpath does. Using Cairo for other things means
emulating native widgets, or defining one's own widget set. Both are
choices with their own tradeoffs.

cheers,
dalibor topic

Re: Using Cairo for Harmony graphic stuff?

Posted by Stefano Mazzocchi <st...@apache.org>.
Anthony Green wrote:
> On Mon, 2006-02-13 at 13:38 +0300, Sergey Soldatov wrote:
>> In my opinion the only area to use Cairo is the Java2D part of AWT.
>> Unfortunately any additional layer between 2D and native calls may
>> dramatically affect the performance of UI, especially Swing.
> 
> GNU Classpath is using Cairo, but I think a better plan now would be to
> use jogl (JSR231, whose reference implementation has a very liberal
> license).  Sun has done some interesting work with their OpenGL single
> threaded rendering backend to address the JNI overhead issue.  You get
> nice 2d/3d integration as well.

Good point!

-- 
Stefano.


Re: Using Cairo for Harmony graphic stuff?

Posted by Anthony Green <gr...@redhat.com>.
On Mon, 2006-02-13 at 13:38 +0300, Sergey Soldatov wrote:
> In my opinion the only area to use Cairo is the Java2D part of AWT.
> Unfortunately any additional layer between 2D and native calls may
> dramatically affect the performance of UI, especially Swing.

GNU Classpath is using Cairo, but I think a better plan now would be to
use jogl (JSR231, whose reference implementation has a very liberal
license).  Sun has done some interesting work with their OpenGL single
threaded rendering backend to address the JNI overhead issue.  You get
nice 2d/3d integration as well.

AG



Re: Using Cairo for Harmony graphic stuff?

Posted by Sergey Soldatov <se...@gmail.com>.
In my opinion the only area to use Cairo is the Java2D part of AWT.
Unfortunately any additional layer between 2D and native calls may
dramatically affect the performance of UI, especially Swing.

On 2/13/06, Leo Simons <ma...@leosimons.com> wrote:
>
> On Mon, Feb 13, 2006 at 02:04:18AM +0100, Tor-Einar Jarnbjo wrote:
> > Stefano Mazzocchi wrote:
> >
> > >Another think that I wonder, for the windowing stuff, why don't we use
> > >Cairo[1]?
> >
> > Isn't Cairo just a rendering library?
>
> Err, yes...it offers drawing primitives for things such as lines and
> points
> and glyphs, on top of other platforms such as X11 and win32.
>
> > AFAIK, it does not offer any kind
> > of e.g. portable widget access,
>
> Aye, I think not.
>
> > which is probably the most tricky thing
> > to implement for AWT.
>
> I wouldn't know. I can imagine its less work to build on top of Cairo than
> to build on top of X11/win32/etc directly, since Cairo is precisely
> designed
> to fulfill the gap between something like AWT (or GTK or wxWindows or ...)
> and the underlying system.
>
> But even then a windowing toolkit is always a whole lot of work.
>
> > Swing can be implemented in pure Java, based on
> > some simple native support by AWT (open window and supply a Graphics
> > object into which the content can be rendered). I don't see where Cairo
> > can offer much help in that area?
>
> Well, that Graphics object at some points needs rendering to the screen
> doesn't it? :-)
>
> cheers!
>
> LSD
>
>


--
Sergey Soldatov
Intel Middleware Products Division

Re: Using Cairo for Harmony graphic stuff?

Posted by Leo Simons <ma...@leosimons.com>.
On Mon, Feb 13, 2006 at 02:04:18AM +0100, Tor-Einar Jarnbjo wrote:
> Stefano Mazzocchi wrote:
> 
> >Another think that I wonder, for the windowing stuff, why don't we use 
> >Cairo[1]?
> 
> Isn't Cairo just a rendering library?

Err, yes...it offers drawing primitives for things such as lines and points
and glyphs, on top of other platforms such as X11 and win32.

> AFAIK, it does not offer any kind 
> of e.g. portable widget access,

Aye, I think not.

> which is probably the most tricky thing 
> to implement for AWT.

I wouldn't know. I can imagine its less work to build on top of Cairo than
to build on top of X11/win32/etc directly, since Cairo is precisely designed
to fulfill the gap between something like AWT (or GTK or wxWindows or ...)
and the underlying system.

But even then a windowing toolkit is always a whole lot of work.

> Swing can be implemented in pure Java, based on 
> some simple native support by AWT (open window and supply a Graphics 
> object into which the content can be rendered). I don't see where Cairo 
> can offer much help in that area?

Well, that Graphics object at some points needs rendering to the screen
doesn't it? :-)

cheers!

LSD


Re: Using Cairo for Harmony graphic stuff? [was Re: Using APR for Harmony's native link to the OS?]

Posted by André Luis Ferreira da Silva Bacci <an...@gmail.com>.
Tor-Einar Jarnbjo escreveu:
> Stefano Mazzocchi wrote:
> 
>> Another think that I wonder, for the windowing stuff, why don't we use 
>> Cairo[1]?
> 
> Isn't Cairo just a rendering library? AFAIK, it does not offer any kind 
> of e.g. portable widget access, which is probably the most tricky thing 
> to implement for AWT. Swing can be implemented in pure Java, based on 
> some simple native support by AWT (open window and supply a Graphics 
> object into which the content can be rendered). I don't see where Cairo 
> can offer much help in that area?

http://www.mono-project.com/Windows_Forms#History

Re: Using Cairo for Harmony graphic stuff? [was Re: Using APR for Harmony's native link to the OS?]

Posted by Tor-Einar Jarnbjo <To...@Jarnbjo.de>.
Stefano Mazzocchi wrote:

> Another think that I wonder, for the windowing stuff, why don't we use 
> Cairo[1]?

Isn't Cairo just a rendering library? AFAIK, it does not offer any kind 
of e.g. portable widget access, which is probably the most tricky thing 
to implement for AWT. Swing can be implemented in pure Java, based on 
some simple native support by AWT (open window and supply a Graphics 
object into which the content can be rendered). I don't see where Cairo 
can offer much help in that area?

Tor