projects
/
platform
/
core
/
uifw
/
dali-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added memory pool logging
[platform/core/uifw/dali-core.git]
/
dali
/
public-api
/
images
/
pixel-data.cpp
diff --git
a/dali/public-api/images/pixel-data.cpp
b/dali/public-api/images/pixel-data.cpp
index
998dfb4
..
c05363a
100644
(file)
--- a/
dali/public-api/images/pixel-data.cpp
+++ b/
dali/public-api/images/pixel-data.cpp
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (c) 202
0
Samsung Electronics Co., Ltd.
+ * Copyright (c) 202
2
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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-23,45
+23,45
@@
namespace Dali
{
namespace Dali
{
-
-PixelData PixelData::New( uint8_t* buffer,
- uint32_t bufferSize,
- uint32_t width,
- uint32_t height,
- Pixel::Format pixelFormat,
- ReleaseFunction releaseFunction )
+PixelData PixelData::New(uint8_t* buffer,
+ uint32_t bufferSize,
+ uint32_t width,
+ uint32_t height,
+ Pixel::Format pixelFormat,
+ ReleaseFunction releaseFunction)
{
{
- IntrusivePtr<Internal::PixelData> internal = Internal::PixelData::New(
buffer, bufferSize, width, height, pixelFormat, releaseFunction
);
- return PixelData(
internal.Get()
);
+ IntrusivePtr<Internal::PixelData> internal = Internal::PixelData::New(
buffer, bufferSize, width, height, 0, pixelFormat, releaseFunction
);
+ return PixelData(
internal.Get()
);
}
}
-PixelData::PixelData()
+PixelData PixelData::New(uint8_t* buffer,
+ uint32_t bufferSize,
+ uint32_t width,
+ uint32_t height,
+ uint32_t stride,
+ Pixel::Format pixelFormat,
+ ReleaseFunction releaseFunction)
{
{
+ IntrusivePtr<Internal::PixelData> internal = Internal::PixelData::New(buffer, bufferSize, width, height, stride, pixelFormat, releaseFunction);
+ return PixelData(internal.Get());
}
}
-PixelData::~PixelData()
-{
-}
+PixelData::PixelData() = default;
-PixelData::PixelData( Internal::PixelData* internal )
-: BaseHandle( internal )
-{
-}
+PixelData::~PixelData() = default;
-PixelData::PixelData(
const PixelData& handle
)
-: BaseHandle(
handle
)
+PixelData::PixelData(
Internal::PixelData* internal
)
+: BaseHandle(
internal
)
{
}
{
}
-PixelData& PixelData::operator=(const PixelData& rhs)
-{
- BaseHandle::operator=(rhs);
- return *this;
-}
+PixelData::PixelData(const PixelData& handle) = default;
-PixelData
::PixelData( PixelData&& rhs
) = default;
+PixelData
& PixelData::operator=(const PixelData& rhs
) = default;
-PixelData& PixelData::operator=( PixelData&& rhs ) = default;
+PixelData::PixelData(PixelData&& rhs) = default;
+
+PixelData& PixelData::operator=(PixelData&& rhs) = default;
uint32_t PixelData::GetWidth() const
{
uint32_t PixelData::GetWidth() const
{
@@
-78,4
+78,14
@@
Pixel::Format PixelData::GetPixelFormat() const
return GetImplementation(*this).GetPixelFormat();
}
return GetImplementation(*this).GetPixelFormat();
}
+uint32_t PixelData::GetStride() const
+{
+ return GetImplementation(*this).GetStride();
+}
+
+uint32_t PixelData::GetTotalAllocatedSize()
+{
+ return Internal::PixelData::GetTotalAllocatedSize();
+}
+
} // namespace Dali
} // namespace Dali