X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fintegration-api%2Fplatform-abstraction.h;h=7a41087c3c2a62a45a6521ed572285e1abfe4790;hb=9822303ce87b5133249686ab49f72d2f354fe932;hp=ad795827567916e9290f580d64cbf0ada7ac8043;hpb=4dc37629dd59d48e00bf17496ba0b76fe137af0c;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/integration-api/platform-abstraction.h b/dali/integration-api/platform-abstraction.h index ad79582..7a41087 100644 --- a/dali/integration-api/platform-abstraction.h +++ b/dali/integration-api/platform-abstraction.h @@ -2,7 +2,7 @@ #define __DALI_INTEGRATION_PLATFORM_ABSTRACTION_H__ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -30,7 +30,7 @@ namespace Dali namespace Integration { - +typedef unsigned int ResourceId; typedef IntrusivePtr ResourcePointer; /** @@ -42,11 +42,6 @@ class PlatformAbstraction { public: - /** - * Virtual destructor. - */ - virtual ~PlatformAbstraction() {} - // Resource Loading /** @@ -94,8 +89,8 @@ public: bool orientationCorrection = true) = 0; /** - * Request a resource from the native filesystem. This is a synchronous request, i.e. - * it will block the main loop whilst executing. It should therefore be used sparingly. + * Request an image from the native filesystem. This is a synchronous request, i.e. + * it will block the main loop whilst executing. * * Multi-threading note: this method will be called from the main thread only i.e. not * from within the Core::Render() method. @@ -103,7 +98,7 @@ public: * @param[in] resourcePath The path to the resource * @return A pointer to a ref-counted resource */ - virtual ResourcePointer LoadResourceSynchronously( const ResourceType& resourceType, const std::string& resourcePath ) = 0; + virtual ResourcePointer LoadImageSynchronously( const BitmapResourceType& resourceType, const std::string& resourcePath ) = 0; /** * Decode a buffer of data synchronously. @@ -113,7 +108,7 @@ public: * * @return A pointer to the decoded buffer. */ - virtual BitmapPtr DecodeBuffer( const ResourceType& resourceType, uint8_t * buffer, size_t bufferSize ) = 0; + virtual BitmapPtr DecodeBuffer( const BitmapResourceType& resourceType, uint8_t * buffer, size_t bufferSize ) = 0; /** * Load a shader binary file into a buffer @@ -132,6 +127,13 @@ public: */ virtual bool SaveShaderBinaryFile( const std::string& filename, const unsigned char * buffer, unsigned int numBytes ) const = 0; +protected: + + /** + * Virtual destructor. + */ + virtual ~PlatformAbstraction() {} + }; // class PlatformAbstraction } // namespace Integration