From 3b1dbdc4b4cdbfbdfb558aa53eca064bb97bdb32 Mon Sep 17 00:00:00 2001 From: Adeel Kazmi Date: Tue, 11 Feb 2020 12:47:03 +0000 Subject: [PATCH] Remove Unused Retention policy Change-Id: I544a3dfb9773be32e1b63e766a3bf063d98c0e4d --- .../src/dali/dali-test-suite-utils/test-application.cpp | 7 ++----- .../src/dali/dali-test-suite-utils/test-application.h | 4 +--- automated-tests/src/dali/utc-Dali-FrameBuffer.cpp | 2 +- automated-tests/src/dali/utc-Dali-Texture.cpp | 4 ++-- dali/integration-api/core.cpp | 4 +--- dali/integration-api/core.h | 7 +------ dali/integration-api/resource-policies.h | 11 +---------- dali/internal/common/core-impl.cpp | 3 +-- dali/internal/common/core-impl.h | 3 +-- 9 files changed, 11 insertions(+), 34 deletions(-) diff --git a/automated-tests/src/dali/dali-test-suite-utils/test-application.cpp b/automated-tests/src/dali/dali-test-suite-utils/test-application.cpp index 44b4964..f5d670d 100644 --- a/automated-tests/src/dali/dali-test-suite-utils/test-application.cpp +++ b/automated-tests/src/dali/dali-test-suite-utils/test-application.cpp @@ -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 ); diff --git a/automated-tests/src/dali/dali-test-suite-utils/test-application.h b/automated-tests/src/dali/dali-test-suite-utils/test-application.h index cc694df..2606a56 100644 --- a/automated-tests/src/dali/dali-test-suite-utils/test-application.h +++ b/automated-tests/src/dali/dali-test-suite-utils/test-application.h @@ -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; }; diff --git a/automated-tests/src/dali/utc-Dali-FrameBuffer.cpp b/automated-tests/src/dali/utc-Dali-FrameBuffer.cpp index 5a9a0fc..e19e645 100644 --- a/automated-tests/src/dali/utc-Dali-FrameBuffer.cpp +++ b/automated-tests/src/dali/utc-Dali-FrameBuffer.cpp @@ -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); diff --git a/automated-tests/src/dali/utc-Dali-Texture.cpp b/automated-tests/src/dali/utc-Dali-Texture.cpp index 7b2152b..0222064 100644 --- a/automated-tests/src/dali/utc-Dali-Texture.cpp +++ b/automated-tests/src/dali/utc-Dali-Texture.cpp @@ -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); diff --git a/dali/integration-api/core.cpp b/dali/integration-api/core.cpp index d154574..30e1cba 100644 --- a/dali/integration-api/core.cpp +++ b/dali/integration-api/core.cpp @@ -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 ); diff --git a/dali/integration-api/core.h b/dali/integration-api/core.h index e7644af..e242cfe 100644 --- a/dali/integration-api/core.h +++ b/dali/integration-api/core.h @@ -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 #include #include -#include 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 ); diff --git a/dali/integration-api/resource-policies.h b/dali/integration-api/resource-policies.h index 65c936a..c9e864a 100644 --- a/dali/integration-api/resource-policies.h +++ b/dali/integration-api/resource-policies.h @@ -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. */ diff --git a/dali/internal/common/core-impl.cpp b/dali/internal/common/core-impl.cpp index b78b515..ac0c500 100644 --- a/dali/internal/common/core-impl.cpp +++ b/dali/internal/common/core-impl.cpp @@ -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 ) diff --git a/dali/internal/common/core-impl.h b/dali/internal/common/core-impl.h index 4f137a5..ba38092 100644 --- a/dali/internal/common/core-impl.h +++ b/dali/internal/common/core-impl.h @@ -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 ); -- 2.7.4