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" <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 <[email protected]> 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" <[email protected]> 
>>>> 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" <[email protected]> 
>>>>>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 <[email protected]> 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" 
>>>>>>>> <[email protected]> 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
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>
>

Reply via email to