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/09/30 17:01:23 UTC

Applet flicker issue

Hi all,

I did some digging to see what we might be able to do to resolve the  
flickering that occurs when scrolling a web page that contains a Pivot  
applet. The flicker is caused when the background of the applet peer  
is repainted before the Pivot display is called to paint. Sun provides  
two system properties that control this behavior:

sun.awt.noerasebackground
sun.awt.erasebackgroundonresize

Setting these values to "true" eliminates the flicker. We currently  
set them in the DisplayHost, but they can only be set by trusted code.  
As a result, signed applets won't currently display the issue, but  
untrusted applets will.

Fortunately, recent versions of the Java Plugin allow the caller to  
specify a limited set of JVM arguments as an applet parameter, and  
these properties are in the list of supported arguments. So, to  
eliminate the flicker in untrusted applets, you can pass these using  
the java_arguments applet param:

http://java.sun.com/javase/6/docs/technotes/guides/jweb/applet/applet_deployment.html#JAVA_ARGUMENTS

For example:

<param name="java_arguments" value="-Dsun.awt.noerasebackground=true - 
Dsun.awt.erasebackgroundonresize=true">

Unfortunately, the properties don't appear to have any effect in Mac  
OS X, but they do seem to work in Windows (I haven't tested Linux).

Hope this helps. I will be updating all of the demos and tutorials to  
include these arguments.

Greg


Re: Applet flicker issue

Posted by Greg Brown <gk...@mac.com>.
Looks good to me, and saves me the trouble of submitting it myself  
(which I was just about to do).  :-)

Let us know if you hear anything from them. They have (eventually)  
responded to every bug report I have filed except for one, which is  
still outstanding (and, unfortunately, still a bug).


On Sep 30, 2009, at 12:07 PM, Christopher Brind wrote:

> OK, I've raised the following bug with them (I can update the report
> with additional notes, but I can't edit the main report).
>
>
> -- START --
> Title: Flicker with Java applets
> Problem ID: 7264588
> Report:
> 30-Sep-2009 05:04 PM Christopher Brind:
> Summary:
> When viewing a Java applet on a web page, the applet flickers when the
> user finishes scrolling the page.
>
> Steps to Reproduce:
> 1) Go to this page
> http://www.insideria.com/2009/09/building-a-slide-gallery-demo.html
> 2) Scroll down the page.
>
> Expected Results:
> The applet should not flicker.
>
> Actual Results:
> The applet flickers when the scrolling stops.  (It also flickers
> randomly when you move the mouse around but this is not reproducible
> consistently)
>
> Regression:
> I've tried this on OS 10.6.1 on my Mac Book Pro and iMac and it occurs
> consistently.  Had also noticed on 10.5.? with Java 5, but I no longer
> have access to a system of that specification now.  This happens both
> in Safari and Firefox.
>
> Notes:
> Sun provides two system properties that control this behavior:
>
> sun.awt.noerasebackground
> sun.awt.erasebackgroundonresize
>
> These do not appear to be supported by Java on Mac.
>
> -- END --
>
> Hope that's OK.
>
> Cheers,
> Chris
>
>
>
> 2009/9/30 Greg Brown <gk...@mac.com>:
>> Sounds like we might want to submit a bug to them asking them to  
>> support
>> those two system properties.
>>
>> On Sep 30, 2009, at 11:42 AM, Christopher Brind wrote:
>>
>>> We need to get on Apple's case to fix the flicker bug then?
>>>
>>> 2009/9/30 Greg Brown <gk...@mac.com>:
>>>>
>>>> Good to know. Thanks.
>>>>
>>>> On Sep 30, 2009, at 11:39 AM, Sandro Martini wrote:
>>>>
>>>>> Hi Greg,
>>>>> thanks again for the update.
>>>>>
>>>>> I've just tried also in a Virtualized Ubuntu 9.04 (with all  
>>>>> patches,
>>>>> and the latest Sun Java 6), and all works good in Firefox 3.5.x.
>>>>> Without flickering (but I haven't tried before, without the  
>>>>> arguments
>>>>> you just added ...), and without scrolling artifacts.
>>>>>
>>>>> Bye
>>>>
>>>>
>>
>>


Re: Applet flicker issue

Posted by Christopher Brind <br...@brindy.org.uk>.
OK, I've raised the following bug with them (I can update the report
with additional notes, but I can't edit the main report).


-- START --
Title: Flicker with Java applets
Problem ID: 7264588
Report:
30-Sep-2009 05:04 PM Christopher Brind:
Summary:
When viewing a Java applet on a web page, the applet flickers when the
user finishes scrolling the page.

Steps to Reproduce:
1) Go to this page
http://www.insideria.com/2009/09/building-a-slide-gallery-demo.html
2) Scroll down the page.

Expected Results:
The applet should not flicker.

Actual Results:
The applet flickers when the scrolling stops.  (It also flickers
randomly when you move the mouse around but this is not reproducible
consistently)

Regression:
I've tried this on OS 10.6.1 on my Mac Book Pro and iMac and it occurs
consistently.  Had also noticed on 10.5.? with Java 5, but I no longer
have access to a system of that specification now.  This happens both
in Safari and Firefox.

