Howto use Substance5?

View: New views
10 Messages — Rating Filter:   Alert me  

Howto use Substance5?

by Clemens Eisserer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Stupid but short question, how can I specify that Substance5 should be
loaded as default toolkit.
SubstanceLookAndFeel seems to be abstract, I get an
InstantiationException when i try to load it.

Thank you in advance, lg Clemens

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Howto use Substance5?

by Gábor Pápai :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Clemens!

Try to use a class that extends SubstanceLookAndFeel, like SubstanceBusinessLookAndFeel. hint: you can see the type hierarchy by pressing CTRL+t on "SubstanceLookAndFeel" in Eclipse.

I hope it helps, Gábor.

On Wed, Jul 23, 2008 at 9:06 PM, Clemens Eisserer <linuxhippy@...> wrote:
Hi,

Stupid but short question, how can I specify that Substance5 should be
loaded as default toolkit.
SubstanceLookAndFeel seems to be abstract, I get an
InstantiationException when i try to load it.

Thank you in advance, lg Clemens

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...



Parent Message unknown Re: Howto use Substance5?

by Kirill Grouchnikov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hi, Clemens

Indeed, starting from version 5 the SubstanceLookAndFeel class is an abstract class. To use on of skin-based derivatives, please see the documentation at [1], [2] and [3]. Please let me know if you run into Substance-specific visual artifacts on the XRender pipeline.

Thanks
Kirill

[1] https://substance.dev.java.net/docs/skins/toneddown.html
[2] https://substance.dev.java.net/docs/skins/dark.html
[3] https://substance.dev.java.net/docs/skins/saturated.html

----- Original Message ----
From: Clemens Eisserer <linuxhippy@...>
To: users@...
Sent: Wednesday, July 23, 2008 12:06:59 PM
Subject: Howto use Substance5?

Hi,

Stupid but short question, how can I specify that Substance5 should be
loaded as default toolkit.
SubstanceLookAndFeel seems to be abstract, I get an
InstantiationException when i try to load it.

Thank you in advance, lg Clemens

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...



Re: Howto use Substance5?

by Clemens Eisserer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Kirill,

Thanks for the introduction, now it works :)

> Please let me know if you run into
> Substance-specific visual artifacts on the XRender pipeline.
:) ... indeed I was trying to test it with the XRender pipeline ;)

I did not see artifacts, however a lot of software-fallbacks and
MaskFills were in action:
6224 calls to sun.java2d.loops.Blit::Blit(IntRgb, SrcNoEa, IntArgb)
1253 calls to sun.java2d.loops.MaskFill::MaskFill(AnyColor, Src, IntArgb)
1814 calls to sun.java2d.xr.X11PMBlit::Blit("Integer ARGB-Pre Pixmap",
AnyAlpha, "Integer RGB Pixmap")
17017 calls to sun.java2d.xr.XRMaskFill::MaskFill(AnyColor, SrcOver,
"Integer RGB Pixmap")
4817 calls to sun.java2d.xr.XRMaskFill::MaskFill(GradientPaint,
SrcOver, "Integer RGB Pixmap")

Do those happen when using the D3D pipeline too?

Thanks a lot, lg Clemens

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Parent Message unknown Re: Howto use Substance5?

by Kirill Grouchnikov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Clemens,

The main focus of version 5.0 is to improve the performance on the software rendering pipeline, addressing what i believe is the majority of stations running business applications. The performance tuning on D3D pipeline is a scheduled work to continue in the next Substance versions. If you have any suggestions / mappings from the primitive Java2D operations back to Graphics2D APIs, i will be more than happy to hear about it.

Thanks
Kirill

----- Original Message ----
From: Clemens Eisserer <linuxhippy@...>
To: users@...
Sent: Thursday, July 24, 2008 6:11:14 AM
Subject: Re: Howto use Substance5?

Hi Kirill,

Thanks for the introduction, now it works :)

> Please let me know if you run into
> Substance-specific visual artifacts on the XRender pipeline.
:) ... indeed I was trying to test it with the XRender pipeline ;)

