[libbluray-devel] simplify

hpi1 git at videolan.org
Tue Dec 10 10:24:49 CET 2013


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Tue Dec 10 10:31:11 2013 +0200| [d9dd1ef78449286f4d9fcc0d4536458982fbe946] | committer: hpi1

simplify

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

 .../bdj/java/org/havi/ui/HSceneFactory.java        |   23 +++++++++-----------
 1 file changed, 10 insertions(+), 13 deletions(-)

diff --git a/src/libbluray/bdj/java/org/havi/ui/HSceneFactory.java b/src/libbluray/bdj/java/org/havi/ui/HSceneFactory.java
index 9d49060..4f2318c 100644
--- a/src/libbluray/bdj/java/org/havi/ui/HSceneFactory.java
+++ b/src/libbluray/bdj/java/org/havi/ui/HSceneFactory.java
@@ -36,17 +36,23 @@ public class HSceneFactory extends Object {
             return context.getSceneFactory();
         }
 
-        org.videolan.Logger.getLogger("HSceneFactory").error("getInstance(): no context at " + org.videolan.Logger.dumpStack());
+        logger.error("getInstance(): no context at " + Logger.dumpStack());
 
         return null;
     }
 
     public HSceneTemplate getBestSceneTemplate(HSceneTemplate template) {
-        org.videolan.Logger.unimplemented("HSceneFactory", "getBestSceneTemplate");
+        logger.unimplemented("getBestSceneTemplate");
         return null;
     }
 
     public HScene getBestScene(HSceneTemplate template) {
+        /*
+        if (defaultHScene != null) {
+            logger.error("HScene already exists");
+            return null;
+        }
+        */
         return getDefaultHScene();
         // TODO
     }
@@ -54,7 +60,7 @@ public class HSceneFactory extends Object {
     public HSceneTemplate resizeScene(HScene scene, HSceneTemplate template)
             throws IllegalStateException
     {
-        org.videolan.Logger.unimplemented("HSceneFactory", "resizeScene");
+        logger.unimplemented("resizeScene");
         return template;
     }
 
@@ -74,16 +80,7 @@ public class HSceneFactory extends Object {
 
     public HScene getDefaultHScene()
     {
-        synchronized(HSceneFactory.class) {
-            if (defaultHScene == null) {
-                defaultHScene = new HScene();
-                defaultHScene.setLocation(0, 0);
-                defaultHScene.setSize(GUIManager.getInstance().getWidth(), GUIManager.getInstance().getHeight());
-                GUIManager.getInstance().add(defaultHScene);
-            }
-        }
-
-        return defaultHScene;
+        return getDefaultHScene(HScreen.getDefaultHScreen());
     }
 
     public HScene getFullScreenScene(HGraphicsDevice device) {



More information about the libbluray-devel mailing list