Mesh refactoring
authorHeeyong Song <heeyong.song@samsung.com>
Wed, 21 Aug 2013 08:37:30 +0000 (17:37 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Wed, 21 Aug 2013 08:37:30 +0000 (17:37 +0900)
Change-Id: I819f5fcc1ff9d12e326c3de22cfa8b6e85efe423

16 files changed:
inc/FUiAnimVisualElement.h
src/ui-core/src/ui/CMakeLists.txt
src/ui/CMakeLists.txt
src/ui/FUi_Window.cpp~ [deleted file]
src/ui/animations/FUiAnimVisualElement.cpp
src/ui/animations/FUiAnim_AnimationManager.cpp
src/ui/animations/FUiAnim_GeometryInfo.cpp
src/ui/animations/FUiAnim_GlNode.cpp
src/ui/animations/FUiAnim_GlNode.h
src/ui/animations/FUiAnim_GlRenderManager.cpp
src/ui/animations/FUiAnim_GlRenderManager.h
src/ui/animations/FUiAnim_MeshInfo.cpp [deleted file]
src/ui/animations/FUiAnim_VisualElementImpl.cpp
src/ui/inc/FUiAnim_GeometryInfo.h
src/ui/inc/FUiAnim_MeshInfo.h [deleted file]
src/ui/inc/FUiAnim_VisualElementImpl.h

index 94343f2..07f6de1 100644 (file)
@@ -1408,9 +1408,6 @@ public:
         */
        Mesh* GetMeshN(const Tizen::Base::String& name) const;
 
-       result SetTexture(const Tizen::Base::String& meshName, Tizen::Graphics::Bitmap* pTexture);
-       Tizen::Graphics::Bitmap* GetTexture(const Tizen::Base::String& name) const;
-
        result SetShaderProgram(ShaderProgram* pShaderProgram);
 
        /**
index 5613d62..f1ae66b 100644 (file)
@@ -50,7 +50,6 @@ SET(${this_target}_SOURCE_FILES
     ${UIFW_DIRECTORY}/src/ui/animations/FUiAnimMesh.cpp
     ${UIFW_DIRECTORY}/src/ui/animations/FUiAnim_MeshImpl.cpp
     #${UIFW_DIRECTORY}/src/ui/animations/FUiAnim_MeshImportSample.cpp
-    ${UIFW_DIRECTORY}/src/ui/animations/FUiAnim_MeshInfo.cpp
     ${UIFW_DIRECTORY}/src/ui/animations/FUiAnim_Mutex.cpp
     ${UIFW_DIRECTORY}/src/ui/animations/FUiAnim_NativeLayer.cpp
     ${UIFW_DIRECTORY}/src/ui/animations/FUiAnim_TransactionNode.cpp
index 41e3874..d9eb960 100644 (file)
@@ -51,7 +51,6 @@ SET (${this_target}_SOURCE_FILES
        animations/FUiAnim_Mutex.cpp
        animations/FUiAnim_Waiter.cpp
     animations/FUiAnim_MeshImpl.cpp
-    animations/FUiAnim_MeshInfo.cpp
     animations/FUiAnim_GeometryInfo.cpp
     animations/FUiAnim_MeshImportSample.cpp        
     animations/FUiAnimMesh.cpp
diff --git a/src/ui/FUi_Window.cpp~ b/src/ui/FUi_Window.cpp~
deleted file mode 100644 (file)
index 2b76c73..0000000
+++ /dev/null
@@ -1,1072 +0,0 @@
-//
-// Open Service Platform
-// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Apache License, Version 2.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     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,
-// 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.
-//
-
-/**
- * @file               FUi_Window.cpp
- * @brief              This is the implementation file for the _Window class.
- */
-
-#include <FBaseSysLog.h>
-#include <FUiAnimDisplayContext.h>
-#include <FUiWindow.h>
-#include <FBase_Log.h>
-#include <FBaseColArrayListT.h>
-#include <FApp_AppInfo.h>
-#include "FUi_Window.h"
-#include "FUi_ControlManager.h"
-#include "FUi_TouchManager.h"
-#include "FUiAnim_DisplayContextImpl.h"
-#include "FUiAnim_RootVisualElement.h"
-#include "FUiAnim_VisualElement.h"
-
-#ifdef VE_EFL
-
-#include "FUi_EcoreEvasMgr.h"
-#include "FUi_EcoreEvas.h"
-#include "FUiAnim_DisplayManager.h"
-#include "FUiAnim_EflLayer.h"
-
-#endif
-#include "FUiAnim_ControlVisualElement.h"
-#include "FUiAnim_GlDisplayManager.h"
-#include "FUiAnim_GlLayer.h"
-
-#include "FUiCtrl_Form.h"
-#include "FUiCtrl_FormImpl.h"
-#include "FUiCtrl_FrameImpl.h"
-#include "FUi_AccessibilityManager.h"
-
-using namespace Tizen::App;
-using namespace Tizen::Base;
-using namespace Tizen::Base::Collection;
-using namespace Tizen::Graphics;
-using namespace Tizen::Ui::Animations;
-using namespace Tizen::Ui::Controls;
-
-namespace Tizen { namespace Ui
-{
-
-_Window*
-_Window::CreateWindowN(void)
-{
-       _Window* pWindow = new (std::nothrow) _Window;
-       SysTryReturn(NID_UI, pWindow, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
-
-       result r = E_SUCCESS;
-
-       if (IsFailed(GetLastResult()))
-       {
-               goto CATCH;
-       }
-
-       r = pWindow->CreateRootVisualElement();
-       SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
-
-       pWindow->AcquireHandle();
-
-       return pWindow;
-
-CATCH:
-       delete pWindow;
-       return null;
-}
-
-_Window::~_Window(void)
-{
-       __destroying = true;
-       Close();
-       SetOwner(null);
-
-       if (__pDisplayContext)
-       {
-               _DisplayContextImpl::DestroyPublicInstance(*__pDisplayContext);
-               __pDisplayContext = null;
-       }
-
-       if(__pLayer)
-       {
-               //_EflLayer* pLayer = static_cast<_EflLayer*>(__pLayer);
-               //Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pLayer->GetEcoreEvas());
-               //SysLog(NID_UI, "[Multi_Window] destroy x window(0x%x)", win);
-
-               if(__pRootVisualElement)
-               {
-                       __pRootVisualElement->DetachChild(*GetVisualElement());
-               }
-               //__pVisualElement->Destroy();
-               //__pVisualElement = null;
-                               
-               delete __pLayer;
-               __pLayer = NULL;
-       }
-
-       delete __pDimmingLayer;
-       __pDimmingLayer = null;
-
-       __pRootVisualElement =NULL;
-}
-
-_IWindowDelegate&
-_Window::GetWindowDelegate(void) const
-{
-       if (__destroying)
-       {
-               return const_cast<_Window&>(*this);
-       }
-
-       SysAssert(__pWindowDelegate);
-       return *__pWindowDelegate;
-}
-
-String
-_Window::GetDescription(void) const
-{
-       String description = _Control::GetDescription();
-       String descriptionTemp(L"");
-
-       descriptionTemp.Format(LOG_LEN_MAX, L"_Window: xid(0x%x) owner(0x%x) delegate(0x%x) activated(%d) destroying(%d) displayContext(0x%x)",
-               GetNativeHandle(), __pOwner, __pWindowDelegate, __activated, __destroying, __pDisplayContext);
-
-       description.Append(descriptionTemp);
-
-       return description;
-}
-
-void
-_Window::SetRootVisualElement(const Tizen::Ui::Animations::_RootVisualElement& rootVisualElement)
-{
-       _RootVisualElement* pRootVE = const_cast<_RootVisualElement*>(&rootVisualElement);
-
-       __pRootVisualElement = pRootVE;
-}
-
-void
-_Window::SetLayer(const Tizen::Ui::Animations::_NativeLayer& layer)
-{
-       _NativeLayer* pLayer = const_cast<_NativeLayer*>(&layer);
-
-       __pLayer = pLayer;
-}
-
-bool
-_Window::IsActivatedOnOpen(void) const
-{
-       return true;
-}
-
-bool
-_Window::IsActivated(void) const
-{
-       return __activated;
-}
-
-void
-_Window::SetWindowDelegate(_IWindowDelegate& delegate)
-{
-       ClearLastResult();
-       __pWindowDelegate = &delegate;
-}
-
-void
-_Window::ResetWindowDelegate(void)
-{
-       ClearLastResult();
-       __pWindowDelegate = this;
-}
-
-bool
-_Window::IsAttached(void) const
-{
-       return _ControlManager::GetInstance()->IsWindowAttached(*this);
-}
-
-result
-_Window::Open(bool drawAndShow)
-{
-       bool visibleState = GetVisibleState();
-       if (!__isOpened && visibleState)
-       {
-               __pLayer->SetShowState(visibleState);
-               __isOpened = true;
-               __isInitialized = true;
-               return _ControlManager::GetInstance()->OpenWindow(*this, drawAndShow);
-#ifdef VE_EFL
-               if (__type != _WINDOW_TYPE_VE)
-               {
-                       _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
-                       SysTryReturn(NID_UI, pEcoreEvas, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
-                       pEcoreEvas->SetWindowVisibleState(*GetRootWindow(), visibleState);
-               }
-#endif
-
-       }
-
-       return E_SUCCESS;
-}
-
-void
-_Window::Close(void)
-{
-       if (__isOpened)
-       {
-               bool visibleState = GetVisibleState();
-#ifdef VE_EFL
-                       _EcoreEvas* pEcoreEvas = GetEcoreEvas();
-
-               if (__type != _WINDOW_TYPE_VE)
-               {
-                       bool visibleState = GetVisibleState();
-                       _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
-                       SysTryReturnVoidResult(NID_UI, pEcoreEvas, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
-                       pEcoreEvas->SetWindowVisibleState(*GetRootWindow(), visibleState);
-               }
-#endif
-               __pLayer->SetShowState(visibleState);
-               _ControlManager::GetInstance()->CloseWindow(*this);
-               __isOpened = false;
-       }
-}
-
-_Control*
-_Window::GetOwner(void) const
-{
-       ClearLastResult();
-       return __pOwner;
-}
-
-void
-_Window::SetOwner(_Control* pOwner)
-{
-       ClearLastResult();
-
-       if (pOwner)
-       {
-#ifdef BUILD_BREAK
-                       _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
-                       if (pEcoreEvas)
-                       {
-                               if (__transient == true)
-                               {
-                                       pEcoreEvas->SetOwner(*this, *pOwner);
-                               }
-
-                               __transient = true;
-                       }
-#endif 
-       }
-
-       if (pOwner == __pOwner)
-       {
-               return;
-       }
-
-       _VisualElement* pVE = GetVisualElement();
-
-       if (__pOwner)
-       {
-               __pOwner->DetachOwnee(*this);
-
-               if (__type == _WINDOW_TYPE_VE)
-               {
-                       _Window* pRootWindow = __pOwner->GetRootWindow();
-                       if (pRootWindow)
-                       {
-                               _RootVisualElement* pRootVE = pRootWindow->GetRootVisualElement();
-                               if (pRootVE && pVE)
-                               {
-                                       pRootVE->DetachChild(*pVE);
-                               }
-                       }
-               }
-       }
-
-       if (pOwner)
-       {
-               pOwner->AttachOwnee(*this);
-
-               if (__type == _WINDOW_TYPE_VE)
-               {
-                       _Window* pRootWindow = pOwner->GetRootWindow();
-                       if (pRootWindow)
-                       {
-                               _RootVisualElement* pRootVE = pRootWindow->GetRootVisualElement();
-                               if (pRootVE && pVE)
-                               {
-                                       pRootVE->AttachChild(*pVE);
-                               }
-                       }
-               }
-       }
-
-       _Control* pOldOwner = __pOwner;
-       __pOwner = pOwner;
-       GetWindowDelegate().OnOwnerChanged(pOldOwner);
-}
-
-result
-_Window::CreateRootVisualElement(_WindowType windowType)
-{
-       __type = windowType;
-
-       if (__type == _WINDOW_TYPE_VE)
-       {
-               return E_SUCCESS;
-       }
-
-       result r = CreateLayer();
-       SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
-#if VE_EFL
-       _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
-       SysAssert(pEcoreEvas);
-       __rotation = pEcoreEvas->GetWindowRotation(*this);
-       pEcoreEvas->RegisterWindowStateCallback(*this);
-#endif
-       // Get visual element.
-       _VisualElement* pVisualElement = GetVisualElement();
-       SysAssert(pVisualElement);
-
-       pVisualElement->SetName(L"Window");
-       pVisualElement->SetClipChildrenEnabled(false);
-       pVisualElement->SetRenderOperation(_VisualElement::RENDER_OPERATION_COPY);
-
-       // Attach visual element to root visual element.
-       __pRootVisualElement->AttachChild(*GetVisualElement());
-
-       if (__type == _WINDOW_TYPE_MAIN)
-       {
-               SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x, BASIC] Create.", GetNativeHandle());
-       }
-       else
-       {
-#ifdef VE_EFL
-               pEcoreEvas->SetWindowType(*this, _WINDOW_TYPE_SUB);
-               SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x, UTILITY] Create.", GetNativeHandle());
-#endif 
-       }
-
-       return E_SUCCESS;
-}
-
-result
-_Window::CreateLayer(void)
-{
-#ifdef BUILD_BREAK
-       _DisplayManager* pDisplayManager = _DisplayManager::GetInstance();
-       SysAssert(pDisplayManager);
-
-       if (__type == _WINDOW_TYPE_MAIN)
-       {
-               __pLayer = _NativeLayer::CreateInstanceN();
-       }
-       else
-       {
-               __pLayer = _NativeLayer::CreateInstanceN(false);
-       }
-
-       SysAssert(__pLayer);
-       __pRootVisualElement = __pLayer->GetRootVisualElement();
-
-       _EflLayer* pLayer = static_cast<_EflLayer*>(__pLayer);
-       SysAssert(pLayer);
-
-       int rootWindowW = 0;
-       int rootWindowH = 0;
-       ecore_x_window_size_get(ecore_x_window_root_get((Ecore_X_Window)ecore_evas_window_get(pLayer->GetEcoreEvas())), &rootWindowW, &rootWindowH);
-#endif
-
-       _GlDisplayManager* pDisplayManager = _GlDisplayManager::GetInstance();
-       SysAssert(pDisplayManager);
-
-       __pLayer = _NativeLayer::CreateInstanceN();
-       SysAssert(__pLayer);
-       __pRootVisualElement = __pLayer->GetRootVisualElement();
-
-       _GlLayer* pLayer = static_cast<_GlLayer*>(__pLayer);
-       SysAssert(pLayer);
-
-       int rootWindowW = 720;
-       int rootWindowH = 1280;
-
-       pLayer->SetBounds(FloatRectangle(0.0f, 0.0f, (float)rootWindowW, (float)rootWindowH));
-       pLayer->SetOpacity(0);
-
-       __pRootVisualElement->SetName(L"Root");
-#ifdef VE_EFL
-       _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
-       if (pEcoreEvas)
-       {
-               String osp(L"OSP_");
-               String appName = _AppInfo::GetAppName();
-               osp.Append(appName);
-
-               pEcoreEvas->SetWindowName(*this, osp);
-       }
-#endif
-
-       return E_SUCCESS;
-}
-
-void
-_Window::SetActivationEnabled(bool enable)
-{
-#ifdef BUILD_BREAK
-       if (__type == _WINDOW_TYPE_VE)
-       {
-               SetFocusable(enable);
-               return;
-       }
-
-       _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
-       SysTryReturnVoidResult(NID_UI, pEcoreEvas, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
-
-       pEcoreEvas->SetWindowActivationEnabled(*GetRootWindow(), enable);
-
-       SetLastResult(E_SUCCESS);
-#endif 
-}
-
-bool
-_Window::IsActivationEnabled(void)
-{
-#ifdef BUILD_BREAK
-       if (__type == _WINDOW_TYPE_VE)
-       {
-               return IsFocusable();
-       }
-
-       _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
-       SysTryReturn(NID_UI, pEcoreEvas, true, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
-
-       bool enable = pEcoreEvas->IsWindowActivationEnabled(*GetRootWindow());
-
-       SetLastResult(E_SUCCESS);
-
-       return enable;
-#endif 
-       return true;
-}
-
-_RootVisualElement*
-_Window::GetRootVisualElement(void) const
-{
-       return __pRootVisualElement;
-}
-
-NativeWindowHandle
-_Window::GetNativeHandle(void) const
-{
-#ifdef BUILD_BREAK
-       if (__type == _WINDOW_TYPE_VE)
-       {
-               return 0;
-       }
-
-       _RootVisualElement* pRootVE = GetRootVisualElement();
-       SysAssert(pRootVE);
-
-       _EflLayer* pLayer = static_cast<_EflLayer*>(pRootVE->GetNativeLayer());
-       SysAssert(pLayer);
-
-       Ecore_Evas* pEcoreEvas = pLayer->GetEcoreEvas();
-       Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pEcoreEvas);
-
-       return win;
-#endif
-       if(__pLayer)
-       {
-               return static_cast<_GlLayer*>(__pLayer)->GetNativeWindow();
-       }
-}
-
-void
-_Window::OnActivated(void)
-{
-       bool isFrameActivated = _ControlManager::GetInstance()->IsFrameActivated();
-       SysLog(NID_UI, "frameActivated(%d)", isFrameActivated);
-
-       _Control* focusedControl = GetCurrentFocusControl();
-
-       if (focusedControl)
-       {
-               focusedControl->SetFocused();
-       }
-
-       else
-       {
-               SetFocused();
-       }
-
-       if (!isFrameActivated)
-       {
-               return;
-       }
-
-       _TouchManager* pTouchMgr = _TouchManager::GetInstance();
-       if (pTouchMgr)
-       {
-               pTouchMgr->SetTouchCanceled(null);
-       }
-}
-
-void
-_Window::OnNativeWindowActivated(void)
-{
-
-}
-
-void
-_Window::OnFocusableStateChanged(bool focusalbeState)
-{
-       if (__type == _WINDOW_TYPE_VE)
-       {
-               return;
-       }
-
-       SetActivationEnabled(focusalbeState);
-}
-
-bool
-_Window::OnNotifiedN(const _Control& source, IList* pArgs)
-{
-       SysTryReturn(NID_UI_CTRL, pArgs, false, E_SYSTEM, "[E_SYSTEM] pArgs is null.")
-
-       String* pType = dynamic_cast <String*>(pArgs->GetAt(0));
-       SysTryReturn(NID_UI_CTRL, pType, false, E_SYSTEM, "[E_SYSTEM] pType is null.")
-
-       if (*pType == L"VisibilityEvent")
-       {
-               int obscured = 0;
-
-               Integer* pObscured = dynamic_cast<Integer*>(pArgs->GetAt(1));
-               if (pObscured == null)
-               {
-                       pArgs->RemoveAll(true);
-                       delete pArgs;
-
-                       return true;
-               }
-
-               obscured = pObscured->ToInt();
-               if (obscured == 0)
-               {
-                       GetWindowDelegate().OnNativeWindowActivated();
-               }
-
-               pArgs->RemoveAll(true);
-               delete pArgs;
-
-               return true;
-       }
-
-       return false;
-}
-
-void
-_Window::OnDeactivated(void)
-{
-       bool isFrameActivated = _ControlManager::GetInstance()->IsFrameActivated();
-       SysLog(NID_UI, "frameActivated(%d)", isFrameActivated);
-}
-
-void
-_Window::OnOwnerChanged(_Control* pOldOwner)
-{
-
-}
-
-result
-_Window::OnBoundsChanging(const FloatRectangle& bounds)
-{
-#ifdef VE_EFL
-       if (__type == _WINDOW_TYPE_VE)
-       {
-               return E_SUCCESS;
-       }
-
-       _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
-       SysTryReturn(NID_UI, pEcoreEvas, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
-
-       pEcoreEvas->SetWindowBounds(*GetRootWindow(), bounds);
-       result r = GetLastResult();
-       SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
-#endif
-       SysTryReturn(NID_UI, __pLayer, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
-
-//     return r;
-       return __pLayer->SetBounds(bounds);
-}
-
-void
-_Window::OnVisibleStateChanged(void)
-{
-       ClearLastResult();
-
-       bool visibleState = GetVisibleState();
-       if (visibleState == false)
-       {
-               Close();
-               if(unlikely((_AccessibilityManager::IsActivated())))
-               {
-                       _AccessibilityManager::GetInstance()->RequestAutoReading(_ACCESSIBILITY_AUTO_READING_MODE_FIRST_ITEM);
-               }
-       }
-
-       result r = GetLastResult();
-       SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
-
-       SetLastResult(E_SUCCESS);
-}
-
-result
-_Window::OnAttachingToMainTree(const _Control* pParent)
-{
-#ifdef BUILD_BREAK
-       if (__type == _WINDOW_TYPE_VE)
-       {
-               return E_SUCCESS;
-       }
-
-       _EflLayer* pLayer = static_cast<_EflLayer*>(__pRootVisualElement->GetNativeLayer());
-#endif
-       _GlLayer* pLayer = static_cast<_GlLayer*>(__pRootVisualElement->GetNativeLayer());      
-       SysAssert(pLayer);
-       SetVisibleState(true);
-       pLayer->SetShowState(true);
-
-       return E_SUCCESS;
-}
-
-result
-_Window::OnDetachingFromMainTree(void)
-{
-       if (__type == _WINDOW_TYPE_VE)
-       {
-               return E_SUCCESS;
-       }
-#ifdef BUILD_BREAK
-       _EflLayer* pLayer = static_cast<_EflLayer*>(__pRootVisualElement->GetNativeLayer());
-#endif
-       _GlLayer* pLayer = static_cast<_GlLayer*>(__pRootVisualElement->GetNativeLayer());
-       SysAssert(pLayer);
-       pLayer->SetShowState(false);
-
-       return E_SUCCESS;
-}
-
-void
-_Window::OnWindowStateChanged(void)
-{
-#ifdef BUILD_BREAK
-       // <0>
-       // Update rotation
-       // <1>
-       // Find current form
-       // Call UpdateOrientation
-       // <2>
-       // Find current frame
-       // Call UpdateOrientation
-       // <3>
-       // Find window
-       // Change layout
-       // Rotate window
-
-       SetOrientationCallbackModeEnabled(true);
-       _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
-       if (!pEcoreEvas)
-       {
-               return;
-       }
-
-       int rotation = pEcoreEvas->GetWindowRotation(*this);
-
-       Rectangle winBounds = GetBounds();
-       SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x, %d, %d, %d, %d] OnWindowStateChanged : prev rot = %d, cur rot = %d", GetNativeHandle(), winBounds.x, winBounds.y, winBounds.width, winBounds.height, __rotation, rotation);
-
-       if (rotation == __rotation)
-       {
-               return;
-       }
-
-       __rotation = rotation;
-
-       // <1>
-       int childCount = GetChildCount();
-       for (int i = childCount; i > 0; i--)
-       {
-               _Control* pChild = GetChild(i - 1);
-
-               _Form* pForm = dynamic_cast<_Form*>(pChild);
-               if (pForm)
-               {
-                       if (pForm->IsVisible())
-                       {
-                               // Current Form
-                               _FormImpl* pFormImpl = static_cast<_FormImpl*>(pForm->GetUserData());
-                               if (pFormImpl)
-                               {
-                                       pFormImpl->UpdateOrientation();
-                               }
-
-                               return;
-                       }
-               }
-       }
-
-       // <2>
-       if (IsOrientationRoot())
-       {
-               _FrameImpl* pFrameImpl = static_cast<_FrameImpl*>(GetUserData());
-               if (pFrameImpl)
-               {
-                       pFrameImpl->UpdateOrientation();
-               }
-
-               return;
-       }
-
-       // <3>
-       SysLog(NID_UI, "[Window Manager Rotation] ---------- Update Ownee Window : START ----------");
-
-       _ControlOrientation controlOrientation = (rotation == 0 || rotation == 180) ? _CONTROL_ORIENTATION_PORTRAIT : _CONTROL_ORIENTATION_LANDSCAPE;
-       ChangeLayout(controlOrientation, false);
-
-       _ControlRotation controlRotation = _CONTROL_ROTATION_0;
-       switch (rotation)
-       {
-               case 0:
-                       controlRotation = _CONTROL_ROTATION_0;
-                       break;
-               case 90:
-                       controlRotation = _CONTROL_ROTATION_90;
-                       break;
-               case 180:
-                       controlRotation = _CONTROL_ROTATION_180;
-                       break;
-               case 270:
-                       controlRotation = _CONTROL_ROTATION_270;
-                       break;
-               default:
-                       break;
-       }
-       ChangeLayout(controlRotation);
-
-       pEcoreEvas->RotateWindow(*this, __rotation, false);
-
-       Invalidate(true);
-
-       SysLog(NID_UI, "[Window Manager Rotation] ---------- Update Ownee Window : END ----------");
-       SetOrientationCallbackModeEnabled(false);
-#endif
-}
-
-void
-_Window::OnTouchCaptureGained(void)
-{
-
-}
-
-void
-_Window::OnTouchCaptureLost(void)
-{
-}
-
-void
-_Window::SetPreferredRotation(bool enable)
-{
-       __preferredRotation = enable;
-}
-
-bool
-_Window::GetPreferredRotation(void) const
-{
-       return __preferredRotation;
-}
-
-bool
-_Window::IsRotationSynchronized(void) const
-{
-       return false;
-}
-
-bool
-_Window::IsLayoutChangable(void) const
-{
-       if (__type == _WINDOW_TYPE_VE)
-       {
-               return true;
-       }
-
-       return false;
-}
-
-void
-_Window::SetRotation(int rotation)
-{
-       __rotation = rotation;
-}
-
-_WindowType
-_Window::GetWindowType(void)
-{
-       return __type;
-}
-
-void
-_Window::OnChangeLayout(_ControlOrientation orientation)
-{
-       _DimmingLayer *pLayer = GetDimmingLayer();
-       if (pLayer)
-       {
-               result r = GetDimmingLayer()->Rearrange();
-               SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
-       }
-
-       // if window, change its size specially for full-screen(Form, Frame, etc.).
-       _Control::OnChangeLayout(orientation); // if called, layout will be changed.
-}
-
-WindowState
-_Window::GetWindowState(void) const
-{
-       ClearLastResult();
-       return __windowState;
-}
-
-void
-_Window::SetWindowState(WindowState windowState)
-{
-       __windowState = windowState;
-}
-
-DisplayContext*
-_Window::GetDisplayContext(void) const
-{
-       if (!__pDisplayContext)
-       {
-               SysTryReturn(NID_UI, __pLayer, null, E_SYSTEM, "[E_SYSTEM] Cannot gain the DisplayContext. This window is not completed.");
-
-               __pDisplayContext = _DisplayContextImpl::CreatePublicInstance(*__pLayer);
-       }
-
-       result r = GetLastResult();
-       SysTryReturn(NID_UI, __pDisplayContext, null, r, "[%s] Propagating.", GetErrorMessage(r));
-
-       return __pDisplayContext;
-}
-
-result
-_Window::SetZOrderGroup(int windowZOrderGroup)
-{
-       if (__type == _WINDOW_TYPE_VE)
-       {
-               return E_SUCCESS;
-       }
-#ifdef BUILD_BREAK
-       _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
-
-       if (windowZOrderGroup == WINDOW_Z_ORDER_GROUP_HIGHEST)
-       {
-               pEcoreEvas->SetWindowLevel(*this, _WINDOW_LEVEL_NOTIFICATION_HIGH);
-       }
-       else if (windowZOrderGroup == WINDOW_Z_ORDER_GROUP_HIGH)
-       {
-               pEcoreEvas->SetWindowLevel(*this, _WINDOW_LEVEL_NOTIFICATION_MIDDLE);
-       }
-       else if (windowZOrderGroup == WINDOW_Z_ORDER_GROUP_NORMAL)
-       {
-               pEcoreEvas->SetWindowLevel(*this, _WINDOW_LEVEL_NORMAL);
-       }
-
-       __transient = false;
-
-       bool visible = pEcoreEvas->IsWindowVisible(*this);
-       bool activationEnabled = pEcoreEvas->IsWindowActivationEnabled(*this);
-
-       if ((visible == true) && (activationEnabled == true))
-       {
-               pEcoreEvas->ActivateWindow(*this);
-       }
-#endif
-       return E_SUCCESS;
-}
-
-_Window::_Window()
-       : __type(_WINDOW_TYPE_MAIN)
-       , __windowState(WINDOW_STATE_INITIALIZED)
-       , __pOwner(null)
-       , __pWindowDelegate(null)
-       , __activated(false)
-       , __destroying(false)
-       , __pRootVisualElement(null)
-       , __pLayer(null)
-       , __pDimmingLayer(null)
-       , __pDisplayContext(null)
-       , __systemWindow(false)
-       , __isOpened(false)
-       , __isInitialized(false)
-       , __pFocusControl(null)
-       , __pFocusTraversalControl(null)
-       , __transient(true)
-       , __dimmingEnabled(false)
-       , __rotation(-1)
-       , __preferredRotation(false)
-       , __orientationCallbackMode(false)
-{
-       SetControlDelegate(*this);
-       SetWindowDelegate(*this);
-       SetClipToParent(false); // [ToDo] exception check.
-}
-
-void
-_Window::Activate(void)
-{
-       if (__activated)
-       {
-               return;
-       }
-
-       __activated = true;
-       GetWindowDelegate().OnActivated();
-}
-
-void
-_Window::Deactivate(void)
-{
-       __activated = false;
-
-       if (__destroying == false)
-       {
-               GetWindowDelegate().OnDeactivated();
-       }
-}
-
-void
-_Window::SetSystemWindow(bool systemWindow)
-{
-       __systemWindow = systemWindow;
-}
-
-bool
-_Window::IsSystemWindow(void) const
-{
-       return __systemWindow;
-}
-
-IListT<_Control*>*
-_Window::GetFocusList(void) const
-{
-       if(!__pFocusControlList)
-       {
-               __pFocusControlList.reset(GetFocusListN());
-               __pFocusControlList->InsertAt(const_cast<_Window*>(this), 0);
-       }
-       return __pFocusControlList.get();
-}
-
-void
-_Window::ResetFocusList(void)
-{
-       if(__pFocusControlList)
-       {
-               __pFocusControlList.reset();
-       }
-}
-
-result
-_Window::SetDimmingEnabled(bool enabled)
-{
-       __dimmingEnabled = enabled;
-
-       return E_SUCCESS;
-}
-
-bool
-_Window::IsDimmingEnabled(void) const
-{
-       return __dimmingEnabled;
-}
-
-void
-_Window::SetDimmingLayer(_DimmingLayer* pLayer)
-{
-       __pDimmingLayer = pLayer;
-}
-
-_DimmingLayer*
-_Window::GetDimmingLayer(void)
-{
-       return __pDimmingLayer;
-}
-
-void
-_Window::SetOrientationCallbackModeEnabled(bool enable)
-{
-       __orientationCallbackMode = enable;
-}
-
-bool
-_Window::IsOrientationCallbackModeEnabled(void) const
-{
-       return __orientationCallbackMode;
-}
-
-_Control*
-_Window::GetFocusTraversalControl(_Control* pControl) const
-{
-       return __pFocusTraversalControl;
-}
-void
-_Window::SetFocusTraversalControl(_Control* pControl)
-{
-       __pFocusTraversalControl = pControl;
-}
-
-void
-_Window:: SetFocusControl(const _Control* pControl, bool on)
-{
-       SysTryReturnVoidResult(NID_UI, pControl, E_SYSTEM, "[E_SYSTEM] The pControl cannot be NULL.");
-
-       __pFocusControl = const_cast<_Control*>(pControl);
-
-       _ControlManager* pControlMgr = _ControlManager::GetInstance();
-       SysAssert(pControlMgr);
-
-       if (on)
-       {
-               if (IsActivated())
-               {
-                       pControlMgr->SetFocusControl(*pControl);
-               }
-       }
-       else
-       {
-               pControlMgr->SetFocusControl(*this, false);
-               SetFocused();
-       }
-}
-
-_Control*
-_Window::GetFocusControl(const _Control* pControl) const
-{
-       return __pFocusControl;
-}
-_Control*
-_Window::GetCurrentFocusControl(void) const
-{
-       return __pFocusControl;
-}
-}} // Tizen::Ui
index 1d40bce..3fd8ebc 100644 (file)
@@ -912,20 +912,6 @@ VisualElement::GetMeshN(const String& name) const
 }
 
 result
-VisualElement::SetTexture(const String& meshName, Bitmap* pTexture)
-{
-       CHECK_CONSTRUCTED;
-       return _pVisualElementImpl->SetTexture(meshName, pTexture);
-}
-
-Bitmap*
-VisualElement::GetTexture(const String& meshName) const
-{
-       CHECK_CONSTRUCTED;
-       return _pVisualElementImpl->GetTexture(meshName);
-}
-
-result
 VisualElement::SetShaderProgram(ShaderProgram* pShaderProgram)
 {
        CHECK_CONSTRUCTED;
index 73cc189..3a1bfdb 100644 (file)
@@ -58,7 +58,7 @@
 
 #define FRAME_INTERVAL 16
 
-//#define PRINT fprintf(stderr, __VA_ARGS__)
+//#define PRINT(...) fprintf(stderr, __VA_ARGS__)
 #define PRINT(...)
 
 #if defined(USE_ECORE_LOOP)
@@ -418,12 +418,10 @@ _AnimationManager::AddAnimation(VisualElement& target, const Tizen::Base::String
        r = __pCurrentTransaction->AddAnimation(target, pKeyName, animation);
        SysTryReturnResult(NID_UI_ANIM, r == E_SUCCESS, r, "Failed to add animation.");
 
-#ifdef VE_EFL
-       if (__pCurrentTransaction->IsCommitted() && __isAnimating == false)
+       if (__pCurrentTransaction->IsCommitted() && __mainRoot.__isAnimating == false)
        {
                SetAnimatorEnabled(true);
        }
-#endif
 
        return E_SUCCESS;
 }
@@ -699,12 +697,10 @@ _AnimationManager::CommitTransaction(void)
                {
                        __committedList.Add(__pCurrentTransaction);
 
-#ifdef VE_EFL
-                       if (__isAnimating == false)
+                       if (__mainRoot.__isAnimating == false)
                        {
                                SetAnimatorEnabled(true);
                        }
-#endif
                }
                else
                {
@@ -996,6 +992,7 @@ _AnimationManager::ProcessAnimationTick(bool isMainThread)
                CommitCurrentTransactionIfNeeded();
                ProcessCommittedTransaction();
        }
+
        _AutoMutex lock(*__pLock);
 
        tick = _AnimationTime::GetTime();
@@ -1011,6 +1008,11 @@ _AnimationManager::ProcessAnimationTick(bool isMainThread)
 #else
        if (likely(pRoot->__pRootTransaction->IsEmpty()))
        {
+               if (isMainThread)
+               {
+                       SetAnimatorEnabled(false);
+               }
+
                pRoot->__isAnimating = false;
        }
        else
index 723167c..520362d 100644 (file)
@@ -1,87 +1,73 @@
+//
+// Open Service Platform
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     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,
+// 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.
+//
+
+/**
+ * @file       FUiAnim_GeometryInfo.cpp
+ * @brief      This file contains implementation of _GeometryInfo class
+ *
+ * This file contains implementation _GeometryInfo class.
+ */
 
 #include <FBaseSysLog.h>
 #include <FUiAnimMesh.h>
 
-#include "FUiAnim_MeshInfo.h"
 #include "FUiAnim_GeometryInfo.h"
-
 #include "FUiAnim_ShaderProgramImpl.h"
 
 using namespace Tizen::Base;
-using namespace Tizen::Graphics;
 
 namespace Tizen { namespace Ui { namespace Animations{
 
-
 _GeometryInfo::_GeometryInfo()
-    : __pMeshInfo(null)
+       : __pMesh(null)
        , __pShaderProgram(null)
 {
 }
 
-
 _GeometryInfo::~_GeometryInfo()
 {
-    if(__pMeshInfo)
-    {
-        delete __pMeshInfo;
-        __pMeshInfo = null;
-    }
-}
-
-result
-_GeometryInfo::AddMesh(const String& name, Mesh* pMesh)
-{
-    if(!__pMeshInfo)
-    {
-        __pMeshInfo = new (std::nothrow)_MeshInfo;
-        if(!__pMeshInfo)
-        {
-            return E_OUT_OF_MEMORY;
-        }
-    }
-    __pMeshInfo->SetMesh(pMesh);
-
-    return E_SUCCESS;
-
-}
-
-result
-_GeometryInfo::RemoveMesh(const String& name)
-{
-    if(__pMeshInfo)
-    {
-        delete __pMeshInfo;
-        __pMeshInfo = null;
-    }
-    return E_SUCCESS;
-}
-
-result
-_GeometryInfo::AddTexture(const String& meshName, Bitmap* pTexture)
-{
-    if(__pMeshInfo)
-    {
-        return __pMeshInfo->SetTexture(pTexture);
-    }
-    return E_SUCCESS;
+       if (__pMesh)
+       {
+               delete __pMesh;
+               __pMesh = null;
+       }
 }
 
-result
-_GeometryInfo::RemoveTexture(const String& meshName)
+void
+_GeometryInfo::SetMesh(Mesh* pMesh)
 {
-    if(__pMeshInfo)
-    {
-        return __pMeshInfo->SetTexture(null);
+       if (pMesh)
+       {
+               __pMesh = new (std::nothrow)Mesh(*pMesh);
+       }
+       else
+       {
+               if (__pMesh)
+               {
+                       delete __pMesh;
+                       __pMesh = null;
+               }
        }
-
-    return E_SUCCESS;
 }
 
-_MeshInfo*
-_GeometryInfo::GetMeshInfo(const String& name) const
+Mesh*
+_GeometryInfo::GetMesh() const
 {
-    return __pMeshInfo;
+       return __pMesh;
 }
 
 result
@@ -113,5 +99,4 @@ _GeometryInfo::GetShaderProgram(void)
        return __pShaderProgram;
 }
 
-
 }}} //namespace Tizen { namespace Ui { namespace Animations{
index e0f87ee..f1a85e4 100644 (file)
@@ -44,7 +44,6 @@
 #include "FUiAnim_VisualElementSurfaceManager.h"
 #include "FUiAnim_GlRenderManager.h"
 
-#include "FUiAnim_MeshInfo.h"
 #include "FUiAnimMesh.h"
 
 #include "FUiAnim_ShaderProgramImpl.h"
@@ -268,62 +267,62 @@ _GlNode::SyncStatus(VisualElementSurface* pSurface, _VisualElementImpl& element)
                        {
                                if (element.__useContentBounds)
                                {
-                                       __pVertices[4]  = element.__contentBounds.x;
-                                       __pVertices[5]  = element.__contentBounds.y;
+                                       __pVertices[3]  = element.__contentBounds.x;
+                                       __pVertices[4]  = element.__contentBounds.y;
 
-                                       __pVertices[12]  = element.__contentBounds.x + element.__contentBounds.width;
-                                       __pVertices[13]  = element.__contentBounds.y;
+                                       __pVertices[8]  = element.__contentBounds.x + element.__contentBounds.width;
+                                       __pVertices[9]  = element.__contentBounds.y;
 
-                                       __pVertices[20] = element.__contentBounds.x;
-                                       __pVertices[21] = element.__contentBounds.y + element.__contentBounds.height;
+                                       __pVertices[13] = element.__contentBounds.x;
+                                       __pVertices[14] = element.__contentBounds.y + element.__contentBounds.height;
 
-                                       __pVertices[28] = element.__contentBounds.x + element.__contentBounds.width;
-                                       __pVertices[29] = element.__contentBounds.y + element.__contentBounds.height;
+                                       __pVertices[18] = element.__contentBounds.x + element.__contentBounds.width;
+                                       __pVertices[19] = element.__contentBounds.y + element.__contentBounds.height;
                                }
                                else
                                {
+                                       __pVertices[3]  = 0.0f;
                                        __pVertices[4]  = 0.0f;
-                                       __pVertices[5]  = 0.0f;
 
-                                       __pVertices[12]  = 1.0f;
-                                       __pVertices[13]  = 0.0f;
+                                       __pVertices[8]  = 1.0f;
+                                       __pVertices[9]  = 0.0f;
 
-                                       __pVertices[20] = 0.0f;
-                                       __pVertices[21] = 1.0f;
+                                       __pVertices[13] = 0.0f;
+                                       __pVertices[14] = 1.0f;
 
-                                       __pVertices[28] = 1.0f;
-                                       __pVertices[29] = 1.0f;
+                                       __pVertices[18] = 1.0f;
+                                       __pVertices[19] = 1.0f;
                                }
                        }
                        else
                        {
                                if (element.__useContentBounds)
                                {
-                                       __pVertices[4]  = element.__contentBounds.x + __visibleRect.Left() / __bounds.Width() * element.__contentBounds.width;
-                                       __pVertices[5]  = element.__contentBounds.y + __visibleRect.Top() / __bounds.Height() * element.__contentBounds.height;
+                                       __pVertices[3]  = element.__contentBounds.x + __visibleRect.Left() / __bounds.Width() * element.__contentBounds.width;
+                                       __pVertices[4]  = element.__contentBounds.y + __visibleRect.Top() / __bounds.Height() * element.__contentBounds.height;
 
-                                       __pVertices[12]  = element.__contentBounds.x + (__visibleRect.Left() + __visibleRect.Width()) / __bounds.Width() * element.__contentBounds.width;
-                                       __pVertices[13]  = element.__contentBounds.y + __visibleRect.Top() / __bounds.Height() * element.__contentBounds.height;
+                                       __pVertices[8]  = element.__contentBounds.x + (__visibleRect.Left() + __visibleRect.Width()) / __bounds.Width() * element.__contentBounds.width;
+                                       __pVertices[9]  = element.__contentBounds.y + __visibleRect.Top() / __bounds.Height() * element.__contentBounds.height;
 
-                                       __pVertices[20] = element.__contentBounds.x + __visibleRect.Left() / __bounds.Width() * element.__contentBounds.width;
-                                       __pVertices[21] = element.__contentBounds.y + (__visibleRect.Top() + __visibleRect.Height()) / __bounds.Height() * element.__contentBounds.height;
+                                       __pVertices[13] = element.__contentBounds.x + __visibleRect.Left() / __bounds.Width() * element.__contentBounds.width;
+                                       __pVertices[14] = element.__contentBounds.y + (__visibleRect.Top() + __visibleRect.Height()) / __bounds.Height() * element.__contentBounds.height;
 
-                                       __pVertices[28] = element.__contentBounds.x + (__visibleRect.Left() + __visibleRect.Width()) / __bounds.Width() * element.__contentBounds.width;
-                                       __pVertices[29] = element.__contentBounds.y + (__visibleRect.Top() + __visibleRect.Height()) / __bounds.Height() * element.__contentBounds.height;
+                                       __pVertices[18] = element.__contentBounds.x + (__visibleRect.Left() + __visibleRect.Width()) / __bounds.Width() * element.__contentBounds.width;
+                                       __pVertices[19] = element.__contentBounds.y + (__visibleRect.Top() + __visibleRect.Height()) / __bounds.Height() * element.__contentBounds.height;
                                }
                                else
                                {
-                                       __pVertices[4]  = __visibleRect.Left() / __bounds.Width();
-                                       __pVertices[5]  = __visibleRect.Top() / __bounds.Height();
+                                       __pVertices[3]  = __visibleRect.Left() / __bounds.Width();
+                                       __pVertices[4]  = __visibleRect.Top() / __bounds.Height();
 
-                                       __pVertices[12]  = (__visibleRect.Left() + __visibleRect.Width()) / __bounds.Width();
-                                       __pVertices[13]  = __visibleRect.Top() / __bounds.Height();
+                                       __pVertices[8]  = (__visibleRect.Left() + __visibleRect.Width()) / __bounds.Width();
+                                       __pVertices[9]  = __visibleRect.Top() / __bounds.Height();
 
-                                       __pVertices[20] = __visibleRect.Left() / __bounds.Width();
-                                       __pVertices[21] = (__visibleRect.Top() + __visibleRect.Height()) / __bounds.Height();
+                                       __pVertices[13] = __visibleRect.Left() / __bounds.Width();
+                                       __pVertices[14] = (__visibleRect.Top() + __visibleRect.Height()) / __bounds.Height();
 
-                                       __pVertices[28] = (__visibleRect.Left() + __visibleRect.Width()) / __bounds.Width();
-                                       __pVertices[29] = (__visibleRect.Top() + __visibleRect.Height()) / __bounds.Height();
+                                       __pVertices[18] = (__visibleRect.Left() + __visibleRect.Width()) / __bounds.Width();
+                                       __pVertices[19] = (__visibleRect.Top() + __visibleRect.Height()) / __bounds.Height();
                                }
                        }
                }
@@ -340,31 +339,25 @@ _GlNode::SyncStatus(VisualElementSurface* pSurface, _VisualElementImpl& element)
 
        element.__pSharedData->surfaceChanged = false;
 
-       _MeshInfo* pMeshInfo = element.GetSharedData().geometry.GetMeshInfo("");
+       Mesh* pMesh = element.GetSharedData().geometry.GetMesh();
 
-       if (pMeshInfo)
+       if (pMesh)
        {
-               Mesh* pMesh = pMeshInfo->GetMesh();
-
-               if (pMesh)
+               if (__pMesh == null)
                {
-                       if (__pMesh == null)
-                               __pMesh = new (std::nothrow) Mesh(*pMesh);
-
-#if 0
-                       if (pMeshInfo->__pTexture)
-                       {
-                               __texId = pMeshInfo->__pTextureInfo->textureId;
-                       }
-#endif
+                       __pMesh = new (std::nothrow) Mesh(*pMesh);
                }
                else
                {
-                       if (__pMesh)
-                       {
-                               delete __pMesh;
-                               __pMesh = null;
-                       }
+                       // TODO: implement
+               }
+       }
+       else
+       {
+               if (__pMesh)
+               {
+                       delete __pMesh;
+                       __pMesh = null;
                }
        }
 
@@ -386,17 +379,17 @@ _GlNode::SyncStatus(VisualElementSurface* pSurface, _VisualElementImpl& element)
                        __pVertices[1] = 0.0f;
                        __pVertices[2] = 0.0f;
 
-                       __pVertices[8] = __bounds.Width();
-                       __pVertices[9] = 0.0f;
-                       __pVertices[10] = 0.0f;
+                       __pVertices[5] = __bounds.Width();
+                       __pVertices[6] = 0.0f;
+                       __pVertices[7] = 0.0f;
 
-                       __pVertices[16] = 0.0f;
-                       __pVertices[17] = __bounds.Height();
-                       __pVertices[18] = 0.0f;
+                       __pVertices[10] = 0.0f;
+                       __pVertices[11] = __bounds.Height();
+                       __pVertices[12] = 0.0f;
 
-                       __pVertices[24] = __bounds.Width();
-                       __pVertices[25] = __bounds.Height();
-                       __pVertices[26] = 0.0f;
+                       __pVertices[15] = __bounds.Width();
+                       __pVertices[16] = __bounds.Height();
+                       __pVertices[17] = 0.0f;
                }
                else
                {
@@ -404,17 +397,17 @@ _GlNode::SyncStatus(VisualElementSurface* pSurface, _VisualElementImpl& element)
                        __pVertices[1] = __transform.matrix[3][1];
                        __pVertices[2] = 0.0f;
 
-                       __pVertices[8] = __transform.matrix[3][0] + __bounds.Width();
-                       __pVertices[9] = __transform.matrix[3][1];
-                       __pVertices[10] = 0.0f;
+                       __pVertices[5] = __transform.matrix[3][0] + __bounds.Width();
+                       __pVertices[6] = __transform.matrix[3][1];
+                       __pVertices[7] = 0.0f;
 
-                       __pVertices[16] = __transform.matrix[3][0];
-                       __pVertices[17] = __transform.matrix[3][1] + __bounds.Height();
-                       __pVertices[18] = 0.0f;
+                       __pVertices[10] = __transform.matrix[3][0];
+                       __pVertices[11] = __transform.matrix[3][1] + __bounds.Height();
+                       __pVertices[12] = 0.0f;
 
-                       __pVertices[24] = __transform.matrix[3][0] + __bounds.Width();
-                       __pVertices[25] = __transform.matrix[3][1] + __bounds.Height();
-                       __pVertices[26] = 0.0f;
+                       __pVertices[15] = __transform.matrix[3][0] + __bounds.Width();
+                       __pVertices[16] = __transform.matrix[3][1] + __bounds.Height();
+                       __pVertices[17] = 0.0f;
 
                        __transform.matrix[3][0] = 0.0f;
                        __transform.matrix[3][1] = 0.0f;
@@ -428,17 +421,17 @@ _GlNode::SyncStatus(VisualElementSurface* pSurface, _VisualElementImpl& element)
                        __pVertices[1] = __visibleRect.Top();
                        __pVertices[2] = 0.0f;
 
-                       __pVertices[8] = __visibleRect.Left() + __visibleRect.Width();
-                       __pVertices[9] = __visibleRect.Top();
-                       __pVertices[10] = 0.0f;
+                       __pVertices[5] = __visibleRect.Left() + __visibleRect.Width();
+                       __pVertices[6] = __visibleRect.Top();
+                       __pVertices[7] = 0.0f;
 
-                       __pVertices[16] = __visibleRect.Left();
-                       __pVertices[17] = __visibleRect.Top() + __visibleRect.Height();
-                       __pVertices[18] = 0.0f;
+                       __pVertices[10] = __visibleRect.Left();
+                       __pVertices[11] = __visibleRect.Top() + __visibleRect.Height();
+                       __pVertices[12] = 0.0f;
 
-                       __pVertices[24] = __visibleRect.Left() + __visibleRect.Width();
-                       __pVertices[25] = __visibleRect.Top() + __visibleRect.Height();
-                       __pVertices[26] = 0.0f;
+                       __pVertices[15] = __visibleRect.Left() + __visibleRect.Width();
+                       __pVertices[16] = __visibleRect.Top() + __visibleRect.Height();
+                       __pVertices[17] = 0.0f;
                }
                else
                {
@@ -446,24 +439,23 @@ _GlNode::SyncStatus(VisualElementSurface* pSurface, _VisualElementImpl& element)
                        __pVertices[1] = __transform.matrix[3][1] + __visibleRect.Top();
                        __pVertices[2] = 0.0f;
 
-                       __pVertices[8] = __transform.matrix[3][0] + __visibleRect.Left() + __visibleRect.Width();
-                       __pVertices[9] = __transform.matrix[3][1] + __visibleRect.Top();
-                       __pVertices[10] = 0.0f;
+                       __pVertices[5] = __transform.matrix[3][0] + __visibleRect.Left() + __visibleRect.Width();
+                       __pVertices[6] = __transform.matrix[3][1] + __visibleRect.Top();
+                       __pVertices[7] = 0.0f;
 
-                       __pVertices[16] = __transform.matrix[3][0] + __visibleRect.Left();
-                       __pVertices[17] = __transform.matrix[3][1] + __visibleRect.Top() + __visibleRect.Height();
-                       __pVertices[18] = 0.0f;
+                       __pVertices[10] = __transform.matrix[3][0] + __visibleRect.Left();
+                       __pVertices[11] = __transform.matrix[3][1] + __visibleRect.Top() + __visibleRect.Height();
+                       __pVertices[12] = 0.0f;
 
-                       __pVertices[24] = __transform.matrix[3][0] + __visibleRect.Left() + __visibleRect.Width();
-                       __pVertices[25] = __transform.matrix[3][1] + __visibleRect.Top() + __visibleRect.Height();
-                       __pVertices[26] = 0.0f;
+                       __pVertices[15] = __transform.matrix[3][0] + __visibleRect.Left() + __visibleRect.Width();
+                       __pVertices[16] = __transform.matrix[3][1] + __visibleRect.Top() + __visibleRect.Height();
+                       __pVertices[17] = 0.0f;
 
                        __transform.matrix[3][0] = 0.0f;
                        __transform.matrix[3][1] = 0.0f;
                }
        }
 
-
        //temp for shader
        ShaderProgram* pProgram = element.GetSharedData().geometry.GetShaderProgram();
 
index b85edcb..7b86320 100644 (file)
@@ -101,7 +101,7 @@ private:
        _Colorf __backgroundColor;
        _Colorf __objectColor;  // These color values are premultiplied by alpha.
 
-       float __pVertices[32];  // (vertex (x, y, z, 1), texture (s, t, 1, 1)) * 4
+       float __pVertices[20];  // (vertex (x, y, z), texture (s, t)) * 4
 
        unsigned int __textureId;
 
index 513b1f0..064ec47 100644 (file)
@@ -186,7 +186,7 @@ _GlRenderManager::_RenderObject::SetObject(_GlNode* pNode, const _Matrix3Df& mvp
                __useDepthTest = false;
 
                __bounds.SetRect(pNode->__pVertices[0], pNode->__pVertices[1],
-                               pNode->__pVertices[24] - pNode->__pVertices[0], pNode->__pVertices[25] - pNode->__pVertices[1]);
+                               pNode->__pVertices[15] - pNode->__pVertices[0], pNode->__pVertices[16] - pNode->__pVertices[1]);
 
                __vertexCount = 6;
 
@@ -194,25 +194,25 @@ _GlRenderManager::_RenderObject::SetObject(_GlNode* pNode, const _Matrix3Df& mvp
                __pVertexBuffer[vertexIndex++] = pNode->__pVertices[1];
                __pVertexBuffer[vertexIndex++] = pNode->__pVertices[2];
 
-               __pVertexBuffer[vertexIndex++] = pNode->__pVertices[8];
-               __pVertexBuffer[vertexIndex++] = pNode->__pVertices[9];
+               __pVertexBuffer[vertexIndex++] = pNode->__pVertices[5];
+               __pVertexBuffer[vertexIndex++] = pNode->__pVertices[6];
+               __pVertexBuffer[vertexIndex++] = pNode->__pVertices[7];
+
                __pVertexBuffer[vertexIndex++] = pNode->__pVertices[10];
+               __pVertexBuffer[vertexIndex++] = pNode->__pVertices[11];
+               __pVertexBuffer[vertexIndex++] = pNode->__pVertices[12];
 
-               __pVertexBuffer[vertexIndex++] = pNode->__pVertices[16];
-               __pVertexBuffer[vertexIndex++] = pNode->__pVertices[17];
-               __pVertexBuffer[vertexIndex++] = pNode->__pVertices[18];
+               __pVertexBuffer[vertexIndex++] = pNode->__pVertices[5];
+               __pVertexBuffer[vertexIndex++] = pNode->__pVertices[6];
+               __pVertexBuffer[vertexIndex++] = pNode->__pVertices[7];
 
-               __pVertexBuffer[vertexIndex++] = pNode->__pVertices[8];
-               __pVertexBuffer[vertexIndex++] = pNode->__pVertices[9];
                __pVertexBuffer[vertexIndex++] = pNode->__pVertices[10];
+               __pVertexBuffer[vertexIndex++] = pNode->__pVertices[11];
+               __pVertexBuffer[vertexIndex++] = pNode->__pVertices[12];
 
+               __pVertexBuffer[vertexIndex++] = pNode->__pVertices[15];
                __pVertexBuffer[vertexIndex++] = pNode->__pVertices[16];
                __pVertexBuffer[vertexIndex++] = pNode->__pVertices[17];
-               __pVertexBuffer[vertexIndex++] = pNode->__pVertices[18];
-
-               __pVertexBuffer[vertexIndex++] = pNode->__pVertices[24];
-               __pVertexBuffer[vertexIndex++] = pNode->__pVertices[25];
-               __pVertexBuffer[vertexIndex++] = pNode->__pVertices[26];
 
                __pVertices = __pVertexBuffer;
 
@@ -223,23 +223,23 @@ _GlRenderManager::_RenderObject::SetObject(_GlNode* pNode, const _Matrix3Df& mvp
                        __pSurfaceInfo = (GlVisualElementSurfaceInfo*)pSurfaceImpl->GetNativeHandle();
                        __textureId = pNode->__textureId;
 
+                       __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[3];
                        __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[4];
-                       __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[5];
 
-                       __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[12];
+                       __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[8];
+                       __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[9];
+
                        __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[13];
+                       __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[14];
 
-                       __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[20];
-                       __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[21];
+                       __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[8];
+                       __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[9];
 
-                       __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[12];
                        __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[13];
+                       __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[14];
 
-                       __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[20];
-                       __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[21];
-
-                       __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[28];
-                       __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[29];
+                       __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[18];
+                       __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[19];
 
                        __pTexCoords = __pTexCoordBuffer;
                }
@@ -260,7 +260,7 @@ _GlRenderManager::_RenderObject::SetObject(_GlNode* pNode, const _Matrix3Df& mvp
 
                __vertexCount = pMeshImpl->__countOfVertex;
 
-               if (pNode->__textureId > 0)
+               if (pNode->__textureId > 0 && pMeshImpl->__pTexCoordinates)
                {
                        _VisualElementSurfaceImpl* pSurfaceImpl = _VisualElementSurfaceImpl::GetInstance(*pNode->GetSurface());
 
@@ -283,7 +283,7 @@ _GlRenderManager::_RenderObject::SetObject(_GlNode* pNode, const _Matrix3Df& mvp
        }
 
        // Set program info
-       if (pNode->__textureId > 0)
+       if (__textureId > 0)
        {
                if (_FloatCompare(pNode->__opacity, 1.0f))
                {
@@ -330,6 +330,12 @@ _GlRenderManager::_RenderObject::ResetObject(void)
        __vertexCount = 0;
        __indexCount = 0;
 
+       __pVertices = null;
+       __pTexCoords = null;
+       __pColors = null;
+       __pNormals = null;
+       __pIndices = null;
+
        return;
 }
 
@@ -345,51 +351,51 @@ _GlRenderManager::_RenderObject::AddVertices(_GlNode* pNode)
        __pVertexBuffer[vertexIndex++] = pNode->__pVertices[1];
        __pVertexBuffer[vertexIndex++] = pNode->__pVertices[2];
 
-       __pVertexBuffer[vertexIndex++] = pNode->__pVertices[8];
-       __pVertexBuffer[vertexIndex++] = pNode->__pVertices[9];
+       __pVertexBuffer[vertexIndex++] = pNode->__pVertices[5];
+       __pVertexBuffer[vertexIndex++] = pNode->__pVertices[6];
+       __pVertexBuffer[vertexIndex++] = pNode->__pVertices[7];
+
        __pVertexBuffer[vertexIndex++] = pNode->__pVertices[10];
+       __pVertexBuffer[vertexIndex++] = pNode->__pVertices[11];
+       __pVertexBuffer[vertexIndex++] = pNode->__pVertices[12];
 
-       __pVertexBuffer[vertexIndex++] = pNode->__pVertices[16];
-       __pVertexBuffer[vertexIndex++] = pNode->__pVertices[17];
-       __pVertexBuffer[vertexIndex++] = pNode->__pVertices[18];
+       __pVertexBuffer[vertexIndex++] = pNode->__pVertices[5];
+       __pVertexBuffer[vertexIndex++] = pNode->__pVertices[6];
+       __pVertexBuffer[vertexIndex++] = pNode->__pVertices[7];
 
-       __pVertexBuffer[vertexIndex++] = pNode->__pVertices[8];
-       __pVertexBuffer[vertexIndex++] = pNode->__pVertices[9];
        __pVertexBuffer[vertexIndex++] = pNode->__pVertices[10];
+       __pVertexBuffer[vertexIndex++] = pNode->__pVertices[11];
+       __pVertexBuffer[vertexIndex++] = pNode->__pVertices[12];
 
+       __pVertexBuffer[vertexIndex++] = pNode->__pVertices[15];
        __pVertexBuffer[vertexIndex++] = pNode->__pVertices[16];
        __pVertexBuffer[vertexIndex++] = pNode->__pVertices[17];
-       __pVertexBuffer[vertexIndex++] = pNode->__pVertices[18];
-
-       __pVertexBuffer[vertexIndex++] = pNode->__pVertices[24];
-       __pVertexBuffer[vertexIndex++] = pNode->__pVertices[25];
-       __pVertexBuffer[vertexIndex++] = pNode->__pVertices[26];
 
        if (pNode->__textureId > 0)
        {
+               __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[3];
                __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[4];
-               __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[5];
 
-               __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[12];
+               __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[8];
+               __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[9];
+
                __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[13];
+               __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[15];
 
-               __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[20];
-               __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[21];
+               __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[8];
+               __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[9];
 
-               __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[12];
                __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[13];
+               __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[14];
 
-               __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[20];
-               __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[21];
-
-               __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[28];
-               __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[29];
+               __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[18];
+               __pTexCoordBuffer[textureIndex++] = pNode->__pVertices[19];
        }
 
        __vertexCount += 6;
 
        _Rectanglef bounds = _Rectanglef(pNode->__pVertices[0], pNode->__pVertices[1],
-                       pNode->__pVertices[24] - pNode->__pVertices[0], pNode->__pVertices[25] - pNode->__pVertices[1]);
+                       pNode->__pVertices[15] - pNode->__pVertices[0], pNode->__pVertices[16] - pNode->__pVertices[1]);
 
        __bounds.Union(bounds);
 
@@ -573,9 +579,6 @@ _GlRenderManager::WakeUp(void)
 int
 _GlRenderManager::FindRenderObject(_GlNode* pNode, const _Matrix3Df& mvp, bool useStencil, unsigned int stencilIndex, bool colorMask)
 {
-       _Rectanglef bounds = _Rectanglef(pNode->__pVertices[0], pNode->__pVertices[1],
-                       pNode->__pVertices[24] - pNode->__pVertices[0], pNode->__pVertices[25] - pNode->__pVertices[1]);
-
        if (unlikely(__queueCount == 0))
        {
                return -1;
@@ -592,6 +595,9 @@ _GlRenderManager::FindRenderObject(_GlNode* pNode, const _Matrix3Df& mvp, bool u
                return -1;
        }
 
+       _Rectanglef bounds = _Rectanglef(pNode->__pVertices[0], pNode->__pVertices[1],
+                       pNode->__pVertices[15] - pNode->__pVertices[0], pNode->__pVertices[16] - pNode->__pVertices[1]);
+
        for (int index = __queueCount - 1; index >= 0; index--)
        {
                if (__pRenderQueue[index].__useBlend == pNode->__useBlend
@@ -667,24 +673,6 @@ _GlRenderManager::FlushRenderQueue(void)
                __needClear = false;
        }
 
-
-       // temp
-#if 0
-       if (pNode->__pShaderProgram)
-       {
-               __pGlContext->UseShaderProgram(pNode->__pShaderProgram);
-
-               glEnableVertexAttribArray(pNode->__pShaderProgram->GetAttribLocation("a_position"));
-               glEnableVertexAttribArray(pNode->__pShaderProgram->GetAttribLocation("a_color"));
-
-               uniformMVP = pNode->__pShaderProgram->GetUniformLocation("u_mvp");
-
-               glVertexAttribPointer(pNode->__pShaderProgram->GetAttribLocation("a_position"), 3, GL_FLOAT, GL_FALSE, 3 * sizeof(float), pMeshImpl->__pVertices);
-               glVertexAttribPointer(pNode->__pShaderProgram->GetAttribLocation("a_color"), 4, GL_FLOAT, GL_FALSE, 4 * sizeof(float), pMeshImpl->__pColors);
-       }
-#endif
-
-
        for (int i = 0; i < __queueCount; i++)
        {
                __pGlContext->UseShaderProgram(__pRenderQueue[i].__pProgram);
@@ -715,7 +703,6 @@ _GlRenderManager::FlushRenderQueue(void)
                        {
                                glEnableVertexAttribArray(__pRenderQueue[i].__aColor);
                                glVertexAttribPointer(__pRenderQueue[i].__aColor, 4, GL_FLOAT, GL_FALSE, 4 * sizeof(float), __pRenderQueue[i].__pColors);
-
                        }
                        else
                        {
@@ -909,8 +896,8 @@ _GlRenderManager::SetProgramInfo(_GlNode* pNode, const _Matrix3Df& viewport)
 
                        uniformMVP = __pTextureShader->GetMVPUniformLocation();
 
-                       glVertexAttribPointer(__pTextureShader->GetPositionAttributeLocation(), 3, GL_FLOAT, GL_FALSE, 8 * sizeof(float), &pNode->__pVertices[0]);
-                       glVertexAttribPointer(__pTextureShader->GetTextureCoordinatesAttributeLocation(), 2, GL_FLOAT, GL_FALSE, 8 * sizeof(float), &pNode->__pVertices[4]);
+                       glVertexAttribPointer(__pTextureShader->GetPositionAttributeLocation(), 3, GL_FLOAT, GL_FALSE, 5 * sizeof(float), &pNode->__pVertices[0]);
+                       glVertexAttribPointer(__pTextureShader->GetTextureCoordinatesAttributeLocation(), 2, GL_FLOAT, GL_FALSE, 5 * sizeof(float), &pNode->__pVertices[4]);
                }
                else
                {
@@ -918,8 +905,8 @@ _GlRenderManager::SetProgramInfo(_GlNode* pNode, const _Matrix3Df& viewport)
 
                        uniformMVP = __pTextureOpacityShader->GetMVPUniformLocation();
 
-                       glVertexAttribPointer(__pTextureOpacityShader->GetPositionAttributeLocation(), 3, GL_FLOAT, GL_FALSE, 8 * sizeof(float), &pNode->__pVertices[0]);
-                       glVertexAttribPointer(__pTextureOpacityShader->GetTextureCoordinatesAttributeLocation(), 2, GL_FLOAT, GL_FALSE, 8 * sizeof(float), &pNode->__pVertices[4]);
+                       glVertexAttribPointer(__pTextureOpacityShader->GetPositionAttributeLocation(), 3, GL_FLOAT, GL_FALSE, 5 * sizeof(float), &pNode->__pVertices[0]);
+                       glVertexAttribPointer(__pTextureOpacityShader->GetTextureCoordinatesAttributeLocation(), 2, GL_FLOAT, GL_FALSE, 5 * sizeof(float), &pNode->__pVertices[4]);
 
                        glUniform1f(__pTextureOpacityShader->GetOpacityUniformLocation(), pNode->__opacity);
                }
@@ -930,7 +917,7 @@ _GlRenderManager::SetProgramInfo(_GlNode* pNode, const _Matrix3Df& viewport)
 
                uniformMVP = __pUniformColorShader->GetMVPUniformLocation();
 
-               glVertexAttribPointer(__pUniformColorShader->GetPositionAttributeLocation(), 3, GL_FLOAT, GL_FALSE, 8 * sizeof(float), &pNode->__pVertices[0]);
+               glVertexAttribPointer(__pUniformColorShader->GetPositionAttributeLocation(), 3, GL_FLOAT, GL_FALSE, 5 * sizeof(float), &pNode->__pVertices[0]);
 
                glUniform4f(__pUniformColorShader->GetColorUniformLocation(), pNode->__objectColor.Red(), pNode->__objectColor.Green(), pNode->__objectColor.Blue(), pNode->__objectColor.Alpha());
        }
index 8fa2d58..6bc343e 100644 (file)
@@ -16,7 +16,7 @@
 //
 
 /**
- * @file       FUiAnim__GlRenderManager.h
+ * @file       FUiAnim_GlRenderManager.h
  * @brief      This is the header file for the _GlRenderManager class.
  *
  * This header file contains the declarations of the _GlRenderManager class.
diff --git a/src/ui/animations/FUiAnim_MeshInfo.cpp b/src/ui/animations/FUiAnim_MeshInfo.cpp
deleted file mode 100644 (file)
index 0685f54..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-
-#include "FGrpBitmap.h"
-#include "FUiAnimMesh.h"
-#include "FUiAnim_MeshInfo.h"
-#include "FUiAnim_GlRenderManager.h"
-#include "FUiAnim_VisualElementSurfaceManager.h"
-
-using namespace Tizen::Base;
-using namespace Tizen::Graphics;
-
-namespace Tizen { namespace Ui { namespace Animations{
-
-_MeshInfo::_MeshInfo()
-    : __pMesh(null)
-    , __pTexture(null)
-       , __pTextureInfo(null)
-{
-}
-
-_MeshInfo::_MeshInfo(const Tizen::Base::String& name, Mesh* pMesh)
-    : __pMesh(null)
-       , __pTextureInfo(null)
-{
-    SetName(name);
-    SetMesh(pMesh);
-}
-
-_MeshInfo::~_MeshInfo()
-{
-       if (__pMesh)
-    {
-        delete __pMesh;
-        __pMesh = null;
-    }
-    __pTexture = null;
-
-       if (__pTextureInfo)
-       {
-               _GlRenderManager::GetInstance()->DeleteTexture(__pTextureInfo);
-
-               delete __pTextureInfo;
-               __pTextureInfo = null;
-       }
-}
-
-void
-_MeshInfo::SetMesh(Mesh* pMesh)
-{
-       if (pMesh)
-    {
-        __pMesh = new (std::nothrow)Mesh(*pMesh);
-    }
-    else
-    {
-               if (__pMesh)
-        {
-            delete __pMesh;
-            __pMesh = null;
-        }
-    }
-}
-
-Mesh*
-_MeshInfo::GetMesh() const
-{
-    return __pMesh;
-}
-
-result
-_MeshInfo::SetTexture(Bitmap* pTexture)
-{
-#ifndef BUILD_UI_CORE
-    __pTexture = pTexture;
-
-       if (__pTexture)
-       {
-               if (!__pTextureInfo)
-               {
-                       __pTextureInfo = new (std::nothrow) TextureInfo;
-               }
-
-               BufferInfo bufferInfo;
-
-               __pTexture->Lock(bufferInfo);
-
-               __pTextureInfo->type = SURFACE_TYPE_STATIC;             // TODO: support dynamic texture
-               __pTextureInfo->width = bufferInfo.width;
-               __pTextureInfo->height = bufferInfo.height;
-               __pTextureInfo->stride = bufferInfo.pitch;
-               __pTextureInfo->bitsPerPixel = bufferInfo.bitsPerPixel;
-               __pTextureInfo->pPixels = (unsigned long*)bufferInfo.pPixels;
-
-               // TODO: check pGlContext info
-
-               __pTexture->Unlock();
-
-               _GlRenderManager::GetInstance()->CreateTexture(__pTextureInfo);
-       }
-       else
-       {
-               if (__pTextureInfo)
-               {
-                       _GlRenderManager::GetInstance()->DeleteTexture(__pTextureInfo);
-
-                       delete __pTextureInfo;
-                       __pTextureInfo = null;
-               }
-       }
-#endif
-
-       return E_SUCCESS;
-}
-
-Bitmap*
-_MeshInfo::GetTexture() const
-{
-    return __pTexture;
-}
-
-}}}//namespace Tizen { namespace Ui { namespace Animations{
index 3bb09f2..735cc73 100644 (file)
@@ -60,8 +60,6 @@
 
 //3D feature
 #include "FUiAnimMesh.h"
-#include "FUiAnim_MeshInfo.h"
-
 #include "FUiAnim_VisualElementSharedData.h"
 #include "FUiAnim_RootVisualElement.h"
 
@@ -7777,54 +7775,21 @@ _VisualElementImpl::SetBoundsChangedCallback(BoundsChangedCallback pCallback, vo
 result
 _VisualElementImpl::SetMesh(const Tizen::Base::String& name, Mesh* pMesh)
 {
-       if(pMesh)
-       {
-               return GetSharedData().geometry.AddMesh(name,pMesh);
-       }
-       else
-       {
-               return GetSharedData().geometry.RemoveMesh(name);
-       }
+       GetSharedData().geometry.SetMesh(pMesh);
+
+       return E_SUCCESS;
 }
 
 Mesh*
 _VisualElementImpl::GetMeshN(const String& name) const
 {
-       _MeshInfo* pInfo = GetSharedData().geometry.GetMeshInfo(name);
-       if(pInfo)
-       {
-               Mesh* pMesh = pInfo->GetMesh();
-               if(pMesh)
-               {
-                       return new (std::nothrow) Mesh(*pMesh);
-               }
-       }
-       return null;
-}
-
+       Mesh* pMesh = GetSharedData().geometry.GetMesh();
 
-result
-_VisualElementImpl::SetTexture(const String& meshName, Bitmap* pBitmap)
-{
-       SetSurfaceChanged();
-       if(pBitmap)
-       {
-               return GetSharedData().geometry.AddTexture(meshName, pBitmap);
-       }
-       else
+       if (pMesh)
        {
-               return GetSharedData().geometry.RemoveTexture(meshName);
+               return new (std::nothrow) Mesh(*pMesh);
        }
-}
 
-Bitmap*
-_VisualElementImpl::GetTexture(const String& meshName) const
-{
-       _MeshInfo* pInfo = GetSharedData().geometry.GetMeshInfo(meshName);
-       if(pInfo)
-       {
-               return pInfo->GetTexture();
-       }
        return null;
 }
 
index 7e661e5..5487fdf 100644 (file)
@@ -1,18 +1,41 @@
-#ifndef _FUI_ANIM_GEOMETRY_INFO_H_
-#define _FUI_ANIM_GEOMETRY_INFO_H_
+//
+// Open Service Platform
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     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,
+// 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.
+//
+
+/**
+ * @file       FUiAnim_GeometryInfo.h
+ * @brief      This is the header file for the _GeometryInfo class.
+ *
+ * This header file contains the declarations of the _GeometryInfo class.
+ */
+
+#ifndef _FUI_ANIM_INTERNAL_GEOMETRY_INFO_H_
+#define _FUI_ANIM_INTERNAL_GEOMETRY_INFO_H_
 
-#include <FOspConfig.h>
 #include <FBaseString.h>
-
 #include <FUiAnimVisualElementSurface.h>
 
 namespace Tizen { namespace Graphics {
 class Bitmap;
 }}
 
-namespace Tizen { namespace Ui { namespace Animations{
+namespace Tizen { namespace Ui { namespace Animations
+{
+
 class Mesh;
-class _MeshInfo;
 class ShaderProgram;
 
 class _GeometryInfo
@@ -20,21 +43,18 @@ class _GeometryInfo
 public:
     _GeometryInfo();
     virtual ~_GeometryInfo();
-    result AddMesh(const Tizen::Base::String& name, Mesh* pMesh);
-    result RemoveMesh(const Tizen::Base::String& name);
 
-    result AddTexture(const Tizen::Base::String& meshName, Tizen::Graphics::Bitmap* pTexture);
-    result RemoveTexture(const Tizen::Base::String& meshName);
-
-    _MeshInfo* GetMeshInfo(const Tizen::Base::String& name) const;
+       void SetMesh(Mesh* pMesh);
+       Mesh* GetMesh() const;
 
        result SetShaderProgram(ShaderProgram* pShaderProgram);
        ShaderProgram* GetShaderProgram(void);
 
 private:
-    _MeshInfo* __pMeshInfo;
+       Mesh* __pMesh;
        ShaderProgram* __pShaderProgram;
 };
 
-}}} //namespace Tizen { namespace Ui { namespace Animations{
-#endif // _FUI_ANIM_GEOMETRY_INFO_H_
+}}} //namespace Tizen { namespace Ui { namespace Animations
+
+#endif // _FUI_ANIM_INTERNAL_GEOMETRY_INFO_H_
diff --git a/src/ui/inc/FUiAnim_MeshInfo.h b/src/ui/inc/FUiAnim_MeshInfo.h
deleted file mode 100644 (file)
index f5232f9..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#ifndef FUIANIM_MESHINFO_H
-#define FUIANIM_MESHINFO_H
-
-#include <FOspConfig.h>
-#include <FBaseString.h>
-
-namespace Tizen { namespace Graphics {
-class Bitmap;
-}}
-
-namespace Tizen { namespace Ui { namespace Animations{
-
-class Mesh;
-struct TextureInfo;
-
-class _OSP_EXPORT_ _MeshInfo
-{
-public:
-    _MeshInfo();
-    _MeshInfo(const Tizen::Base::String& name, Mesh* pMesh);
-    virtual ~_MeshInfo();
-
-    void SetName(const Tizen::Base::String& name){__name = name;}
-
-    Tizen::Base::String GetName() const{return __name;}
-
-    void SetMesh(Mesh* pMesh);
-    Mesh* GetMesh() const;
-
-    result SetTexture(Tizen::Graphics::Bitmap* pTexture);
-    Tizen::Graphics::Bitmap* GetTexture() const;
-
-public:
-    Tizen::Base::String __name;
-    Mesh* __pMesh;
-    Tizen::Graphics::Bitmap* __pTexture;
-       TextureInfo* __pTextureInfo;
-};
-
-}}}//namespace Tizen { namespace Ui { namespace Animations{
-
-#endif // FUIANIM_MESHINFO_H
index 897a005..cc8c73f 100644 (file)
@@ -73,7 +73,6 @@ class IVisualElementEventListener;
 class _AnimationManager;
 class _IVisualElementCaptureProvider;
 class Mesh;
-class _MeshInfo;
 
 
 extern const wchar_t* VePropBounds;
@@ -838,9 +837,6 @@ public:
 
        result SetMesh(const Tizen::Base::String& name, Mesh* pMesh);
        Mesh* GetMeshN(const Tizen::Base::String& name) const;
-//     _MeshInfo* GetMeshInfo() const;
-       result SetTexture(const Tizen::Base::String& meshName, Tizen::Graphics::Bitmap* pBitmap);
-       Tizen::Graphics::Bitmap* GetTexture(const Tizen::Base::String& meshName) const;
 
        result SetShaderProgram(ShaderProgram* pShaderProgram);
        ShaderProgram* GetShaderProgram(void) const;