Notes:
Sun provides two system properties that control this behavior:

sun.awt.noerasebackground
sun.awt.erasebackgroundonresize

These do not appear to be supported by Java on Mac.

-- END --

Hope that's OK.

Cheers,
Chris



2009/9/30 Greg Brown <gk...@mac.com>:
> Sounds like we might want to submit a bug to them asking them to support
> those two system properties.
>
> On Sep 30, 2009, at 11:42 AM, Christopher Brind wrote:
>
>> We need to get on Apple's case to fix the flicker bug then?
>>
>> 2009/9/30 Greg Brown <gk...@mac.com>:
>>>
>>> Good to know. Thanks.
>>>
>>> On Sep 30, 2009, at 11:39 AM, Sandro Martini wrote:
>>>
>>>> Hi Greg,
>>>> thanks again for the update.
>>>>
>>>> I've just tried also in a Virtualized Ubuntu 9.04 (with all patches,
>>>> and the latest Sun Java 6), and all works good in Firefox 3.5.x.
>>>> Without flickering (but I haven't tried before, without the arguments
>>>> you just added ...), and without scrolling artifacts.
>>>>
>>>> Bye
>>>
>>>
>
>

Re: Applet flicker issue

Posted by Greg Brown <gk...@mac.com>.
Sounds like we might want to submit a bug to them asking them to  
support those two system properties.

On Sep 30, 2009, at 11:42 AM, Christopher Brind wrote:

> We need to get on Apple's case to fix the flicker bug then?
>
> 2009/9/30 Greg Brown <gk...@mac.com>:
>> Good to know. Thanks.
>>
>> On Sep 30, 2009, at 11:39 AM, Sandro Martini wrote:
>>
>>> Hi Greg,
>>> thanks again for the update.
>>>
>>> I've just tried also in a Virtualized Ubuntu 9.04 (with all patches,
>>> and the latest Sun Java 6), and all works good in Firefox 3.5.x.
>>> Without flickering (but I haven't tried before, without the  
>>> arguments
>>> you just added ...), and without scrolling artifacts.
>>>
>>> Bye
>>
>>


Re: Applet flicker issue

Posted by Christopher Brind <br...@brindy.org.uk>.
We need to get on Apple's case to fix the flicker bug then?

2009/9/30 Greg Brown <gk...@mac.com>:
> Good to know. Thanks.
>
> On Sep 30, 2009, at 11:39 AM, Sandro Martini wrote:
>
>> Hi Greg,
>> thanks again for the update.
>>
>> I've just tried also in a Virtualized Ubuntu 9.04 (with all patches,
>> and the latest Sun Java 6), and all works good in Firefox 3.5.x.
>> Without flickering (but I haven't tried before, without the arguments
>> you just added ...), and without scrolling artifacts.
>>
>> Bye
>
>

Re: Applet flicker issue

Posted by Todd Volkert <tv...@gmail.com>.
For what it's worth, I just checked 1.6.0_14 on Linux x64, and I don't get
flickering even without those parameters.

On Wed, Sep 30, 2009 at 11:41 AM, Greg Brown <gk...@mac.com> wrote:

> Good to know. Thanks.
>
>
> On Sep 30, 2009, at 11:39 AM, Sandro Martini wrote:
>
>  Hi Greg,
>> thanks again for the update.
>>
>> I've just tried also in a Virtualized Ubuntu 9.04 (with all patches,
>> and the latest Sun Java 6), and all works good in Firefox 3.5.x.
>> Without flickering (but I haven't tried before, without the arguments
>> you just added ...), and without scrolling artifacts.
>>
>> Bye
>>
>
>

Re: Applet flicker issue

Posted by Greg Brown <gk...@mac.com>.
Good to know. Thanks.

On Sep 30, 2009, at 11:39 AM, Sandro Martini wrote:

> Hi Greg,
> thanks again for the update.
>
> I've just tried also in a Virtualized Ubuntu 9.04 (with all patches,
> and the latest Sun Java 6), and all works good in Firefox 3.5.x.
> Without flickering (but I haven't tried before, without the arguments
> you just added ...), and without scrolling artifacts.
>
> Bye


Re: Applet flicker issue

Posted by Sandro Martini <sa...@gmail.com>.
Hi Greg,
thanks again for the update.

I've just tried also in a Virtualized Ubuntu 9.04 (with all patches,
and the latest Sun Java 6), and all works good in Firefox 3.5.x.
Without flickering (but I haven't tried before, without the arguments
you just added ...), and without scrolling artifacts.

Bye

Re: Applet flicker issue

Posted by Greg Brown <gk...@mac.com>.
Done.

On Sep 30, 2009, at 11:08 AM, Sandro Martini wrote:

> Hi Greg,
> thanks for the tip ... so do you think to update the InsideRIA
> tutorial on this morning with these parameters ?
>
> Bye


Re: Applet flicker issue

Posted by Sandro Martini <sa...@gmail.com>.
Hi Greg,
thanks for the tip ... so do you think to update the InsideRIA
tutorial on this morning with these parameters ?

Bye