You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by Greg Brown <gk...@mac.com> on 2009/05/24 00:51:44 UTC
Re: Background image
That's very interesting. I tried removing the alpha channel from the PNG, but that didn't help. cc'ing the dev list - PNG as a background image causes noticeable repaint delays, but a JPEG doesn't (see below). Anyone have any ideas?
On Saturday, May 23, 2009, at 03:42PM, "Edgar Merino" <do...@gmail.com> wrote:
>Thanks for the suggestions, I tried running the StackPanes demo, and
>noticed it didn't suffered from such a performance bottleneck, I noticed
>the background image was a jpg, I'm currently using a png for the
>background, so tried the demo with my image (800x600) and the
>performance problem arised again. After I changed the format of my
>background to jpg everything went fine. So I can confirm the problem
>happens (at least) with png images. Attached is a copy of my background
>image (in both png and jpg).
>
>Thanks for the help again!
>Edgar Merino
>
>
>Todd Volkert escribió:
>> I guess I'll add:
>>
>> - Are you running inside a VM? If so, which virtualization software
>> and version?
>>
>> -T
>>
>> On Sat, May 23, 2009 at 9:05 AM, Greg Brown <gk...@mac.com> wrote:
>>
>>> Hi Edgar,
>>>
>>> I just added the following code to the stack panes demo (pivot.tutorials.layout.StackPanes):
>>>
>>> Alert.alert("Hello, World!", display);
>>>
>>> I added it to the startup() method, right after the line that opens the window (line 32). I didn't notice any performance issues - can you try the same test and let us know what behavior you get?
>>>
>>> Also, can you let us know:
>>> - How big is the background image (in pixels)?
>>> - What were the display dimensions of the window containing the scaled image when you noticed the problem?
>>> - What OS are you running?
>>> - What JVM version/vendor?
>>> - How much main memory does your system have, and how much video memory?
>>> - How much memory did you allocate to the JVM process?
>>>
>>> Thanks,
>>> Greg
>>>
>>> On Friday, May 22, 2009, at 10:39PM, "Edgar Merino" <do...@gmail.com> wrote:
>>>
>>>> Hello,
>>>>
>>>> I recently discovered pivot, currently using svn revision 777773.
>>>> I've got an application where I would like to place a fixed image
>>>> background (although it'll have to be scaled each time the window is
>>>> resized). I've tried placing the background by putting all the
>>>> components inside a StackPane, however performance drops terrible if I
>>>> do it this way (all the other components in the stack move slow, e.g.
>>>> Prompts and Frames). Is there any other way to do what I need without
>>>> suffering from such a terrible performance bottleneck?
>>>>
>>>> Thanks in advance,
>>>> Edgar Merino
>>>>
>>>>
>>>>
>>
>>
>
>
>
Re: Background image
Posted by Greg Brown <gk...@mac.com>.
Here's a little more info - graphics#drawImage() for the JPEG takes ~1ms, and for the PNG takes between 50ms and 100ms. Not sure why yet.
On Saturday, May 23, 2009, at 06:51PM, "Greg Brown" <gk...@mac.com> wrote:
>That's very interesting. I tried removing the alpha channel from the PNG, but that didn't help. cc'ing the dev list - PNG as a background image causes noticeable repaint delays, but a JPEG doesn't (see below). Anyone have any ideas?
>
>On Saturday, May 23, 2009, at 03:42PM, "Edgar Merino" <do...@gmail.com> wrote:
>>Thanks for the suggestions, I tried running the StackPanes demo, and
>>noticed it didn't suffered from such a performance bottleneck, I noticed
>>the background image was a jpg, I'm currently using a png for the
>>background, so tried the demo with my image (800x600) and the
>>performance problem arised again. After I changed the format of my
>>background to jpg everything went fine. So I can confirm the problem
>>happens (at least) with png images. Attached is a copy of my background
>>image (in both png and jpg).
>>
>>Thanks for the help again!
>>Edgar Merino
>>
>>
>>Todd Volkert escribió:
>>> I guess I'll add:
>>>
>>> - Are you running inside a VM? If so, which virtualization software
>>> and version?
>>>
>>> -T
>>>
>>> On Sat, May 23, 2009 at 9:05 AM, Greg Brown <gk...@mac.com> wrote:
>>>
>>>> Hi Edgar,
>>>>
>>>> I just added the following code to the stack panes demo (pivot.tutorials.layout.StackPanes):
>>>>
>>>> Alert.alert("Hello, World!", display);
>>>>
>>>> I added it to the startup() method, right after the line that opens the window (line 32). I didn't notice any performance issues - can you try the same test and let us know what behavior you get?
>>>>
>>>> Also, can you let us know:
>>>> - How big is the background image (in pixels)?
>>>> - What were the display dimensions of the window containing the scaled image when you noticed the problem?
>>>> - What OS are you running?
>>>> - What JVM version/vendor?
>>>> - How much main memory does your system have, and how much video memory?
>>>> - How much memory did you allocate to the JVM process?
>>>>
>>>> Thanks,
>>>> Greg
>>>>
>>>> On Friday, May 22, 2009, at 10:39PM, "Edgar Merino" <do...@gmail.com> wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> I recently discovered pivot, currently using svn revision 777773.
>>>>> I've got an application where I would like to place a fixed image
>>>>> background (although it'll have to be scaled each time the window is
>>>>> resized). I've tried placing the background by putting all the
>>>>> components inside a StackPane, however performance drops terrible if I
>>>>> do it this way (all the other components in the stack move slow, e.g.
>>>>> Prompts and Frames). Is there any other way to do what I need without
>>>>> suffering from such a terrible performance bottleneck?
>>>>>
>>>>> Thanks in advance,
>>>>> Edgar Merino
>>>>>
>>>>>
>>>>>
>>>
>>>
>>
>>
>>
>
>
Re: Background image
Posted by Noel Grandin <no...@gmail.com>.
Judging by the problem report, it was a problem with one specific
image type or encoding.
If you're testing these things, please make sure you're running the
lastest graphics drivers and service packs - I would get sometimes get
weird results such as graphics drivers that lied about which image
format they preferred.
Also, note that most of time, these problems are so minor they
disappear in the noise - the only reason I know about it is because I
had to develop a waterfall display that needed to do 50fps and redraw
all of itself on every frame.
Regards, Noel.
On Mon, May 25, 2009 at 02:48, Greg Brown <gk...@mac.com> wrote:
> Is it possible that this could be caused by a particular PNG encoding? I think we should verify that this is a problem for all PNGs before making any design decisions...
>
Re: Background image
Posted by Greg Brown <gk...@mac.com>.
Is it possible that this could be caused by a particular PNG encoding? I think we should verify that this is a problem for all PNGs before making any design decisions...
On Sunday, May 24, 2009, at 07:33PM, "Todd Volkert" <tv...@gmail.com> wrote:
>Oh, and if there are no objections to this design, we should create a
>JIRA ticket for it so we can track it. If PNG painting is really that
>slow in a fair number of graphics implementations, we might even
>consider getting this in for 1.2...
>
>-T
>
>On Sun, May 24, 2009 at 7:31 PM, Todd Volkert <tv...@gmail.com> wrote:
>> This implies that ImageViewSkin should do the background painting to
>> the BufferedImage and cache the resulting buffered image so that it
>> can use it in its paint() method. It's update the buffered image when
>> it received an ImageEvent on the image or a notification from the
>> ImageView that its image reference changed. Just talking this out to
>> make sure I'm picturing the same thing you're picturing...
>>
>> -T
>>
>> On Sun, May 24, 2009 at 9:18 AM, Noel Grandin <no...@gmail.com> wrote:
>>> depending on the machine and the graphics driver, you can sometimes
>>> have wildly varying results if you don't feed the right BufferedImage
>>> format to the graphics pipeline.
>>> Typically, each graphics driver has a preferred format (normally 8 bit
>>> RGBA these days).
>>> But sometimes it want RGB or BGR, and it the image is in the "wrong"
>>> format, it can slow things down.
>>>
>>> The best approach is to ask the pipeline what image format is wants,
>>> create a BufferedImage of that format, render you background image to
>>> the BufferedImage, and then render your BufferedImage to the screen on
>>> a repaint.
>>>
>>> Regards, Noel.
>>>
>>> On Sun, May 24, 2009 at 01:53, Greg Brown <gk...@mac.com> wrote:
>>>> Sorry - more specifically, those are the timings for painting the dirty region when dragging the Alert around the screen in the modified Stack Panes tutorial.
>>>>
>>>> On Saturday, May 23, 2009, at 06:51PM, "Greg Brown" <gk...@mac.com> wrote:
>>>>>That's very interesting. I tried removing the alpha channel from the PNG, but that didn't help. cc'ing the dev list - PNG as a background image causes noticeable repaint delays, but a JPEG doesn't (see below). Anyone have any ideas?
>>>>>
>>>>>On Saturday, May 23, 2009, at 03:42PM, "Edgar Merino" <do...@gmail.com> wrote:
>>>>>>Thanks for the suggestions, I tried running the StackPanes demo, and
>>>>>>noticed it didn't suffered from such a performance bottleneck, I noticed
>>>>>>the background image was a jpg, I'm currently using a png for the
>>>>>>background, so tried the demo with my image (800x600) and the
>>>>>>performance problem arised again. After I changed the format of my
>>>>>>background to jpg everything went fine. So I can confirm the problem
>>>>>>happens (at least) with png images. Attached is a copy of my background
>>>>>>image (in both png and jpg).
>>>>>>
>>>>>>Thanks for the help again!
>>>>>>Edgar Merino
>>>>>>
>>>>>>
>>>>>>Todd Volkert escribió:
>>>>>>> I guess I'll add:
>>>>>>>
>>>>>>> - Are you running inside a VM? If so, which virtualization software
>>>>>>> and version?
>>>>>>>
>>>>>>> -T
>>>>>>>
>>>>>>> On Sat, May 23, 2009 at 9:05 AM, Greg Brown <gk...@mac.com> wrote:
>>>>>>>
>>>>>>>> Hi Edgar,
>>>>>>>>
>>>>>>>> I just added the following code to the stack panes demo (pivot.tutorials.layout.StackPanes):
>>>>>>>>
>>>>>>>> Alert.alert("Hello, World!", display);
>>>>>>>>
>>>>>>>> I added it to the startup() method, right after the line that opens the window (line 32). I didn't notice any performance issues - can you try the same test and let us know what behavior you get?
>>>>>>>>
>>>>>>>> Also, can you let us know:
>>>>>>>> - How big is the background image (in pixels)?
>>>>>>>> - What were the display dimensions of the window containing the scaled image when you noticed the problem?
>>>>>>>> - What OS are you running?
>>>>>>>> - What JVM version/vendor?
>>>>>>>> - How much main memory does your system have, and how much video memory?
>>>>>>>> - How much memory did you allocate to the JVM process?
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Greg
>>>>>>>>
>>>>>>>> On Friday, May 22, 2009, at 10:39PM, "Edgar Merino" <do...@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Hello,
>>>>>>>>>
>>>>>>>>> I recently discovered pivot, currently using svn revision 777773.
>>>>>>>>> I've got an application where I would like to place a fixed image
>>>>>>>>> background (although it'll have to be scaled each time the window is
>>>>>>>>> resized). I've tried placing the background by putting all the
>>>>>>>>> components inside a StackPane, however performance drops terrible if I
>>>>>>>>> do it this way (all the other components in the stack move slow, e.g.
>>>>>>>>> Prompts and Frames). Is there any other way to do what I need without
>>>>>>>>> suffering from such a terrible performance bottleneck?
>>>>>>>>>
>>>>>>>>> Thanks in advance,
>>>>>>>>> Edgar Merino
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>
>
Re: Background image
Posted by Todd Volkert <tv...@gmail.com>.
Oh, and if there are no objections to this design, we should create a
JIRA ticket for it so we can track it. If PNG painting is really that
slow in a fair number of graphics implementations, we might even
consider getting this in for 1.2...
-T
On Sun, May 24, 2009 at 7:31 PM, Todd Volkert <tv...@gmail.com> wrote:
> This implies that ImageViewSkin should do the background painting to
> the BufferedImage and cache the resulting buffered image so that it
> can use it in its paint() method. It's update the buffered image when
> it received an ImageEvent on the image or a notification from the
> ImageView that its image reference changed. Just talking this out to
> make sure I'm picturing the same thing you're picturing...
>
> -T
>
> On Sun, May 24, 2009 at 9:18 AM, Noel Grandin <no...@gmail.com> wrote:
>> depending on the machine and the graphics driver, you can sometimes
>> have wildly varying results if you don't feed the right BufferedImage
>> format to the graphics pipeline.
>> Typically, each graphics driver has a preferred format (normally 8 bit
>> RGBA these days).
>> But sometimes it want RGB or BGR, and it the image is in the "wrong"
>> format, it can slow things down.
>>
>> The best approach is to ask the pipeline what image format is wants,
>> create a BufferedImage of that format, render you background image to
>> the BufferedImage, and then render your BufferedImage to the screen on
>> a repaint.
>>
>> Regards, Noel.
>>
>> On Sun, May 24, 2009 at 01:53, Greg Brown <gk...@mac.com> wrote:
>>> Sorry - more specifically, those are the timings for painting the dirty region when dragging the Alert around the screen in the modified Stack Panes tutorial.
>>>
>>> On Saturday, May 23, 2009, at 06:51PM, "Greg Brown" <gk...@mac.com> wrote:
>>>>That's very interesting. I tried removing the alpha channel from the PNG, but that didn't help. cc'ing the dev list - PNG as a background image causes noticeable repaint delays, but a JPEG doesn't (see below). Anyone have any ideas?
>>>>
>>>>On Saturday, May 23, 2009, at 03:42PM, "Edgar Merino" <do...@gmail.com> wrote:
>>>>>Thanks for the suggestions, I tried running the StackPanes demo, and
>>>>>noticed it didn't suffered from such a performance bottleneck, I noticed
>>>>>the background image was a jpg, I'm currently using a png for the
>>>>>background, so tried the demo with my image (800x600) and the
>>>>>performance problem arised again. After I changed the format of my
>>>>>background to jpg everything went fine. So I can confirm the problem
>>>>>happens (at least) with png images. Attached is a copy of my background
>>>>>image (in both png and jpg).
>>>>>
>>>>>Thanks for the help again!
>>>>>Edgar Merino
>>>>>
>>>>>
>>>>>Todd Volkert escribió:
>>>>>> I guess I'll add:
>>>>>>
>>>>>> - Are you running inside a VM? If so, which virtualization software
>>>>>> and version?
>>>>>>
>>>>>> -T
>>>>>>
>>>>>> On Sat, May 23, 2009 at 9:05 AM, Greg Brown <gk...@mac.com> wrote:
>>>>>>
>>>>>>> Hi Edgar,
>>>>>>>
>>>>>>> I just added the following code to the stack panes demo (pivot.tutorials.layout.StackPanes):
>>>>>>>
>>>>>>> Alert.alert("Hello, World!", display);
>>>>>>>
>>>>>>> I added it to the startup() method, right after the line that opens the window (line 32). I didn't notice any performance issues - can you try the same test and let us know what behavior you get?
>>>>>>>
>>>>>>> Also, can you let us know:
>>>>>>> - How big is the background image (in pixels)?
>>>>>>> - What were the display dimensions of the window containing the scaled image when you noticed the problem?
>>>>>>> - What OS are you running?
>>>>>>> - What JVM version/vendor?
>>>>>>> - How much main memory does your system have, and how much video memory?
>>>>>>> - How much memory did you allocate to the JVM process?
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Greg
>>>>>>>
>>>>>>> On Friday, May 22, 2009, at 10:39PM, "Edgar Merino" <do...@gmail.com> wrote:
>>>>>>>
>>>>>>>> Hello,
>>>>>>>>
>>>>>>>> I recently discovered pivot, currently using svn revision 777773.
>>>>>>>> I've got an application where I would like to place a fixed image
>>>>>>>> background (although it'll have to be scaled each time the window is
>>>>>>>> resized). I've tried placing the background by putting all the
>>>>>>>> components inside a StackPane, however performance drops terrible if I
>>>>>>>> do it this way (all the other components in the stack move slow, e.g.
>>>>>>>> Prompts and Frames). Is there any other way to do what I need without
>>>>>>>> suffering from such a terrible performance bottleneck?
>>>>>>>>
>>>>>>>> Thanks in advance,
>>>>>>>> Edgar Merino
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>
>
Re: Background image
Posted by Todd Volkert <tv...@gmail.com>.
This implies that ImageViewSkin should do the background painting to
the BufferedImage and cache the resulting buffered image so that it
can use it in its paint() method. It's update the buffered image when
it received an ImageEvent on the image or a notification from the
ImageView that its image reference changed. Just talking this out to
make sure I'm picturing the same thing you're picturing...
-T
On Sun, May 24, 2009 at 9:18 AM, Noel Grandin <no...@gmail.com> wrote:
> depending on the machine and the graphics driver, you can sometimes
> have wildly varying results if you don't feed the right BufferedImage
> format to the graphics pipeline.
> Typically, each graphics driver has a preferred format (normally 8 bit
> RGBA these days).
> But sometimes it want RGB or BGR, and it the image is in the "wrong"
> format, it can slow things down.
>
> The best approach is to ask the pipeline what image format is wants,
> create a BufferedImage of that format, render you background image to
> the BufferedImage, and then render your BufferedImage to the screen on
> a repaint.
>
> Regards, Noel.
>
> On Sun, May 24, 2009 at 01:53, Greg Brown <gk...@mac.com> wrote:
>> Sorry - more specifically, those are the timings for painting the dirty region when dragging the Alert around the screen in the modified Stack Panes tutorial.
>>
>> On Saturday, May 23, 2009, at 06:51PM, "Greg Brown" <gk...@mac.com> wrote:
>>>That's very interesting. I tried removing the alpha channel from the PNG, but that didn't help. cc'ing the dev list - PNG as a background image causes noticeable repaint delays, but a JPEG doesn't (see below). Anyone have any ideas?
>>>
>>>On Saturday, May 23, 2009, at 03:42PM, "Edgar Merino" <do...@gmail.com> wrote:
>>>>Thanks for the suggestions, I tried running the StackPanes demo, and
>>>>noticed it didn't suffered from such a performance bottleneck, I noticed
>>>>the background image was a jpg, I'm currently using a png for the
>>>>background, so tried the demo with my image (800x600) and the
>>>>performance problem arised again. After I changed the format of my
>>>>background to jpg everything went fine. So I can confirm the problem
>>>>happens (at least) with png images. Attached is a copy of my background
>>>>image (in both png and jpg).
>>>>
>>>>Thanks for the help again!
>>>>Edgar Merino
>>>>
>>>>
>>>>Todd Volkert escribió:
>>>>> I guess I'll add:
>>>>>
>>>>> - Are you running inside a VM? If so, which virtualization software
>>>>> and version?
>>>>>
>>>>> -T
>>>>>
>>>>> On Sat, May 23, 2009 at 9:05 AM, Greg Brown <gk...@mac.com> wrote:
>>>>>
>>>>>> Hi Edgar,
>>>>>>
>>>>>> I just added the following code to the stack panes demo (pivot.tutorials.layout.StackPanes):
>>>>>>
>>>>>> Alert.alert("Hello, World!", display);
>>>>>>
>>>>>> I added it to the startup() method, right after the line that opens the window (line 32). I didn't notice any performance issues - can you try the same test and let us know what behavior you get?
>>>>>>
>>>>>> Also, can you let us know:
>>>>>> - How big is the background image (in pixels)?
>>>>>> - What were the display dimensions of the window containing the scaled image when you noticed the problem?
>>>>>> - What OS are you running?
>>>>>> - What JVM version/vendor?
>>>>>> - How much main memory does your system have, and how much video memory?
>>>>>> - How much memory did you allocate to the JVM process?
>>>>>>
>>>>>> Thanks,
>>>>>> Greg
>>>>>>
>>>>>> On Friday, May 22, 2009, at 10:39PM, "Edgar Merino" <do...@gmail.com> wrote:
>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> I recently discovered pivot, currently using svn revision 777773.
>>>>>>> I've got an application where I would like to place a fixed image
>>>>>>> background (although it'll have to be scaled each time the window is
>>>>>>> resized). I've tried placing the background by putting all the
>>>>>>> components inside a StackPane, however performance drops terrible if I
>>>>>>> do it this way (all the other components in the stack move slow, e.g.
>>>>>>> Prompts and Frames). Is there any other way to do what I need without
>>>>>>> suffering from such a terrible performance bottleneck?
>>>>>>>
>>>>>>> Thanks in advance,
>>>>>>> Edgar Merino
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>
Re: Background image
Posted by Noel Grandin <no...@gmail.com>.
depending on the machine and the graphics driver, you can sometimes
have wildly varying results if you don't feed the right BufferedImage
format to the graphics pipeline.
Typically, each graphics driver has a preferred format (normally 8 bit
RGBA these days).
But sometimes it want RGB or BGR, and it the image is in the "wrong"
format, it can slow things down.
The best approach is to ask the pipeline what image format is wants,
create a BufferedImage of that format, render you background image to
the BufferedImage, and then render your BufferedImage to the screen on
a repaint.
Regards, Noel.
On Sun, May 24, 2009 at 01:53, Greg Brown <gk...@mac.com> wrote:
> Sorry - more specifically, those are the timings for painting the dirty region when dragging the Alert around the screen in the modified Stack Panes tutorial.
>
> On Saturday, May 23, 2009, at 06:51PM, "Greg Brown" <gk...@mac.com> wrote:
>>That's very interesting. I tried removing the alpha channel from the PNG, but that didn't help. cc'ing the dev list - PNG as a background image causes noticeable repaint delays, but a JPEG doesn't (see below). Anyone have any ideas?
>>
>>On Saturday, May 23, 2009, at 03:42PM, "Edgar Merino" <do...@gmail.com> wrote:
>>>Thanks for the suggestions, I tried running the StackPanes demo, and
>>>noticed it didn't suffered from such a performance bottleneck, I noticed
>>>the background image was a jpg, I'm currently using a png for the
>>>background, so tried the demo with my image (800x600) and the
>>>performance problem arised again. After I changed the format of my
>>>background to jpg everything went fine. So I can confirm the problem
>>>happens (at least) with png images. Attached is a copy of my background
>>>image (in both png and jpg).
>>>
>>>Thanks for the help again!
>>>Edgar Merino
>>>
>>>
>>>Todd Volkert escribió:
>>>> I guess I'll add:
>>>>
>>>> - Are you running inside a VM? If so, which virtualization software
>>>> and version?
>>>>
>>>> -T
>>>>
>>>> On Sat, May 23, 2009 at 9:05 AM, Greg Brown <gk...@mac.com> wrote:
>>>>
>>>>> Hi Edgar,
>>>>>
>>>>> I just added the following code to the stack panes demo (pivot.tutorials.layout.StackPanes):
>>>>>
>>>>> Alert.alert("Hello, World!", display);
>>>>>
>>>>> I added it to the startup() method, right after the line that opens the window (line 32). I didn't notice any performance issues - can you try the same test and let us know what behavior you get?
>>>>>
>>>>> Also, can you let us know:
>>>>> - How big is the background image (in pixels)?
>>>>> - What were the display dimensions of the window containing the scaled image when you noticed the problem?
>>>>> - What OS are you running?
>>>>> - What JVM version/vendor?
>>>>> - How much main memory does your system have, and how much video memory?
>>>>> - How much memory did you allocate to the JVM process?
>>>>>
>>>>> Thanks,
>>>>> Greg
>>>>>
>>>>> On Friday, May 22, 2009, at 10:39PM, "Edgar Merino" <do...@gmail.com> wrote:
>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> I recently discovered pivot, currently using svn revision 777773.
>>>>>> I've got an application where I would like to place a fixed image
>>>>>> background (although it'll have to be scaled each time the window is
>>>>>> resized). I've tried placing the background by putting all the
>>>>>> components inside a StackPane, however performance drops terrible if I
>>>>>> do it this way (all the other components in the stack move slow, e.g.
>>>>>> Prompts and Frames). Is there any other way to do what I need without
>>>>>> suffering from such a terrible performance bottleneck?
>>>>>>
>>>>>> Thanks in advance,
>>>>>> Edgar Merino
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>
Re: Background image
Posted by Greg Brown <gk...@mac.com>.
Sorry - more specifically, those are the timings for painting the dirty region when dragging the Alert around the screen in the modified Stack Panes tutorial.
On Saturday, May 23, 2009, at 06:51PM, "Greg Brown" <gk...@mac.com> wrote:
>That's very interesting. I tried removing the alpha channel from the PNG, but that didn't help. cc'ing the dev list - PNG as a background image causes noticeable repaint delays, but a JPEG doesn't (see below). Anyone have any ideas?
>
>On Saturday, May 23, 2009, at 03:42PM, "Edgar Merino" <do...@gmail.com> wrote:
>>Thanks for the suggestions, I tried running the StackPanes demo, and
>>noticed it didn't suffered from such a performance bottleneck, I noticed
>>the background image was a jpg, I'm currently using a png for the
>>background, so tried the demo with my image (800x600) and the
>>performance problem arised again. After I changed the format of my
>>background to jpg everything went fine. So I can confirm the problem
>>happens (at least) with png images. Attached is a copy of my background
>>image (in both png and jpg).
>>
>>Thanks for the help again!
>>Edgar Merino
>>
>>
>>Todd Volkert escribió:
>>> I guess I'll add:
>>>
>>> - Are you running inside a VM? If so, which virtualization software
>>> and version?
>>>
>>> -T
>>>
>>> On Sat, May 23, 2009 at 9:05 AM, Greg Brown <gk...@mac.com> wrote:
>>>
>>>> Hi Edgar,
>>>>
>>>> I just added the following code to the stack panes demo (pivot.tutorials.layout.StackPanes):
>>>>
>>>> Alert.alert("Hello, World!", display);
>>>>
>>>> I added it to the startup() method, right after the line that opens the window (line 32). I didn't notice any performance issues - can you try the same test and let us know what behavior you get?
>>>>
>>>> Also, can you let us know:
>>>> - How big is the background image (in pixels)?
>>>> - What were the display dimensions of the window containing the scaled image when you noticed the problem?
>>>> - What OS are you running?
>>>> - What JVM version/vendor?
>>>> - How much main memory does your system have, and how much video memory?
>>>> - How much memory did you allocate to the JVM process?
>>>>
>>>> Thanks,
>>>> Greg
>>>>
>>>> On Friday, May 22, 2009, at 10:39PM, "Edgar Merino" <do...@gmail.com> wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> I recently discovered pivot, currently using svn revision 777773.
>>>>> I've got an application where I would like to place a fixed image
>>>>> background (although it'll have to be scaled each time the window is
>>>>> resized). I've tried placing the background by putting all the
>>>>> components inside a StackPane, however performance drops terrible if I
>>>>> do it this way (all the other components in the stack move slow, e.g.
>>>>> Prompts and Frames). Is there any other way to do what I need without
>>>>> suffering from such a terrible performance bottleneck?
>>>>>
>>>>> Thanks in advance,
>>>>> Edgar Merino
>>>>>
>>>>>
>>>>>
>>>
>>>
>>
>>
>>
>
>
Re: Background image
Posted by Greg Brown <gk...@mac.com>.
Here's a little more info - graphics#drawImage() for the JPEG takes ~1ms, and for the PNG takes between 50ms and 100ms. Not sure why yet.
On Saturday, May 23, 2009, at 06:51PM, "Greg Brown" <gk...@mac.com> wrote:
>That's very interesting. I tried removing the alpha channel from the PNG, but that didn't help. cc'ing the dev list - PNG as a background image causes noticeable repaint delays, but a JPEG doesn't (see below). Anyone have any ideas?
>
>On Saturday, May 23, 2009, at 03:42PM, "Edgar Merino" <do...@gmail.com> wrote:
>>Thanks for the suggestions, I tried running the StackPanes demo, and
>>noticed it didn't suffered from such a performance bottleneck, I noticed
>>the background image was a jpg, I'm currently using a png for the
>>background, so tried the demo with my image (800x600) and the
>>performance problem arised again. After I changed the format of my
>>background to jpg everything went fine. So I can confirm the problem
>>happens (at least) with png images. Attached is a copy of my background
>>image (in both png and jpg).
>>
>>Thanks for the help again!
>>Edgar Merino
>>
>>
>>Todd Volkert escribió:
>>> I guess I'll add:
>>>
>>> - Are you running inside a VM? If so, which virtualization software
>>> and version?
>>>
>>> -T
>>>
>>> On Sat, May 23, 2009 at 9:05 AM, Greg Brown <gk...@mac.com> wrote:
>>>
>>>> Hi Edgar,
>>>>
>>>> I just added the following code to the stack panes demo (pivot.tutorials.layout.StackPanes):
>>>>
>>>> Alert.alert("Hello, World!", display);
>>>>
>>>> I added it to the startup() method, right after the line that opens the window (line 32). I didn't notice any performance issues - can you try the same test and let us know what behavior you get?
>>>>
>>>> Also, can you let us know:
>>>> - How big is the background image (in pixels)?
>>>> - What were the display dimensions of the window containing the scaled image when you noticed the problem?
>>>> - What OS are you running?
>>>> - What JVM version/vendor?
>>>> - How much main memory does your system have, and how much video memory?
>>>> - How much memory did you allocate to the JVM process?
>>>>
>>>> Thanks,
>>>> Greg
>>>>
>>>> On Friday, May 22, 2009, at 10:39PM, "Edgar Merino" <do...@gmail.com> wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> I recently discovered pivot, currently using svn revision 777773.
>>>>> I've got an application where I would like to place a fixed image
>>>>> background (although it'll have to be scaled each time the window is
>>>>> resized). I've tried placing the background by putting all the
>>>>> components inside a StackPane, however performance drops terrible if I
>>>>> do it this way (all the other components in the stack move slow, e.g.
>>>>> Prompts and Frames). Is there any other way to do what I need without
>>>>> suffering from such a terrible performance bottleneck?
>>>>>
>>>>> Thanks in advance,
>>>>> Edgar Merino
>>>>>
>>>>>
>>>>>
>>>
>>>
>>
>>
>>
>
>
Re: Background image
Posted by Greg Brown <gk...@mac.com>.
Sorry - more specifically, those are the timings for painting the dirty region when dragging the Alert around the screen in the modified Stack Panes tutorial.
On Saturday, May 23, 2009, at 06:51PM, "Greg Brown" <gk...@mac.com> wrote:
>That's very interesting. I tried removing the alpha channel from the PNG, but that didn't help. cc'ing the dev list - PNG as a background image causes noticeable repaint delays, but a JPEG doesn't (see below). Anyone have any ideas?
>
>On Saturday, May 23, 2009, at 03:42PM, "Edgar Merino" <do...@gmail.com> wrote:
>>Thanks for the suggestions, I tried running the StackPanes demo, and
>>noticed it didn't suffered from such a performance bottleneck, I noticed
>>the background image was a jpg, I'm currently using a png for the
>>background, so tried the demo with my image (800x600) and the
>>performance problem arised again. After I changed the format of my
>>background to jpg everything went fine. So I can confirm the problem
>>happens (at least) with png images. Attached is a copy of my background
>>image (in both png and jpg).
>>
>>Thanks for the help again!
>>Edgar Merino
>>
>>
>>Todd Volkert escribió:
>>> I guess I'll add:
>>>
>>> - Are you running inside a VM? If so, which virtualization software
>>> and version?
>>>
>>> -T
>>>
>>> On Sat, May 23, 2009 at 9:05 AM, Greg Brown <gk...@mac.com> wrote:
>>>
>>>> Hi Edgar,
>>>>
>>>> I just added the following code to the stack panes demo (pivot.tutorials.layout.StackPanes):
>>>>
>>>> Alert.alert("Hello, World!", display);
>>>>
>>>> I added it to the startup() method, right after the line that opens the window (line 32). I didn't notice any performance issues - can you try the same test and let us know what behavior you get?
>>>>
>>>> Also, can you let us know:
>>>> - How big is the background image (in pixels)?
>>>> - What were the display dimensions of the window containing the scaled image when you noticed the problem?
>>>> - What OS are you running?
>>>> - What JVM version/vendor?
>>>> - How much main memory does your system have, and how much video memory?
>>>> - How much memory did you allocate to the JVM process?
>>>>
>>>> Thanks,
>>>> Greg
>>>>
>>>> On Friday, May 22, 2009, at 10:39PM, "Edgar Merino" <do...@gmail.com> wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> I recently discovered pivot, currently using svn revision 777773.
>>>>> I've got an application where I would like to place a fixed image
>>>>> background (although it'll have to be scaled each time the window is
>>>>> resized). I've tried placing the background by putting all the
>>>>> components inside a StackPane, however performance drops terrible if I
>>>>> do it this way (all the other components in the stack move slow, e.g.
>>>>> Prompts and Frames). Is there any other way to do what I need without
>>>>> suffering from such a terrible performance bottleneck?
>>>>>
>>>>> Thanks in advance,
>>>>> Edgar Merino
>>>>>
>>>>>
>>>>>
>>>
>>>
>>
>>
>>
>
>