From: woo Date: Thu, 4 Apr 2013 05:10:17 +0000 (+0900) Subject: fix prevent issue about AppResourceBitmap and OverlayPanel, OverlayRegion X-Git-Tag: accepted/tizen_2.1/20130425.033138~462^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6b56bd7c0600636f6ae150c5e38f78b191a728bd;p=platform%2Fframework%2Fnative%2Fuifw.git fix prevent issue about AppResourceBitmap and OverlayPanel, OverlayRegion Change-Id: Iacf9f0bd2181138f7864cc478067cab31b007f6d Signed-off-by: woo --- diff --git a/src/app/FApp_AppResourceBitmapUtil.cpp b/src/app/FApp_AppResourceBitmapUtil.cpp index f1b604c..0097cda 100755 --- a/src/app/FApp_AppResourceBitmapUtil.cpp +++ b/src/app/FApp_AppResourceBitmapUtil.cpp @@ -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(__sortedDensity[0]) == currentDensity) { diff --git a/src/ui/controls/FUiCtrl_OverlayAgent.cpp b/src/ui/controls/FUiCtrl_OverlayAgent.cpp index f95966e..3f17b0c 100644 --- a/src/ui/controls/FUiCtrl_OverlayAgent.cpp +++ b/src/ui/controls/FUiCtrl_OverlayAgent.cpp @@ -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)); diff --git a/src/ui/controls/FUiCtrl_OverlayPanelImpl.cpp b/src/ui/controls/FUiCtrl_OverlayPanelImpl.cpp index 3d2e654..ec7d186 100644 --- a/src/ui/controls/FUiCtrl_OverlayPanelImpl.cpp +++ b/src/ui/controls/FUiCtrl_OverlayPanelImpl.cpp @@ -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(index)); + r = pFormatList->Add(static_cast(index - 1)); } } SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); diff --git a/src/ui/controls/FUiCtrl_OverlayRegionImpl.cpp b/src/ui/controls/FUiCtrl_OverlayRegionImpl.cpp index 5216b5c..beadcd8 100644 --- a/src/ui/controls/FUiCtrl_OverlayRegionImpl.cpp +++ b/src/ui/controls/FUiCtrl_OverlayRegionImpl.cpp @@ -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(index + 1)); + r = pFormatList->Add(static_cast(index)); } } SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));