fix prevent issue about AppResourceBitmap and OverlayPanel, OverlayRegion
authorwoo <s-w.woo@samsung.com>
Thu, 4 Apr 2013 05:10:17 +0000 (14:10 +0900)
committerwoo <s-w.woo@samsung.com>
Thu, 4 Apr 2013 05:16:06 +0000 (14:16 +0900)
Change-Id: Iacf9f0bd2181138f7864cc478067cab31b007f6d
Signed-off-by: woo <s-w.woo@samsung.com>
src/app/FApp_AppResourceBitmapUtil.cpp
src/ui/controls/FUiCtrl_OverlayAgent.cpp
src/ui/controls/FUiCtrl_OverlayPanelImpl.cpp
src/ui/controls/FUiCtrl_OverlayRegionImpl.cpp

index f1b604c..0097cda 100755 (executable)
@@ -193,7 +193,7 @@ _AppResourceBitmapUtil::Construct(const String& resourceFolder)
 
        for (int currentDensity = DENSITY_XHIGH; currentDensity >= DENSITY_LOW; currentDensity--)
        {
-               SysAssert(densityIndex > DENSITY_NONE && densityIndex < DENSITY_MAX);
+               SysAssert(densityIndex > 0 && densityIndex < DENSITY_MAX);
 
                if (static_cast<int>(__sortedDensity[0]) == currentDensity)
                {
index f95966e..3f17b0c 100644 (file)
@@ -1861,12 +1861,9 @@ _OverlayAgent::GetPixelFormatListN(void)
        result r = pFormatList->Construct();
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
 
-       for (int index = 0; index < _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_MAX; index++)
+       for (int index = _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_ARGB8888; index <= _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_UYVY; index++)
        {
-               if (__OverlayAgentBufferPixelFormat[index + 1])
-               {
-                       r = pFormatList->Add(true);
-               }
+               r = pFormatList->Add(__OverlayAgentBufferPixelFormat[index]);
        }
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
 
index 3d2e654..ec7d186 100644 (file)
@@ -311,11 +311,11 @@ _OverlayPanelImpl::GetSupportedBufferPixelFormatListN(void)
        r = pFormatList->Construct();
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
 
-       for (int index = 0; index < _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_MAX; index++)
+       for (int index = _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_ARGB8888; index <= _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_UYVY; index++)
        {
-               if (__overlayPanelPixelFomatList[index + 1])
+               if (__overlayPanelPixelFomatList[index])
                {
-                       r = pFormatList->Add(static_cast<OverlayPanel::BufferPixelFormat>(index));
+                       r = pFormatList->Add(static_cast<OverlayPanel::BufferPixelFormat>(index - 1));
                }
        }
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
index 5216b5c..beadcd8 100644 (file)
@@ -801,11 +801,11 @@ _OverlayRegionImpl::GetSupportedBufferPixelFormatListN(void)
        r = pFormatList->Construct();
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
 
-       for (int index = 0; index < _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_MAX; index++)
+       for (int index = _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_ARGB8888; index <= _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_UYVY; index++)
        {
-               if (_OverlayRegionImpl::__overlayRegionPixelFomatList[index + 1])
+               if (_OverlayRegionImpl::__overlayRegionPixelFomatList[index])
                {
-                       r = pFormatList->Add(static_cast<OverlayRegionBufferPixelFormat>(index + 1));
+                       r = pFormatList->Add(static_cast<OverlayRegionBufferPixelFormat>(index));
                }
        }
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));