option: add new option class for 'force_pat'
authorMinkee Lee <minkee.lee@samsung.com>
Fri, 5 Feb 2016 06:43:28 +0000 (15:43 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Thu, 11 Feb 2016 07:20:05 +0000 (16:20 +0900)
- This option is for graphic performance improvement
- Plugins can use this option if they need

Change-Id: I6215f8083c370f289d4b6bba2eed7638eeea9898
Signed-off-by: Minkee Lee <minkee.lee@samsung.com>
src/org/tizen/emulator/manager/vms/option/ForcePatOption.java [new file with mode: 0644]

diff --git a/src/org/tizen/emulator/manager/vms/option/ForcePatOption.java b/src/org/tizen/emulator/manager/vms/option/ForcePatOption.java
new file mode 100644 (file)
index 0000000..f54d6bd
--- /dev/null
@@ -0,0 +1,51 @@
+/* Emulator Manager
+ *
+ * Copyright (C) 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Minkee Lee <minkee.lee@samsung.com>
+ * SeokYeon Hwang <syeon.hwang@samsung.com>
+ * Jihye Kim <jihye424.kim@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.emulator.manager.vms.option;
+
+import org.tizen.emulator.manager.EmulatorManager;
+import org.tizen.emulator.manager.vms.VMProperty;
+import org.tizen.emulator.manager.vms.exception.VMWorkerException;
+
+/**
+ * This option is for graphic performance improvement.
+ * This option works from platform version 2.3.2 or later.
+ * @author minkee
+ *
+ */
+final public class ForcePatOption extends Option {
+
+       @Override
+       public void getLaunchArgument(LaunchConfig config, VMProperty property)
+                       throws VMWorkerException {
+               if (!EmulatorManager.isLinux() && property.getPropertyValue().isHWVirtualization) {
+                               config.addKernelOption("force_pat");
+               }
+       }
+
+}