X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fpublic-api%2Fimages%2Fpixel-data.h;h=b7778d5fd042a764c39f86e21828bfb789c34901;hb=53a534bebeb0f32519aa030f65d037f858b974e7;hp=03fefc6e0300511f1ad055018944fbf4562b4070;hpb=9743f710ac63398e62a0a8f0f096eabd1f853bf5;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/public-api/images/pixel-data.h b/dali/public-api/images/pixel-data.h index 03fefc6..b7778d5 100644 --- a/dali/public-api/images/pixel-data.h +++ b/dali/public-api/images/pixel-data.h @@ -2,7 +2,7 @@ #define DALI_PIXEL_DATA_H /* - * Copyright (c) 2020 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 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. @@ -77,6 +77,26 @@ public: ReleaseFunction releaseFunction); /** + * @brief Creates a PixelData object. + * + * @SINCE_2_1.10 + * @param[in] buffer The raw pixel data + * @param[in] bufferSize The size of the buffer in bytes + * @param[in] width Buffer width in pixels + * @param[in] height Buffer height in pixels + * @param[in] stride Buffer stride in pixels, 0 means the buffer is tightly packed + * @param[in] pixelFormat The pixel format + * @param[in] releaseFunction The function used to release the memory + * @return A handle to the PixelData + */ + static PixelData New(uint8_t* buffer, + uint32_t bufferSize, + uint32_t width, + uint32_t height, + uint32_t stride, + Pixel::Format pixelFormat, + ReleaseFunction releaseFunction); + /** * @brief Creates an empty handle. * Use PixelData::New() to create an initialized object. * @@ -149,6 +169,14 @@ public: */ Pixel::Format GetPixelFormat() const; + /** + * @brief Gets the stride of the buffer in pixels. + * + * @SINCE_2_1.10 + * @return The stride of the buffer in pixels. 0 means the buffer is tightly packed. + */ + uint32_t GetStride() const; + public: /** * @brief The constructor.