From: minkee.lee Date: Fri, 17 Jul 2015 06:39:30 +0000 (+0900) Subject: qt-option: Fixed qt option. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0895bb25fc23919f96d6b165df7fdf5042f1b8fc;p=sdk%2Femulator%2Femulator-manager.git qt-option: Fixed qt option. - rendering value is fixed to 'offscreen' if GPU option is 'off'. Change-Id: Ice5485b9614d39442b733795b2fcedb3e0c009e2 Signed-off-by: minkee.lee --- diff --git a/src/org/tizen/emulator/manager/vms/option/CommonOptionFactroy.java b/src/org/tizen/emulator/manager/vms/option/CommonOptionFactroy.java index 23258df..cb6cc43 100644 --- a/src/org/tizen/emulator/manager/vms/option/CommonOptionFactroy.java +++ b/src/org/tizen/emulator/manager/vms/option/CommonOptionFactroy.java @@ -62,6 +62,7 @@ public abstract class CommonOptionFactroy implements IOptionFactory { } addDeviceOption(item, optionList); } + } // Plugin developer can override this if needed @@ -122,6 +123,9 @@ public abstract class CommonOptionFactroy implements IOptionFactory { list.add(Option.getInstance(FrontCameraOption.class)); } } + + } else if (name.equals(ItemName.DISPLAY_MODE)) { + list.add(Option.getInstance(DisplayModeOption.class)); } } diff --git a/src/org/tizen/emulator/manager/vms/option/DisplayModeOption.java b/src/org/tizen/emulator/manager/vms/option/DisplayModeOption.java new file mode 100644 index 0000000..82b35bc --- /dev/null +++ b/src/org/tizen/emulator/manager/vms/option/DisplayModeOption.java @@ -0,0 +1,58 @@ +/* Emulator Manager + * + * Copyright (C) 2015 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * Minkee Lee + * SeokYeon Hwang + * Sangho Park + * + * 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.helper.VMWorkerException; + +public class DisplayModeOption extends Option { + + @Override + public void getLaunchArgument(LaunchConfig config, VMProperty property) + throws VMWorkerException { + + if (checkOn(property.getPropertyValue().getAdvancedOptionSubValue( + "displayMode", "qtEnable"))) { + + String rendering = null; + if (!EmulatorManager.isMac() + && property.getConfiguration().getUsability().isHwGLAcceleration()) { + rendering = "onscreen"; + + } else { + rendering = "offscreen"; + } + config.addQemuOption("-display", "maru_qt,rendering=" + rendering); + } + + } + +}