Applied context restoring
[framework/osp/uifw.git] / src / ui / animations / FUiAnim_DisplayManager.cpp
index 3fe4768..a56bf36 100644 (file)
@@ -9,7 +9,7 @@
 //     http://www.apache.org/licenses/LICENSE-2.0/
 //
 // Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an ”AS IS” BASIS,
+// distributed under the License is distributed on an "AS IS" BASIS,
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 // See the License for the specific language governing permissions and
 // limitations under the License.
@@ -55,6 +55,7 @@ int _DisplayManager::__eventType = 0;
 void* _DisplayManager::__pWakeUpEventHandler = null;
 bool _DisplayManager::__wakeUpEventAdded = false;
 _DisplayManager* _DisplayManager::__pInstance = null;
+_DisplayManager::RestoreContextCallback _DisplayManager::__pRestoreContextCallback = null;
 
 _DisplayManager::_DisplayManager(void)
        : __roots()
@@ -274,11 +275,7 @@ _DisplayManager::PostRender(_RootVisualElement& root)
        {
                _VisualElementImpl* pRootPresentationImpl = _VisualElementImpl::GetInstance(*pPresentationRoot);
 
-#ifdef OLD
-               if (likely((pRootPresentationImpl->__childrenNeedsUpdateProps & ~_VisualElementImpl::HIERARCHY_PROPERTY_CONTENT) != 0) ||
-#else
                if (likely(pRootPresentationImpl->__childrenNeedsUpdateProps) ||
-#endif
                        likely(pRootPresentationImpl->__pSharedData->NeedNativeReconfigure()) ||
                        unlikely(root.GetNeedsContentUpdate()) ||
                        unlikely(pPresentationRoot->GetNeedsContentUpdate()))
@@ -321,8 +318,20 @@ _DisplayManager::Flush(void)
        return E_SUCCESS;
 }
 
+void
+_DisplayManager::SetRestoreContextCallback(RestoreContextCallback pRestoreContextCallback)
+{
+       __pRestoreContextCallback = pRestoreContextCallback;
+}
 
-
+void
+_DisplayManager::RestoreContext(void)
+{
+       if (__pRestoreContextCallback)
+       {
+               (*__pRestoreContextCallback)();
+       }
+}
 
 }}}            // Tizen::Ui::Animations