END_TEST;
}
+
+int UtcTextureManagerGenerateHash(void)
+{
+ ToolkitTestApplication application;
+
+ TextureManager textureManager; // Create new texture manager
+
+ TestObserver observer;
+ std::string filename( "image.png" );
+ auto preMultiply = TextureManager::MultiplyOnLoad::LOAD_WITHOUT_MULTIPLY;
+ TextureManager::TextureId textureId = textureManager.RequestLoad(
+ filename,
+ ImageDimensions(),
+ FittingMode::SCALE_TO_FILL,
+ SamplingMode::BOX_THEN_LINEAR,
+ TextureManager::USE_ATLAS,
+ &observer,
+ true,
+ TextureManager::ReloadPolicy::CACHED,
+ preMultiply);
+
+ VisualUrl url = textureManager.GetVisualUrl( textureId );
+
+ DALI_TEST_EQUALS( url.GetUrl().compare( filename ), 0, TEST_LOCATION );
+
+ END_TEST;
+}
{
// Visual ready so update visual attached to this ImageView, following call to RelayoutRequest will use this visual.
mVisual = DevelControl::GetVisual( *this, Toolkit::ImageView::Property::IMAGE );
+ Toolkit::DevelControl::RequestLayout( *this );
}
///////////////////////////////////////////////////////////
// Show focus indicator
mIsFocusIndicatorEnabled = 1;
}
+ else
+ {
+ // Move the focus towards left
+ MoveFocus(Toolkit::Control::KeyboardFocus::LEFT);
+ }
- // Move the focus towards left
- MoveFocus(Toolkit::Control::KeyboardFocus::LEFT);
isFocusStartableKey = true;
}
else
// Show focus indicator
mIsFocusIndicatorEnabled = 1;
}
-
- // Move the focus towards right
- MoveFocus(Toolkit::Control::KeyboardFocus::RIGHT);
+ else
+ {
+ // Move the focus towards right
+ MoveFocus(Toolkit::Control::KeyboardFocus::RIGHT);
+ }
}
else
{
// Show focus indicator
mIsFocusIndicatorEnabled = 1;
}
+ else
+ {
+ // Move the focus towards up
+ MoveFocus(Toolkit::Control::KeyboardFocus::UP);
+ }
- // Move the focus towards up
- MoveFocus(Toolkit::Control::KeyboardFocus::UP);
isFocusStartableKey = true;
}
else if (keyName == "Down" && !isAccessibilityEnabled)
// Show focus indicator
mIsFocusIndicatorEnabled = 1;
}
+ else
+ {
+ // Move the focus towards down
+ MoveFocus(Toolkit::Control::KeyboardFocus::DOWN);
+ }
- // Move the focus towards down
- MoveFocus(Toolkit::Control::KeyboardFocus::DOWN);
isFocusStartableKey = true;
}
else if (keyName == "Prior" && !isAccessibilityEnabled)
// Show focus indicator
mIsFocusIndicatorEnabled = 1;
}
-
- // Move the focus towards the previous page
- MoveFocus(Toolkit::Control::KeyboardFocus::PAGE_UP);
+ else
+ {
+ // Move the focus towards the previous page
+ MoveFocus(Toolkit::Control::KeyboardFocus::PAGE_UP);
+ }
isFocusStartableKey = true;
}
// Show focus indicator
mIsFocusIndicatorEnabled = 1;
}
-
- // Move the focus towards the next page
- MoveFocus(Toolkit::Control::KeyboardFocus::PAGE_DOWN);
+ else
+ {
+ // Move the focus towards the next page
+ MoveFocus(Toolkit::Control::KeyboardFocus::PAGE_DOWN);
+ }
isFocusStartableKey = true;
}
int mNumColumns;
int mNumRows;
- int mHorizontalSpacing = 0;
- int mVerticalSpacing = 0;
- int mRequestedHorizontalSpacing;
int mRequestedColumnWidth;
int mRequestedNumColumns;
- int mRequestedNumRows;
};
} // namespace Internal
int xEnd;
int yTop;
int yBottom;
- int explictlyDefined;
Cell( int x1, int x2, int y1, int y2): xStart(x1), xEnd(x2), yTop(y1), yBottom(y2){};
};
//Register transform properties
mImpl->mTransform.RegisterUniforms( mImpl->mRenderer, Direction::LEFT_TO_RIGHT );
- if( IsPreMultipliedAlphaEnabled() )
- {
- EnablePreMultipliedAlpha( true );
- }
+ EnablePreMultipliedAlpha( IsPreMultipliedAlphaEnabled() );
}
void ImageVisual::CreateNativeImageRenderer( NativeImage& nativeImage )
mWrapModeV, textureObserver, atlasUploadObserver, atlasManager,
mOrientationCorrection, forceReload, preMultiplyOnLoad);
- if( textures && preMultiplyOnLoad == TextureManager::MultiplyOnLoad::MULTIPLY_ON_LOAD)
+ if( textures )
{
- EnablePreMultipliedAlpha( true );
+ EnablePreMultipliedAlpha( preMultiplyOnLoad == TextureManager::MultiplyOnLoad::MULTIPLY_ON_LOAD );
}
if( atlasing ) // Flag needs to be set before creating renderer
{
mImpl->mRenderer.RegisterProperty( ATLAS_RECT_UNIFORM_NAME, mAtlasRect );
}
- else if( preMultiplied )
- {
- EnablePreMultipliedAlpha( true );
- }
+
+ EnablePreMultipliedAlpha( preMultiplied );
actor.AddRenderer( mImpl->mRenderer );
// reset the weak handle so that the renderer only get added to actor once
mId = mLoader.Load( mImageUrl.GetUrl(), mBorder, preMultiplyOnLoad );
- if( preMultiplyOnLoad )
- {
- EnablePreMultipliedAlpha( true );
- }
+ EnablePreMultipliedAlpha( preMultiplyOnLoad );
}
if( ! mAuxiliaryPixelBuffer && mAuxiliaryUrl.IsValid() && mAuxiliaryUrl.IsLocalResource() )
{
// We are not including sizing information, but we still need an extra byte for atlasing.
hashTarget.resize( urlLength + 1u );
+
// Add the atlasing to the hash input.
- hashTarget[ urlLength ] = useAtlas;
+ switch( useAtlas )
+ {
+ case UseAtlas::NO_ATLAS:
+ {
+ hashTarget[ urlLength ] = 'f';
+ break;
+ }
+ case UseAtlas::USE_ATLAS:
+ {
+ hashTarget[ urlLength ] = 't';
+ break;
+ }
+ }
}
if( maskTextureId != INVALID_TEXTURE_ID )
const unsigned int TOOLKIT_MAJOR_VERSION = 1;
const unsigned int TOOLKIT_MINOR_VERSION = 3;
-const unsigned int TOOLKIT_MICRO_VERSION = 36;
+const unsigned int TOOLKIT_MICRO_VERSION = 37;
const char * const TOOLKIT_BUILD_DATE = __DATE__ " " __TIME__;
#ifdef DEBUG_ENABLED
Name: dali-toolkit
Summary: Dali 3D engine Toolkit
-Version: 1.3.36
+Version: 1.3.37
Release: 1
Group: System/Libraries
License: Apache-2.0 and BSD-3-Clause and MIT