summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1b9b017)
Change-Id: Icffbeda1b9f004b4df3f1d58ced94dc2a3d2d38b
Signed-off-by: Junkyeong Kim <jk0430.kim@samsung.com>
TEST_P(TDMClient, ClientCreateVOutput)
{
tdm_error ret;
TEST_P(TDMClient, ClientCreateVOutput)
{
tdm_error ret;
const char name[TDM_NAME_LEN] = "Virtual Output";
const char name[TDM_NAME_LEN] = "Virtual Output";
+ virtual_conf = tdm_config_get_int(TDM_CONFIG_KEY_GENERAL_VIRTUAL_OUTPUT, 0);
+ if (virtual_conf == 0) {
+ ASSERT_EQ(virtual_conf, 0);
+ return;
+ }
+
ASSERT_EQ(PrepareClient(), true);
voutput = tdm_client_create_voutput(client, name, &ret);
ASSERT_EQ(PrepareClient(), true);
voutput = tdm_client_create_voutput(client, name, &ret);
bool TDMVirtualOutput::PrepareVOutput(void)
{
tdm_error ret;
bool TDMVirtualOutput::PrepareVOutput(void)
{
tdm_error ret;
const char name[TDM_NAME_LEN] = "Virtual Output";
const char name[TDM_NAME_LEN] = "Virtual Output";
+ virtual_conf = tdm_config_get_int(TDM_CONFIG_KEY_GENERAL_VIRTUAL_OUTPUT, 0);
+ if (virtual_conf == 0) return true;
+
client = tdm_client_create(&ret);
TDM_UT_RETURN_FALSE_IF_FAIL(ret == TDM_ERROR_NONE);
TDM_UT_RETURN_FALSE_IF_FAIL(client != NULL);
client = tdm_client_create(&ret);
TDM_UT_RETURN_FALSE_IF_FAIL(ret == TDM_ERROR_NONE);
TDM_UT_RETURN_FALSE_IF_FAIL(client != NULL);
tdm_error ret;
tdm_client_output_mode modes[this->MODE_COUNT];
int count = this->MODE_COUNT;
tdm_error ret;
tdm_client_output_mode modes[this->MODE_COUNT];
int count = this->MODE_COUNT;
+ if (this->voutput == NULL) {
+ virtual_conf = tdm_config_get_int(TDM_CONFIG_KEY_GENERAL_VIRTUAL_OUTPUT, 0);
+ ASSERT_EQ(virtual_conf, 0);
+ return;
+ }
_tc_tdm_client_virutual_make_available_mode(modes, count);
ret = tdm_client_voutput_set_available_modes(this->voutput, modes, count);
_tc_tdm_client_virutual_make_available_mode(modes, count);
ret = tdm_client_voutput_set_available_modes(this->voutput, modes, count);
tdm_error ret;
tdm_client_output_mode modes[this->MODE_COUNT];
int count = this->MODE_COUNT;
tdm_error ret;
tdm_client_output_mode modes[this->MODE_COUNT];
int count = this->MODE_COUNT;
+ int virtual_conf;
+
+ if (this->voutput == NULL) {
+ virtual_conf = tdm_config_get_int(TDM_CONFIG_KEY_GENERAL_VIRTUAL_OUTPUT, 0);
+ ASSERT_EQ(virtual_conf, 0);
+ return;
+ }
ret = tdm_client_voutput_set_available_modes(NULL, modes, count);
ASSERT_EQ(ret, TDM_ERROR_INVALID_PARAMETER);
ret = tdm_client_voutput_set_available_modes(NULL, modes, count);
ASSERT_EQ(ret, TDM_ERROR_INVALID_PARAMETER);
{
tdm_error ret;
unsigned int mmWidth = 1234, mmHeight = 1234;
{
tdm_error ret;
unsigned int mmWidth = 1234, mmHeight = 1234;
+ int virtual_conf;
+
+ if (this->voutput == NULL) {
+ virtual_conf = tdm_config_get_int(TDM_CONFIG_KEY_GENERAL_VIRTUAL_OUTPUT, 0);
+ ASSERT_EQ(virtual_conf, 0);
+ return;
+ }
ret = tdm_client_voutput_set_physical_size(this->voutput, mmWidth, mmHeight);
ASSERT_EQ(ret, TDM_ERROR_NONE);
ret = tdm_client_voutput_set_physical_size(this->voutput, mmWidth, mmHeight);
ASSERT_EQ(ret, TDM_ERROR_NONE);
{
tdm_error ret;
unsigned int invalid_mmWidth = 0, invalid_mmHeight = 0;
{
tdm_error ret;
unsigned int invalid_mmWidth = 0, invalid_mmHeight = 0;
+ int virtual_conf;
+
+ if (this->voutput == NULL) {
+ virtual_conf = tdm_config_get_int(TDM_CONFIG_KEY_GENERAL_VIRTUAL_OUTPUT, 0);
+ ASSERT_EQ(virtual_conf, 0);
+ return;
+ }
ret = tdm_client_voutput_set_physical_size(this->voutput, invalid_mmWidth, invalid_mmHeight);
ASSERT_EQ(ret, TDM_ERROR_INVALID_PARAMETER);
ret = tdm_client_voutput_set_physical_size(this->voutput, invalid_mmWidth, invalid_mmHeight);
ASSERT_EQ(ret, TDM_ERROR_INVALID_PARAMETER);
{
tdm_error ret;
int flag_callback_called = 0;
{
tdm_error ret;
int flag_callback_called = 0;
+ int virtual_conf;
+
+ if (this->voutput == NULL) {
+ virtual_conf = tdm_config_get_int(TDM_CONFIG_KEY_GENERAL_VIRTUAL_OUTPUT, 0);
+ ASSERT_EQ(virtual_conf, 0);
+ return;
+ }
ret = tdm_client_voutput_add_commit_handler(this->voutput,
_tc_tdm_client_voutput_commit_handler,
ret = tdm_client_voutput_add_commit_handler(this->voutput,
_tc_tdm_client_voutput_commit_handler,
TEST_F(TDMVirtualOutput, CommitDone)
{
tdm_error ret;
TEST_F(TDMVirtualOutput, CommitDone)
{
tdm_error ret;
+ int virtual_conf;
+
+ if (this->voutput == NULL) {
+ virtual_conf = tdm_config_get_int(TDM_CONFIG_KEY_GENERAL_VIRTUAL_OUTPUT, 0);
+ ASSERT_EQ(virtual_conf, 0);
+ return;
+ }
ret = tdm_client_voutput_commit_done(this->voutput);
ASSERT_EQ(ret, TDM_ERROR_NONE);
ret = tdm_client_voutput_commit_done(this->voutput);
ASSERT_EQ(ret, TDM_ERROR_NONE);
{
tdm_error ret;
tdm_client_output *output;
{
tdm_error ret;
tdm_client_output *output;
+ int virtual_conf;
+
+ if (this->voutput == NULL) {
+ virtual_conf = tdm_config_get_int(TDM_CONFIG_KEY_GENERAL_VIRTUAL_OUTPUT, 0);
+ ASSERT_EQ(virtual_conf, 0);
+ return;
+ }
output = tdm_client_voutput_get_client_output(this->voutput, &ret);
ASSERT_EQ(ret, TDM_ERROR_NONE);
output = tdm_client_voutput_get_client_output(this->voutput, &ret);
ASSERT_EQ(ret, TDM_ERROR_NONE);
unsigned int mmWidth = 300, mmHeight = 150;
tdm_client_output_mode modes[this->MODE_COUNT];
int count = this->MODE_COUNT;
unsigned int mmWidth = 300, mmHeight = 150;
tdm_client_output_mode modes[this->MODE_COUNT];
int count = this->MODE_COUNT;
+ int virtual_conf;
+
+ if (this->voutput == NULL) {
+ virtual_conf = tdm_config_get_int(TDM_CONFIG_KEY_GENERAL_VIRTUAL_OUTPUT, 0);
+ ASSERT_EQ(virtual_conf, 0);
+ return;
+ }
ret = tdm_client_voutput_set_physical_size(this->voutput, mmWidth, mmHeight);
ASSERT_EQ(ret, TDM_ERROR_NONE);
ret = tdm_client_voutput_set_physical_size(this->voutput, mmWidth, mmHeight);
ASSERT_EQ(ret, TDM_ERROR_NONE);
TEST_F(TDMVirtualOutput, Disconnect)
{
tdm_error ret;
TEST_F(TDMVirtualOutput, Disconnect)
{
tdm_error ret;
+ int virtual_conf;
+
+ if (this->voutput == NULL) {
+ virtual_conf = tdm_config_get_int(TDM_CONFIG_KEY_GENERAL_VIRTUAL_OUTPUT, 0);
+ ASSERT_EQ(virtual_conf, 0);
+ return;
+ }
// TDM_UT_WAIT("check & press");
// TDM_UT_WAIT("check & press");
unsigned int mmWidth = 300, mmHeight = 150;
tdm_client_output_mode modes[this->MODE_COUNT];
int count = this->MODE_COUNT;
unsigned int mmWidth = 300, mmHeight = 150;
tdm_client_output_mode modes[this->MODE_COUNT];
int count = this->MODE_COUNT;
+ int virtual_conf;
+
+ if (this->voutput == NULL) {
+ virtual_conf = tdm_config_get_int(TDM_CONFIG_KEY_GENERAL_VIRTUAL_OUTPUT, 0);
+ ASSERT_EQ(virtual_conf, 0);
+ return;
+ }
ret = tdm_client_voutput_set_physical_size(this->voutput, mmWidth, mmHeight);
ASSERT_EQ(ret, TDM_ERROR_NONE);
ret = tdm_client_voutput_set_physical_size(this->voutput, mmWidth, mmHeight);
ASSERT_EQ(ret, TDM_ERROR_NONE);
unsigned int mmWidth = 300, mmHeight = 150;
tdm_client_output_mode modes[this->MODE_COUNT];
int count = this->MODE_COUNT;
unsigned int mmWidth = 300, mmHeight = 150;
tdm_client_output_mode modes[this->MODE_COUNT];
int count = this->MODE_COUNT;
+ int virtual_conf;
+
+ if (this->voutput == NULL) {
+ virtual_conf = tdm_config_get_int(TDM_CONFIG_KEY_GENERAL_VIRTUAL_OUTPUT, 0);
+ ASSERT_EQ(virtual_conf, 0);
+ return;
+ }
ret = tdm_client_voutput_set_physical_size(this->voutput, mmWidth, mmHeight);
ASSERT_EQ(ret, TDM_ERROR_NONE);
ret = tdm_client_voutput_set_physical_size(this->voutput, mmWidth, mmHeight);
ASSERT_EQ(ret, TDM_ERROR_NONE);
unsigned int mmWidth = 300, mmHeight = 150;
tdm_client_output_mode modes[this->MODE_COUNT];
int count = this->MODE_COUNT;
unsigned int mmWidth = 300, mmHeight = 150;
tdm_client_output_mode modes[this->MODE_COUNT];
int count = this->MODE_COUNT;
+ int virtual_conf;
+
+ if (this->voutput == NULL) {
+ virtual_conf = tdm_config_get_int(TDM_CONFIG_KEY_GENERAL_VIRTUAL_OUTPUT, 0);
+ ASSERT_EQ(virtual_conf, 0);
+ return;
+ }
ret = tdm_client_voutput_set_physical_size(this->voutput, mmWidth, mmHeight);
ASSERT_EQ(ret, TDM_ERROR_NONE);
ret = tdm_client_voutput_set_physical_size(this->voutput, mmWidth, mmHeight);
ASSERT_EQ(ret, TDM_ERROR_NONE);
tdm_private_module *private_module = NULL;
tdm_error ret = TDM_ERROR_NONE;
int output_count = 0;
tdm_private_module *private_module = NULL;
tdm_error ret = TDM_ERROR_NONE;
int output_count = 0;
if (private_display->pp_module) {
ret = _tdm_display_update_caps_pp(private_display->pp_module,
if (private_display->pp_module) {
ret = _tdm_display_update_caps_pp(private_display->pp_module,
- TDM_INFO("loading a %s backend", TDM_VIRTUAL_MODULE);
- ret = _tdm_display_load_module_with_file(private_display, TDM_VIRTUAL_MODULE);
- TDM_GOTO_IF_FAIL(ret == TDM_ERROR_NONE, failed_update);
- TDM_GOTO_IF_FAIL(private_display->virtual_module != NULL, failed_update);
+ virtual = tdm_config_get_int(TDM_CONFIG_KEY_GENERAL_VIRTUAL_OUTPUT, 0);
+ if (virtual) {
+ TDM_INFO("loading a %s backend", TDM_VIRTUAL_MODULE);
+ ret = _tdm_display_load_module_with_file(private_display, TDM_VIRTUAL_MODULE);
+ TDM_GOTO_IF_FAIL(ret == TDM_ERROR_NONE, failed_update);
+ TDM_GOTO_IF_FAIL(private_display->virtual_module != NULL, failed_update);
+ }
*/
#define TDM_CONFIG_KEY_GENERAL_COMMIT_PER_VBLANK "general:commit_per_vblank"
*/
#define TDM_CONFIG_KEY_GENERAL_COMMIT_PER_VBLANK "general:commit_per_vblank"
+/* enable the tdm virtual output module. [0(disable), 1(enable)]
+ * default: 0
+ * ex) 1
+ */
+#define TDM_CONFIG_KEY_GENERAL_VIRTUAL_OUTPUT "general:virtual_output"
+
/*** debug keys **************************************************************/
/*** debug keys **************************************************************/