I did not see artifacts, however a lot of software-fallbacks and
MaskFills were in action:
6224 calls to sun.java2d.loops.Blit::Blit(IntRgb, SrcNoEa, IntArgb)
1253 calls to sun.java2d.loops.MaskFill::MaskFill(AnyColor, Src, IntArgb)
1814 calls to sun.java2d.xr.X11PMBlit::Blit("Integer ARGB-Pre Pixmap",
AnyAlpha, "Integer RGB Pixmap")
17017 calls to sun.java2d.xr.XRMaskFill::MaskFill(AnyColor, SrcOver,
"Integer RGB Pixmap")
4817 calls to sun.java2d.xr.XRMaskFill::MaskFill(GradientPaint,
SrcOver, "Integer RGB Pixmap")

Do those happen when using the D3D pipeline too?

Thanks a lot, lg Clemens

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...



Re: Howto use Substance5?

by Clemens Eisserer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Kirill,

> The main focus of version 5.0 is to improve the performance on the software
> rendering pipeline, addressing what i believe is the majority of stations
> running business applications. The performance tuning on D3D pipeline is a
> scheduled work to continue in the next Substance versions.
Good to know, thanks for explanation.
Good for me, it doesn't hit some problems exposed when running nimbus ;)

> If you have any
> suggestions / mappings from the primitive Java2D operations back to
> Graphics2D APIs, i will be more than happy to hear about it.
Sorry my english is a bit poor, I don't realy understand that ;)

Thanks a lot, Clemens

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Parent Message unknown Re: Howto use Substance5?

by Kirill Grouchnikov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
You can try running under a skin that uses translucent visuals for disabled controls, such as Autumn.

About the Java2D mappings - here's an excerpt from your mail:

6224 calls to sun.java2d.loops.Blit::Blit(IntRgb, SrcNoEa, IntArgb)
1253 calls to sun.java2d.loops.MaskFill::MaskFill(AnyColor, Src, IntArgb)
1814 calls to sun.java2d.xr.X11PMBlit::Blit("Integer ARGB-Pre Pixmap", AnyAlpha, "Integer RGB Pixmap")
17017 calls to sun.java2d.xr.XRMaskFill::MaskFill(AnyColor, SrcOver, "Integer RGB Pixmap")
4817 calls to sun.java2d.xr.XRMaskFill::MaskFill(GradientPaint, SrcOver, "Integer RGB Pixmap")

This doesn't tell me much. I have no idea (unless i turn on the full Java2D tracing and instrument my code with System.out.println statements) how these instructions are mapped back to my code. So, let's say i call Graphics2D.fill(Shape) and the anti-alias is off - how does that translate into those Java2D primitive operations above? As a "customer" of Java2D rendering pipeline, i am interested to see in the statistics grouped by the Graphics2D API level, and not by the low-level sun.java2d methods that i'm not calling directly.

Thanks
Kirill

----- Original Message ----
From: Clemens Eisserer <linuxhippy@...>
To: users@...
Sent: Thursday, July 24, 2008 3:27:15 PM
Subject: Re: Howto use Substance5?

Hi Kirill,

> The main focus of version 5.0 is to improve the performance on the software
> rendering pipeline, addressing what i believe is the majority of stations
> running business applications. The performance tuning on D3D pipeline is a
> scheduled work to continue in the next Substance versions.
Good to know, thanks for explanation.
Good for me, it doesn't hit some problems exposed when running nimbus ;)

> If you have any
> suggestions / mappings from the primitive Java2D operations back to
> Graphics2D APIs, i will be more than happy to hear about it.
Sorry my english is a bit poor, I don't realy understand that ;)

Thanks a lot, Clemens

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...



Re: Howto use Substance5?

by Clemens Eisserer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Kirill,

> You can try running under a skin that uses translucent visuals for disabled
> controls, such as Autumn.
Thanks for the hint, I'll have a look.

> This doesn't tell me much. I have no idea (unless i turn on the full Java2D
> tracing and instrument my code with System.out.println statements) how these
> instructions are mapped back to my code. So, let's say i call
> Graphics2D.fill(Shape) and the anti-alias is off - how does that translate
> into those Java2D primitive operations above? As a "customer" of Java2D
> rendering pipeline, i am interested to see in the statistics grouped by the
> Graphics2D API level, and not by the low-level sun.java2d methods that i'm
> not calling directly.
Well, never thought about it that way but you're right, there should
be better documentation what happens behind Graphics2D.

However for the example you gave me, the shape will be converted into
many 1-pixel high small rectangles (for fill, draw can lead to lines
and rects), this can usually be rendered quite fast. For the X11
pipeline there are more restrictions, e.g. the paint may only be an
opaque color, xrender supports all paints except radial gradients with
focus point. OGL and D3D support all paints on shader-capable
hardware.

