[libbluray-devel] BDGraphics: merge from SE to ME
hpi1
git at videolan.org
Wed Mar 26 19:29:28 CET 2014
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Wed Mar 26 10:13:20 2014 +0200| [ade129b7b564eb3c11bde20e8cc01c24c8b5c1c4] | committer: hpi1
BDGraphics: merge from SE to ME
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=ade129b7b564eb3c11bde20e8cc01c24c8b5c1c4
---
src/libbluray/bdj/java-j2me/java/awt/BDGraphics.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/libbluray/bdj/java-j2me/java/awt/BDGraphics.java b/src/libbluray/bdj/java-j2me/java/awt/BDGraphics.java
index d552d61..568f3d8 100644
--- a/src/libbluray/bdj/java-j2me/java/awt/BDGraphics.java
+++ b/src/libbluray/bdj/java-j2me/java/awt/BDGraphics.java
@@ -115,6 +115,7 @@ class BDGraphics extends Graphics2D implements ConstrainableGraphics {
height = image.getHeight();
backBuffer = image.getBdBackBuffer();
dirty = image.getDirtyArea();
+
gc = image.getGraphicsConfiguration();
Component component = image.getComponent();
if (component != null) {
@@ -188,6 +189,7 @@ class BDGraphics extends Graphics2D implements ConstrainableGraphics {
public void setPaintMode() {
xorColor = null;
+ composite = AlphaComposite.SrcOver;
}
public void setXORMode(Color color) {
@@ -405,6 +407,9 @@ class BDGraphics extends Graphics2D implements ConstrainableGraphics {
y += originY;
Rectangle rect = new Rectangle(x, y, w, h);
rect = actualClip.intersection(rect);
+ if (rect.isEmpty()) {
+ return;
+ }
x = rect.x;
y = rect.y;
w = rect.width;
@@ -1039,7 +1044,6 @@ class BDGraphics extends Graphics2D implements ConstrainableGraphics {
bgColor = bg.getRGB();
else
bgColor = 0;
- // TODO: optimize this
for (int y = dy; y < (dy + bdImage.height); y++) {
More information about the libbluray-devel
mailing list