modules/graphics/src/main/java/com/sun/glass/ui/monocle/mx6/MX6PlatformFactory.java

Print this page




  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package com.sun.glass.ui.monocle.mx6;
  27 
  28 import com.sun.glass.ui.monocle.NativePlatform;
  29 import com.sun.glass.ui.monocle.NativePlatformFactory;
  30 
  31 import java.io.File;
  32 
  33 public class MX6PlatformFactory extends NativePlatformFactory {
  34 
  35     @Override
  36     protected boolean matches() {
  37         return new File("/sys/devices/platform/Vivante GCCore").exists();


  38     }
  39 
  40     @Override
  41     protected NativePlatform createNativePlatform() {
  42         return new MX6Platform();
  43     }
  44 
  45 }


  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package com.sun.glass.ui.monocle.mx6;
  27 
  28 import com.sun.glass.ui.monocle.NativePlatform;
  29 import com.sun.glass.ui.monocle.NativePlatformFactory;
  30 
  31 import java.io.File;
  32 
  33 public class MX6PlatformFactory extends NativePlatformFactory {
  34 
  35     @Override
  36     protected boolean matches() {
  37         boolean retval = new File("/sys/devices/platform/Vivante GCCore:00").exists() ||
  38                          new File("/sys/devices/platform/Vivante GCCore").exists();
  39         return retval;
  40     }
  41 
  42     @Override
  43     protected NativePlatform createNativePlatform() {
  44         return new MX6Platform();
  45     }
  46 
  47 }