If you turn antialiasing on however, java itself calculates a "mask"
which will be uploaded to VRAM and then this mask is used (those are
those MaskFills). The mask is tiled in 32x32 so larger aa-areas are
composed of many small operations. This is quite a slow process and
also consumes network-bandwith for network-protocols like X11/Xrender,
thats why Nimbus caches antialiased stuff in translucent VRAMs.
However for my taske it still does way too many maskfills and
maskblits ;)
For some antialiased operations there are now shaders in the D3D
pipeline ... however theres nothing wrong with the general mantra that
antialing is slow ;)

Hope that was not too boring ;)

Thanks, Clemens

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Parent Message unknown Re: Howto use Substance5?

by Kirill Grouchnikov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hi, Clemens

At the present moment i am not too drawn into trying to optimize the Java2D usage based on the particular subset of the internal primitive operations accelerated by the particular underlying rendering pipeline. There are two such core pipelines (D3D / OGL), and there's another one that you're working on. The task of optimizing the much higher level code for the multiple pipelines running on multiple hardware platforms sounds, at least to me, quite daunting.

If there is an obvious gain to be had, i'm more than glad to do so. Anything beyond that would require a full-time commitment working closely with the developers of the corresponding pipelines, and at the present moment i cannot fully commit to this.

Thanks
Kirill

----- Original Message ----
From: Clemens Eisserer <linuxhippy@...>
To: users@...
Sent: Friday, July 25, 2008 1:27:25 PM
Subject: Re: Howto use Substance5?

Hi Kirill,

> You can try running under a skin that uses translucent visuals for disabled
> controls, such as Autumn.
Thanks for the hint, I'll have a look.

> This doesn't tell me much. I have no idea (unless i turn on the full Java2D
> tracing and instrument my code with System.out.println statements) how these
> instructions are mapped back to my code. So, let's say i call
> Graphics2D.fill(Shape) and the anti-alias is off - how does that translate
> into those Java2D primitive operations above? As a "customer" of Java2D
> rendering pipeline, i am interested to see in the statistics grouped by the
> Graphics2D API level, and not by the low-level sun.java2d methods that i'm
> not calling directly.
Well, never thought about it that way but you're right, there should
be better documentation what happens behind Graphics2D.

However for the example you gave me, the shape will be converted into
many 1-pixel high small rectangles (for fill, draw can lead to lines
and rects), this can usually be rendered quite fast. For the X11
pipeline there are more restrictions, e.g. the paint may only be an
opaque color, xrender supports all paints except radial gradients with
focus point. OGL and D3D support all paints on shader-capable
hardware.

If you turn antialiasing on however, java itself calculates a "mask"
which will be uploaded to VRAM and then this mask is used (those are
those MaskFills). The mask is tiled in 32x32 so larger aa-areas are
composed of many small operations. This is quite a slow process and
also consumes network-bandwith for network-protocols like X11/Xrender,
thats why Nimbus caches antialiased stuff in translucent VRAMs.
However for my taske it still does way too many maskfills and
maskblits ;)
For some antialiased operations there are now shaders in the D3D
pipeline ... however theres nothing wrong with the general mantra that
antialing is slow ;)

Hope that was not too boring ;)

Thanks, Clemens

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...



Re: Howto use Substance5?

by Clemens Eisserer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Kirill,

> At the present moment i am not too drawn into trying to optimize the Java2D
> usage based on the particular subset of the internal primitive operations
> accelerated by the particular underlying rendering pipeline.
Sure I understand your concerns, and it was also not my goal to
convince you to tune it for accalerated pipelines.
For now I also don't have enough free time left to work on it myself
(well, actually I need quite a bit of vacation right now ;) ),
but if you have one day questions how this or that maps, or how things
can be done efficiently I am willed to help of course.

> There are two
> such core pipelines (D3D / OGL), and there's another one that you're working
> on. The task of optimizing the much higher level code for the multiple
> pipelines running on multiple hardware platforms sounds, at least to me,
> quite daunting.
Well, the good news is that all the new pipelines basically accalerate
the same set of operations equally well, and on which hardware you run
it should not count too much at all if it can run the pipeline.
So if you tune it for D3D, it should run well on OGL and XRender too :)

Good luck with further Substance development and thanks for your help, Clemens

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

LightInTheBox - Buy quality products at wholesale price