You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Oleg Khaschansky (JIRA)" <ji...@apache.org> on 2006/10/02 16:19:19 UTC
[jira] Created: (HARMONY-1659) [classlib][awt] Caching of images
prevents from showing animation.
[classlib][awt] Caching of images prevents from showing animation.
------------------------------------------------------------------
Key: HARMONY-1659
URL: http://issues.apache.org/jira/browse/HARMONY-1659
Project: Harmony
Issue Type: Bug
Components: Classlib
Reporter: Oleg Khaschansky
Attachments: anim.gif
Current implementation of the class org.apache.harmony.awt.gl.image.OffscreenImage doesn't invalidate its cached surface. As a result, when animated image is updated, blitter will draw cached data, i.e. the first frame. OffscreenImage should invalidate the native cache when it accepts new pixel data.
I am going to provide a patch for this issue.
The following test reveals this issue (requires an attached image):
------------------------------------------------------------------------------------
import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
public class test {
static Image im;
private static void init() {
im = Toolkit.getDefaultToolkit().getImage("anim.gif");
}
public static void main(String[] args) {
Frame f = new Frame("TestDrawImage");
Canvas c = new Canvas(){
public void paint(Graphics g) {
g.drawImage(im, 0, 0, 200, 200, this);
}
public boolean imageUpdate(Image img, int infoflags, int x, int y, int w, int h) {
if ((infoflags & ALLBITS) != 0)
repaint();
if ((infoflags & FRAMEBITS) != 0)
repaint();
return isShowing();
}
};
init();
f.add(c);
f.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent we) {
we.getWindow().dispose();
}
});
f.setSize(300, 300);
f.show();
}
}
------------------------------------------------------------------------------------
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HARMONY-1659) [classlib][awt] Caching of images
prevents from showing animation.
Posted by "Oleg Khaschansky (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1659?page=comments#action_12450086 ]
Oleg Khaschansky commented on HARMONY-1659:
-------------------------------------------
Verified on j9, win32.
> [classlib][awt] Caching of images prevents from showing animation.
> ------------------------------------------------------------------
>
> Key: HARMONY-1659
> URL: http://issues.apache.org/jira/browse/HARMONY-1659
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Oleg Khaschansky
> Assigned To: Alexey Petrenko
> Attachments: anim.gif, harmony-1659.patch
>
>
> Current implementation of the class org.apache.harmony.awt.gl.image.OffscreenImage doesn't invalidate its cached surface. As a result, when animated image is updated, blitter will draw cached data, i.e. the first frame. OffscreenImage should invalidate the native cache when it accepts new pixel data.
> I am going to provide a patch for this issue.
> The following test reveals this issue (requires an attached image):
> ------------------------------------------------------------------------------------
> import java.awt.*;
> import java.awt.event.WindowAdapter;
> import java.awt.event.WindowEvent;
> public class test {
> static Image im;
> private static void init() {
> im = Toolkit.getDefaultToolkit().getImage("anim.gif");
> }
> public static void main(String[] args) {
> Frame f = new Frame("TestDrawImage");
> Canvas c = new Canvas(){
> public void paint(Graphics g) {
> g.drawImage(im, 0, 0, 200, 200, this);
> }
> public boolean imageUpdate(Image img, int infoflags, int x, int y, int w, int h) {
> if ((infoflags & ALLBITS) != 0)
> repaint();
> if ((infoflags & FRAMEBITS) != 0)
> repaint();
> return isShowing();
> }
> };
> init();
> f.add(c);
> f.addWindowListener(new WindowAdapter() {
> public void windowClosing(WindowEvent we) {
> we.getWindow().dispose();
> }
> });
> f.setSize(300, 300);
> f.show();
> }
> }
> ------------------------------------------------------------------------------------
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Assigned: (HARMONY-1659) [classlib][awt] Caching of images
prevents from showing animation.
Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1659?page=all ]
Alexey Petrenko reassigned HARMONY-1659:
----------------------------------------
Assignee: Alexey Petrenko
> [classlib][awt] Caching of images prevents from showing animation.
> ------------------------------------------------------------------
>
> Key: HARMONY-1659
> URL: http://issues.apache.org/jira/browse/HARMONY-1659
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Oleg Khaschansky
> Assigned To: Alexey Petrenko
> Attachments: anim.gif, harmony-1659.patch
>
>
> Current implementation of the class org.apache.harmony.awt.gl.image.OffscreenImage doesn't invalidate its cached surface. As a result, when animated image is updated, blitter will draw cached data, i.e. the first frame. OffscreenImage should invalidate the native cache when it accepts new pixel data.
> I am going to provide a patch for this issue.
> The following test reveals this issue (requires an attached image):
> ------------------------------------------------------------------------------------
> import java.awt.*;
> import java.awt.event.WindowAdapter;
> import java.awt.event.WindowEvent;
> public class test {
> static Image im;
> private static void init() {
> im = Toolkit.getDefaultToolkit().getImage("anim.gif");
> }
> public static void main(String[] args) {
> Frame f = new Frame("TestDrawImage");
> Canvas c = new Canvas(){
> public void paint(Graphics g) {
> g.drawImage(im, 0, 0, 200, 200, this);
> }
> public boolean imageUpdate(Image img, int infoflags, int x, int y, int w, int h) {
> if ((infoflags & ALLBITS) != 0)
> repaint();
> if ((infoflags & FRAMEBITS) != 0)
> repaint();
> return isShowing();
> }
> };
> init();
> f.add(c);
> f.addWindowListener(new WindowAdapter() {
> public void windowClosing(WindowEvent we) {
> we.getWindow().dispose();
> }
> });
> f.setSize(300, 300);
> f.show();
> }
> }
> ------------------------------------------------------------------------------------
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Closed: (HARMONY-1659) [classlib][awt] Caching of images
prevents from showing animation.
Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1659?page=all ]
Alexey Petrenko closed HARMONY-1659.
------------------------------------
Thanks.
> [classlib][awt] Caching of images prevents from showing animation.
> ------------------------------------------------------------------
>
> Key: HARMONY-1659
> URL: http://issues.apache.org/jira/browse/HARMONY-1659
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Oleg Khaschansky
> Assigned To: Alexey Petrenko
> Attachments: anim.gif, harmony-1659.patch
>
>
> Current implementation of the class org.apache.harmony.awt.gl.image.OffscreenImage doesn't invalidate its cached surface. As a result, when animated image is updated, blitter will draw cached data, i.e. the first frame. OffscreenImage should invalidate the native cache when it accepts new pixel data.
> I am going to provide a patch for this issue.
> The following test reveals this issue (requires an attached image):
> ------------------------------------------------------------------------------------
> import java.awt.*;
> import java.awt.event.WindowAdapter;
> import java.awt.event.WindowEvent;
> public class test {
> static Image im;
> private static void init() {
> im = Toolkit.getDefaultToolkit().getImage("anim.gif");
> }
> public static void main(String[] args) {
> Frame f = new Frame("TestDrawImage");
> Canvas c = new Canvas(){
> public void paint(Graphics g) {
> g.drawImage(im, 0, 0, 200, 200, this);
> }
> public boolean imageUpdate(Image img, int infoflags, int x, int y, int w, int h) {
> if ((infoflags & ALLBITS) != 0)
> repaint();
> if ((infoflags & FRAMEBITS) != 0)
> repaint();
> return isShowing();
> }
> };
> init();
> f.add(c);
> f.addWindowListener(new WindowAdapter() {
> public void windowClosing(WindowEvent we) {
> we.getWindow().dispose();
> }
> });
> f.setSize(300, 300);
> f.show();
> }
> }
> ------------------------------------------------------------------------------------
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Resolved: (HARMONY-1659) [classlib][awt] Caching of images
prevents from showing animation.
Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1659?page=all ]
Alexey Petrenko resolved HARMONY-1659.
--------------------------------------
Resolution: Fixed
The patch has been applied.
Oleg, please verify.
> [classlib][awt] Caching of images prevents from showing animation.
> ------------------------------------------------------------------
>
> Key: HARMONY-1659
> URL: http://issues.apache.org/jira/browse/HARMONY-1659
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Oleg Khaschansky
> Assigned To: Alexey Petrenko
> Attachments: anim.gif, harmony-1659.patch
>
>
> Current implementation of the class org.apache.harmony.awt.gl.image.OffscreenImage doesn't invalidate its cached surface. As a result, when animated image is updated, blitter will draw cached data, i.e. the first frame. OffscreenImage should invalidate the native cache when it accepts new pixel data.
> I am going to provide a patch for this issue.
> The following test reveals this issue (requires an attached image):
> ------------------------------------------------------------------------------------
> import java.awt.*;
> import java.awt.event.WindowAdapter;
> import java.awt.event.WindowEvent;
> public class test {
> static Image im;
> private static void init() {
> im = Toolkit.getDefaultToolkit().getImage("anim.gif");
> }
> public static void main(String[] args) {
> Frame f = new Frame("TestDrawImage");
> Canvas c = new Canvas(){
> public void paint(Graphics g) {
> g.drawImage(im, 0, 0, 200, 200, this);
> }
> public boolean imageUpdate(Image img, int infoflags, int x, int y, int w, int h) {
> if ((infoflags & ALLBITS) != 0)
> repaint();
> if ((infoflags & FRAMEBITS) != 0)
> repaint();
> return isShowing();
> }
> };
> init();
> f.add(c);
> f.addWindowListener(new WindowAdapter() {
> public void windowClosing(WindowEvent we) {
> we.getWindow().dispose();
> }
> });
> f.setSize(300, 300);
> f.show();
> }
> }
> ------------------------------------------------------------------------------------
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (HARMONY-1659) [classlib][awt] Caching of images
prevents from showing animation.
Posted by "Oleg Khaschansky (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1659?page=all ]
Oleg Khaschansky updated HARMONY-1659:
--------------------------------------
Patch Info: [Patch Available]
> [classlib][awt] Caching of images prevents from showing animation.
> ------------------------------------------------------------------
>
> Key: HARMONY-1659
> URL: http://issues.apache.org/jira/browse/HARMONY-1659
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Oleg Khaschansky
> Attachments: anim.gif, harmony-1659.patch
>
>
> Current implementation of the class org.apache.harmony.awt.gl.image.OffscreenImage doesn't invalidate its cached surface. As a result, when animated image is updated, blitter will draw cached data, i.e. the first frame. OffscreenImage should invalidate the native cache when it accepts new pixel data.
> I am going to provide a patch for this issue.
> The following test reveals this issue (requires an attached image):
> ------------------------------------------------------------------------------------
> import java.awt.*;
> import java.awt.event.WindowAdapter;
> import java.awt.event.WindowEvent;
> public class test {
> static Image im;
> private static void init() {
> im = Toolkit.getDefaultToolkit().getImage("anim.gif");
> }
> public static void main(String[] args) {
> Frame f = new Frame("TestDrawImage");
> Canvas c = new Canvas(){
> public void paint(Graphics g) {
> g.drawImage(im, 0, 0, 200, 200, this);
> }
> public boolean imageUpdate(Image img, int infoflags, int x, int y, int w, int h) {
> if ((infoflags & ALLBITS) != 0)
> repaint();
> if ((infoflags & FRAMEBITS) != 0)
> repaint();
> return isShowing();
> }
> };
> init();
> f.add(c);
> f.addWindowListener(new WindowAdapter() {
> public void windowClosing(WindowEvent we) {
> we.getWindow().dispose();
> }
> });
> f.setSize(300, 300);
> f.show();
> }
> }
> ------------------------------------------------------------------------------------
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (HARMONY-1659) [classlib][awt] Caching of images
prevents from showing animation.
Posted by "Oleg Khaschansky (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1659?page=all ]
Oleg Khaschansky updated HARMONY-1659:
--------------------------------------
Attachment: anim.gif
> [classlib][awt] Caching of images prevents from showing animation.
> ------------------------------------------------------------------
>
> Key: HARMONY-1659
> URL: http://issues.apache.org/jira/browse/HARMONY-1659
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Oleg Khaschansky
> Attachments: anim.gif
>
>
> Current implementation of the class org.apache.harmony.awt.gl.image.OffscreenImage doesn't invalidate its cached surface. As a result, when animated image is updated, blitter will draw cached data, i.e. the first frame. OffscreenImage should invalidate the native cache when it accepts new pixel data.
> I am going to provide a patch for this issue.
> The following test reveals this issue (requires an attached image):
> ------------------------------------------------------------------------------------
> import java.awt.*;
> import java.awt.event.WindowAdapter;
> import java.awt.event.WindowEvent;
> public class test {
> static Image im;
> private static void init() {
> im = Toolkit.getDefaultToolkit().getImage("anim.gif");
> }
> public static void main(String[] args) {
> Frame f = new Frame("TestDrawImage");
> Canvas c = new Canvas(){
> public void paint(Graphics g) {
> g.drawImage(im, 0, 0, 200, 200, this);
> }
> public boolean imageUpdate(Image img, int infoflags, int x, int y, int w, int h) {
> if ((infoflags & ALLBITS) != 0)
> repaint();
> if ((infoflags & FRAMEBITS) != 0)
> repaint();
> return isShowing();
> }
> };
> init();
> f.add(c);
> f.addWindowListener(new WindowAdapter() {
> public void windowClosing(WindowEvent we) {
> we.getWindow().dispose();
> }
> });
> f.setSize(300, 300);
> f.show();
> }
> }
> ------------------------------------------------------------------------------------
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (HARMONY-1659) [classlib][awt] Caching of images
prevents from showing animation.
Posted by "Oleg Khaschansky (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1659?page=all ]
Oleg Khaschansky updated HARMONY-1659:
--------------------------------------
Attachment: harmony-1659.patch
Patch for revision 452351.
> [classlib][awt] Caching of images prevents from showing animation.
> ------------------------------------------------------------------
>
> Key: HARMONY-1659
> URL: http://issues.apache.org/jira/browse/HARMONY-1659
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Oleg Khaschansky
> Attachments: anim.gif, harmony-1659.patch
>
>
> Current implementation of the class org.apache.harmony.awt.gl.image.OffscreenImage doesn't invalidate its cached surface. As a result, when animated image is updated, blitter will draw cached data, i.e. the first frame. OffscreenImage should invalidate the native cache when it accepts new pixel data.
> I am going to provide a patch for this issue.
> The following test reveals this issue (requires an attached image):
> ------------------------------------------------------------------------------------
> import java.awt.*;
> import java.awt.event.WindowAdapter;
> import java.awt.event.WindowEvent;
> public class test {
> static Image im;
> private static void init() {
> im = Toolkit.getDefaultToolkit().getImage("anim.gif");
> }
> public static void main(String[] args) {
> Frame f = new Frame("TestDrawImage");
> Canvas c = new Canvas(){
> public void paint(Graphics g) {
> g.drawImage(im, 0, 0, 200, 200, this);
> }
> public boolean imageUpdate(Image img, int infoflags, int x, int y, int w, int h) {
> if ((infoflags & ALLBITS) != 0)
> repaint();
> if ((infoflags & FRAMEBITS) != 0)
> repaint();
> return isShowing();
> }
> };
> init();
> f.add(c);
> f.addWindowListener(new WindowAdapter() {
> public void windowClosing(WindowEvent we) {
> we.getWindow().dispose();
> }
> });
> f.setSize(300, 300);
> f.show();
> }
> }
> ------------------------------------------------------------------------------------
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira