Remove Unused Retention policy 67/224567/1
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Tue, 11 Feb 2020 12:47:03 +0000 (12:47 +0000)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Tue, 11 Feb 2020 12:47:03 +0000 (12:47 +0000)
Change-Id: I544a3dfb9773be32e1b63e766a3bf063d98c0e4d

automated-tests/src/dali/dali-test-suite-utils/test-application.cpp
automated-tests/src/dali/dali-test-suite-utils/test-application.h
automated-tests/src/dali/utc-Dali-FrameBuffer.cpp
automated-tests/src/dali/utc-Dali-Texture.cpp
dali/integration-api/core.cpp
dali/integration-api/core.h
dali/integration-api/resource-policies.h
dali/internal/common/core-impl.cpp
dali/internal/common/core-impl.h

index 44b4964..f5d670d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -26,7 +26,6 @@ TestApplication::TestApplication( uint32_t surfaceWidth,
                                   uint32_t surfaceHeight,
                                   uint32_t  horizontalDpi,
                                   uint32_t  verticalDpi,
-                                  ResourcePolicy::DataRetention policy,
                                   bool initialize )
 : mRenderSurface( NULL ),
   mCore( NULL ),
@@ -34,8 +33,7 @@ TestApplication::TestApplication( uint32_t surfaceWidth,
   mSurfaceHeight( surfaceHeight ),
   mFrame( 0u ),
   mDpi{ horizontalDpi, verticalDpi },
-  mLastVSyncTime(0u),
-  mDataRetentionPolicy( policy )
+  mLastVSyncTime(0u)
 {
   if( initialize )
   {
@@ -60,7 +58,6 @@ void TestApplication::CreateCore()
                                         mGlAbstraction,
                                         mGlSyncAbstraction,
                                         mGlContextHelperAbstraction,
-                                        mDataRetentionPolicy,
                                         Integration::RenderToFrameBuffer::FALSE,
                                         Integration::DepthBufferAvailable::TRUE,
                                         Integration::StencilBufferAvailable::TRUE );
index cc694df..2606a56 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TEST_APPLICATION_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -52,7 +52,6 @@ public:
                    uint32_t surfaceHeight = DEFAULT_SURFACE_HEIGHT,
                    uint32_t horizontalDpi = DEFAULT_HORIZONTAL_DPI,
                    uint32_t verticalDpi   = DEFAULT_VERTICAL_DPI,
-                   ResourcePolicy::DataRetention policy = ResourcePolicy::DALI_DISCARDS_ALL_DATA,
                    bool initialize = true );
 
   void Initialize();
@@ -110,7 +109,6 @@ protected:
 
   struct { uint32_t x; uint32_t y; } mDpi;
   uint32_t mLastVSyncTime;
-  ResourcePolicy::DataRetention mDataRetentionPolicy;
   static bool mLoggingEnabled;
 };
 
index 5a9a0fc..e19e645 100644 (file)
@@ -468,7 +468,7 @@ int UtcDaliFrameBufferGetColorTexture04(void)
 int UtcDaliFramebufferContextLoss(void)
 {
   tet_infoline("UtcDaliFramebufferContextLoss\n");
-  TestApplication application; // Default config: DALI_DISCARDS_ALL_DATA
+  TestApplication application;
 
   //Create the texture
   unsigned int width(64);
index 7b2152b..0222064 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -720,7 +720,7 @@ int UtcDaliTextureGetHeight(void)
 int UtcDaliTextureContextLoss(void)
 {
   tet_infoline("UtcDaliTextureContextLoss\n");
-  TestApplication application; // Default config: DALI_DISCARDS_ALL_DATA
+  TestApplication application;
 
   //Create the texture
   unsigned int width(64);
index d154574..30e1cba 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -40,7 +40,6 @@ Core* Core::New( RenderController& renderController,
                  GlAbstraction& glAbstraction,
                  GlSyncAbstraction& glSyncAbstraction,
                  GlContextHelperAbstraction& glContextHelperAbstraction,
-                 ResourcePolicy::DataRetention policy,
                  RenderToFrameBuffer renderToFboEnabled,
                  DepthBufferAvailable depthBufferAvailable,
                  StencilBufferAvailable stencilBufferAvailable )
@@ -51,7 +50,6 @@ Core* Core::New( RenderController& renderController,
                                         glAbstraction,
                                         glSyncAbstraction,
                                         glContextHelperAbstraction,
-                                        policy,
                                         renderToFboEnabled,
                                         depthBufferAvailable,
                                         stencilBufferAvailable );
index e7644af..e242cfe 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTEGRATION_CORE_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -25,7 +25,6 @@
 #include <dali/public-api/common/dali-common.h>
 #include <dali/integration-api/context-notifier.h>
 #include <dali/integration-api/core-enumerations.h>
-#include <dali/integration-api/resource-policies.h>
 
 namespace Dali
 {
@@ -226,9 +225,6 @@ public:
    * @param[in] glAbstraction The interface providing OpenGL services.
    * @param[in] glSyncAbstraction The interface providing OpenGL sync objects.
    * @param[in] glContextHelperAbstraction The interface providing OpenGL context helper objects.
-   * @param[in] policy The data retention policy. This depends on application setting
-   * and platform support. Dali should honour this policy when deciding to discard
-   * intermediate resource data.
    * @param[in] renderToFboEnabled Whether rendering into the Frame Buffer Object is enabled.
    * @param[in] depthBufferAvailable Whether the depth buffer is available
    * @param[in] stencilBufferAvailable Whether the stencil buffer is available
@@ -239,7 +235,6 @@ public:
                     GlAbstraction& glAbstraction,
                     GlSyncAbstraction& glSyncAbstraction,
                     GlContextHelperAbstraction& glContextHelperAbstraction,
-                    ResourcePolicy::DataRetention policy,
                     RenderToFrameBuffer renderToFboEnabled,
                     DepthBufferAvailable depthBufferAvailable,
                     StencilBufferAvailable stencilBufferAvailable );
index 65c936a..c9e864a 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTEGRATION_RESOURCE_POLICIES_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -23,15 +23,6 @@ namespace ResourcePolicy
 {
 
 /**
- * The data retention policy describes how dali should retain resource data.
- */
-enum DataRetention
-{
-  DALI_RETAINS_ALL_DATA,  // retains all data e.g. bitmaps
-  DALI_DISCARDS_ALL_DATA, // discards all data (expects application to regenerate UI on context loss)
-};
-
-/**
  * The discardable policy determines if a resource can be discarded.
  * Discarded means that it can be released after uploading to GPU.
  */
index b78b515..ac0c500 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -86,7 +86,6 @@ Core::Core( RenderController& renderController,
             GlAbstraction& glAbstraction,
             GlSyncAbstraction& glSyncAbstraction,
             GlContextHelperAbstraction& glContextHelperAbstraction,
-            ResourcePolicy::DataRetention dataRetentionPolicy,
             Integration::RenderToFrameBuffer renderToFboEnabled,
             Integration::DepthBufferAvailable depthBufferAvailable,
             Integration::StencilBufferAvailable stencilBufferAvailable )
index 4f137a5..ba38092 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_CORE_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -85,7 +85,6 @@ public:
         Integration::GlAbstraction& glAbstraction,
         Integration::GlSyncAbstraction& glSyncAbstraction,
         Integration::GlContextHelperAbstraction& glContextHelperAbstraction,
-        ResourcePolicy::DataRetention dataRetentionPolicy,
         Integration::RenderToFrameBuffer renderToFboEnabled,
         Integration::DepthBufferAvailable depthBufferAvailable,
         Integration::StencilBufferAvailable stencilBufferAvailable );