[libbluray-devel] BDGraphics: do not copy constrainedRect from another BDGraphics object

hpi1 git at videolan.org
Sun Mar 23 22:45:42 CET 2014


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Sun Mar 23 23:44:09 2014 +0200| [a86f46c0993bf30b261cd8d93deba2769428efb5] | committer: hpi1

BDGraphics: do not copy constrainedRect from another BDGraphics object

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=a86f46c0993bf30b261cd8d93deba2769428efb5
---

 src/libbluray/bdj/java-j2se/java/awt/BDGraphics.java |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/libbluray/bdj/java-j2se/java/awt/BDGraphics.java b/src/libbluray/bdj/java-j2se/java/awt/BDGraphics.java
index 2545d29..f8de32f 100644
--- a/src/libbluray/bdj/java-j2se/java/awt/BDGraphics.java
+++ b/src/libbluray/bdj/java-j2se/java/awt/BDGraphics.java
@@ -65,13 +65,13 @@ class BDGraphics extends Graphics2D implements ConstrainableGraphics {
 
     /** The current user clip rectangle or null if no clip has been set. This is stored in the
      native coordinate system and not the (possibly) translated Java coordinate system. */
-    private Rectangle clip;
+    private Rectangle clip = null;
 
     /** The rectangle this graphics object has been constrained too. This is stored in the
      native coordinate system and not the (possibly) translated Java coordinate system.
      If it is null then this graphics has not been constrained. The constrained rectangle
      is another layer of clipping independant of the user clip. */
-    private Rectangle constrainedRect;
+    private Rectangle constrainedRect = null;
 
     BDGraphics(BDGraphics g) {
         backBuffer = g.backBuffer;
@@ -90,9 +90,6 @@ class BDGraphics extends Graphics2D implements ConstrainableGraphics {
         if (g.clip != null) {
             clip = new Rectangle(g.clip);
         }
-        if (g.constrainedRect != null) {
-            constrainedRect = new Rectangle(g.constrainedRect);
-        }
         setupClip();
     }
 



More information about the libbluray-devel mailing list