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
[Tizen] Implement partial update
[platform/core/uifw/dali-core.git]
/
dali
/
internal
/
common
/
image-attributes.cpp
diff --git
a/dali/internal/common/image-attributes.cpp
b/dali/internal/common/image-attributes.cpp
old mode 100644
(file)
new mode 100755
(executable)
index
134debc
..
9adf588
--- a/
dali/internal/common/image-attributes.cpp
+++ b/
dali/internal/common/image-attributes.cpp
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (c) 201
4
Samsung Electronics Co., Ltd.
+ * Copyright (c) 201
8
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.
@@
-67,12
+67,11
@@
struct ImageAttributes::ImageAttributesImpl
return *this;
}
return *this;
}
- u
nsigned int width : 16
; ///< image width in pixels
- u
nsigned int height : 16
; ///< image height in pixels
+ u
int16_t width
; ///< image width in pixels
+ u
int16_t height
; ///< image height in pixels
ScalingMode scaling : 3; ///< scaling option, ShrinkToFit is default
ScalingMode scaling : 3; ///< scaling option, ShrinkToFit is default
- FilterMode filtering :
3
; ///< filtering option. Box is the default
+ FilterMode filtering :
4
; ///< filtering option. Box is the default
bool mOrientationCorrection : 1; ///< If true, image pixels are reordered according to orientation metadata on load.
bool mOrientationCorrection : 1; ///< If true, image pixels are reordered according to orientation metadata on load.
- bool isDistanceField : 1; ///< true, if the image is a distancefield. Default is false.
};
};
@@
-98,16
+97,16
@@
ImageAttributes::~ImageAttributes()
delete impl;
}
delete impl;
}
-void ImageAttributes::SetSize(u
nsigned int width, unsigned in
t height)
+void ImageAttributes::SetSize(u
int32_t width, uint32_
t height)
{
{
- impl->width =
width;
- impl->height =
height;
+ impl->width =
static_cast<uint16_t>( width ); // truncated
+ impl->height =
static_cast<uint16_t>( height ); // truncated
}
void ImageAttributes::SetSize( const Size& size )
{
}
void ImageAttributes::SetSize( const Size& size )
{
- impl->width = s
ize.width;
- impl->height = s
ize.height;
+ impl->width = s
tatic_cast<uint16_t>( size.width ); // truncated
+ impl->height = s
tatic_cast<uint16_t>( size.height ); // truncated
}
void ImageAttributes::SetScalingMode( ScalingMode scale )
}
void ImageAttributes::SetScalingMode( ScalingMode scale )
@@
-134,12
+133,12
@@
void ImageAttributes::Reset( ImageDimensions dimensions, ScalingMode scaling, Fi
impl->mOrientationCorrection = orientationCorrection;
}
impl->mOrientationCorrection = orientationCorrection;
}
-u
nsigned in
t ImageAttributes::GetWidth() const
+u
int32_
t ImageAttributes::GetWidth() const
{
return impl->width;
}
{
return impl->width;
}
-u
nsigned in
t ImageAttributes::GetHeight() const
+u
int32_
t ImageAttributes::GetHeight() const
{
return impl->height;
}
{
return impl->height;
}
@@
-169,14
+168,6
@@
ImageAttributes ImageAttributes::New()
return ImageAttributes();
}
return ImageAttributes();
}
-ImageAttributes ImageAttributes::New(unsigned int imageWidth, unsigned int imageHeight)
-{
- ImageAttributes attributes;
- attributes.impl->width = imageWidth;
- attributes.impl->height = imageHeight;
- return attributes;
-}
-
/**
* Less then comparison operator.
* @param [in] a parameter tested
/**
* Less then comparison operator.
* @param [in] a parameter tested
@@
-184,12
+175,6
@@
ImageAttributes ImageAttributes::New(unsigned int imageWidth, unsigned int image
*/
bool operator<(const ImageAttributes& a, const ImageAttributes& b)
{
*/
bool operator<(const ImageAttributes& a, const ImageAttributes& b)
{
- // Bail out if one is distance field and the other is not.
- if (a.impl->isDistanceField != b.impl->isDistanceField)
- {
- return a.impl->isDistanceField < b.impl->isDistanceField;
- }
-
if (a.impl->width != b.impl->width)
{
return a.impl->width < b.impl->width;
if (a.impl->width != b.impl->width)
{
return a.impl->width < b.impl->width;