summaryrefslogtreecommitdiffstats
path: root/libjava/java/awt/MediaTracker.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/awt/MediaTracker.java')
-rw-r--r--libjava/java/awt/MediaTracker.java19
1 files changed, 13 insertions, 6 deletions
diff --git a/libjava/java/awt/MediaTracker.java b/libjava/java/awt/MediaTracker.java
index b1157349b5b..d1df8b38360 100644
--- a/libjava/java/awt/MediaTracker.java
+++ b/libjava/java/awt/MediaTracker.java
@@ -81,12 +81,17 @@ public class MediaTracker implements java.io.Serializable
status = ERRORED | COMPLETE;
else if ((flags & ALLBITS) != 0)
status = COMPLETE;
- else
+ else if ((flags & SOMEBITS) != 0)
status = LOADING;
-
- synchronized (MediaTracker.this)
+ else
+ status = 0;
+
+ if ((status & COMPLETE) == COMPLETE)
{
- MediaTracker.this.notifyAll();
+ synchronized (MediaTracker.this)
+ {
+ MediaTracker.this.notifyAll();
+ }
}
// If status is not COMPLETE then we need more updates.
return (status & COMPLETE) == 0;
@@ -106,7 +111,8 @@ public class MediaTracker implements java.io.Serializable
e.next = head;
head = e;
// Start tracking image status.
- target.checkImage(image, e);
+ int flags = target.checkImage(image, e);
+ e.imageUpdate(image, flags, -1, -1, -1, -1);
}
public void addImage(Image image, int id, int width, int height)
@@ -119,7 +125,8 @@ public class MediaTracker implements java.io.Serializable
e.height = height;
head = e;
// Start tracking image status.
- target.checkImage(image, width, height, e);
+ int flags = target.checkImage(image, width, height, e);
+ e.imageUpdate(image, flags, -1, -1, width, height);
}
public boolean checkAll()
OpenPOWER on IntegriCloud