From: Eugen Friedrich Date: Wed, 3 Jul 2013 11:53:53 +0000 (+0200) Subject: ScreenDump: check for valid screenId and set screenId for layer X-Git-Tag: 1_1~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2bf3e11098c1b3bee481d9640adf78f5cd7bad28;p=profile%2Fivi%2Flayer-management.git ScreenDump: check for valid screenId and set screenId for layer If rendering plug-in supports several screens we cannot assume only screen 0 as valid screenId. Also if the layer is assigned to some screen, containing screenId should be set. One layer could also be assigned to more than one screen at the same time, in this case only the last screenId is set Signed-off-by: Eugen Friedrich --- diff --git a/LayerManagerCommands/src/ScreenDumpCommand.cpp b/LayerManagerCommands/src/ScreenDumpCommand.cpp index 659ab57..7c7732b 100644 --- a/LayerManagerCommands/src/ScreenDumpCommand.cpp +++ b/LayerManagerCommands/src/ScreenDumpCommand.cpp @@ -23,6 +23,9 @@ ExecutionResult ScreenDumpCommand::execute(ICommandExecutor* executor) { + uint length = 0; + uint i = 0; + uint* IDs = executor->getScreenIDs(&length); ExecutionResult result = ExecutionFailed; RendererList& m_rendererList = *(executor->getRendererList()); @@ -30,7 +33,13 @@ ExecutionResult ScreenDumpCommand::execute(ICommandExecutor* executor) LOG_INFO("ScreenDumpCommand", "making screenshot, output file: " << m_filename); - status = (m_id == 0); + for (i = 0; i < length; i++) + { + if (m_id == IDs[i]) + { + status = true; + } + } if (status) { @@ -44,7 +53,7 @@ ExecutionResult ScreenDumpCommand::execute(ICommandExecutor* executor) if (renderer) { - renderer->doScreenShot(m_filename); + renderer->doScreenShot(m_filename, m_id); } } result = ExecutionSuccessRedraw; diff --git a/LayerManagerCommands/src/ScreenSetRenderOrderCommand.cpp b/LayerManagerCommands/src/ScreenSetRenderOrderCommand.cpp index 0a8484e..c1f4022 100644 --- a/LayerManagerCommands/src/ScreenSetRenderOrderCommand.cpp +++ b/LayerManagerCommands/src/ScreenSetRenderOrderCommand.cpp @@ -78,6 +78,7 @@ ExecutionResult ScreenSetRenderOrderCommand::execute(ICommandExecutor* executor) if (layer) { LOG_DEBUG("ScreenSetRenderOrderCommand", "Adding Layer: " << m_array[i] << " to current render order"); + layer->setContainingScreenId(m_screenID); scene.getCurrentRenderOrder(m_screenID).push_back(layer); result = ExecutionSuccessRedraw; }