From: Heeyong Song Date: Tue, 9 Jun 2020 01:27:08 +0000 (+0000) Subject: Merge "(Vector) Ensure that all animation data is applied at once" into devel/master X-Git-Tag: dali_1.9.16~4 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=e4eaa88f3c16c436082b8811984c6dfcefa0a848;hp=65fe4d97a7a58199b2f5ad2d84e26acbb2b6ae39 Merge "(Vector) Ensure that all animation data is applied at once" into devel/master --- diff --git a/automated-tests/src/dali-toolkit/utc-Dali-VisualFactory.cpp b/automated-tests/src/dali-toolkit/utc-Dali-VisualFactory.cpp index a2e3f03..d917895 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-VisualFactory.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-VisualFactory.cpp @@ -831,18 +831,6 @@ int UtcDaliVisualFactoryGetNPatchVisual4(void) textureTrace.Reset(); - ResourceImage image = ResourceImage::New( TEST_9_PATCH_FILE_NAME ); - Visual::Base nPatchVisual = factory.CreateVisual( image ); - - DummyControl actor1 = DummyControl::New(true); - TestVisualRender( application, actor1, nPatchVisual ); - - DALI_TEST_EQUALS( textureTrace.CountMethod("BindTexture"), 0, TEST_LOCATION ); // The same texture should be used with the first visual. - - naturalSize = Vector2( 0.0f, 0.0f ); - nPatchVisual.GetNaturalSize( naturalSize ); - DALI_TEST_EQUALS( naturalSize, Vector2( imageSize.GetWidth() - 2.0f, imageSize.GetHeight() - 2.0f ), TEST_LOCATION ); - END_TEST; } diff --git a/dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.cpp b/dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.cpp index ed72527..2f0c692 100644 --- a/dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 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. @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/dali-toolkit/internal/text/shaper.cpp b/dali-toolkit/internal/text/shaper.cpp old mode 100644 new mode 100755 index 593e1e5..de41d0e --- a/dali-toolkit/internal/text/shaper.cpp +++ b/dali-toolkit/internal/text/shaper.cpp @@ -117,8 +117,8 @@ void ShapeText( const Vector& text, const Length currentNumberOfGlyphs = glyphs.Count(); const Length numberOfGlyphsReserved = static_cast( numberOfCharacters * 1.3f ); - glyphs.Resize( currentNumberOfGlyphs + numberOfGlyphsReserved, glyphInfo ); - glyphToCharacterMap.Resize( currentNumberOfGlyphs + numberOfGlyphsReserved ); + glyphs.Reserve( currentNumberOfGlyphs + numberOfGlyphsReserved ); + glyphToCharacterMap.Reserve( currentNumberOfGlyphs + numberOfGlyphsReserved ); // The actual number of glyphs. Length totalNumberOfGlyphs = currentNumberOfGlyphs; diff --git a/dali-toolkit/internal/visuals/npatch/npatch-visual.cpp b/dali-toolkit/internal/visuals/npatch/npatch-visual.cpp index 873eeca..c4dc4df 100755 --- a/dali-toolkit/internal/visuals/npatch/npatch-visual.cpp +++ b/dali-toolkit/internal/visuals/npatch/npatch-visual.cpp @@ -275,14 +275,6 @@ NPatchVisualPtr NPatchVisual::New( VisualFactoryCache& factoryCache, const Visua return nPatchVisual; } -NPatchVisualPtr NPatchVisual::New( VisualFactoryCache& factoryCache, NinePatchImage image ) -{ - NPatchVisualPtr nPatchVisual( new NPatchVisual( factoryCache ) ); - VisualUrl visualUrl( image.GetUrl() ); - nPatchVisual->mImageUrl = visualUrl; - return nPatchVisual; -} - void NPatchVisual::LoadImages() { TextureManager& textureManager = mFactoryCache.GetTextureManager(); diff --git a/dali-toolkit/internal/visuals/npatch/npatch-visual.h b/dali-toolkit/internal/visuals/npatch/npatch-visual.h index 7816e84..4a82cfb 100644 --- a/dali-toolkit/internal/visuals/npatch/npatch-visual.h +++ b/dali-toolkit/internal/visuals/npatch/npatch-visual.h @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -85,14 +84,6 @@ public: */ static NPatchVisualPtr New( VisualFactoryCache& factoryCache, const VisualUrl& imageUrl ); - /** - * @brief Create an N-patch visual with a NinePatchImage resource. - * - * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object - * @param[in] image The NinePatchImage to use - */ - static NPatchVisualPtr New( VisualFactoryCache& factoryCache, NinePatchImage image ); - public: // from Visual /** diff --git a/dali-toolkit/internal/visuals/visual-factory-impl.cpp b/dali-toolkit/internal/visuals/visual-factory-impl.cpp index dc35220..d3be0b4 100644 --- a/dali-toolkit/internal/visuals/visual-factory-impl.cpp +++ b/dali-toolkit/internal/visuals/visual-factory-impl.cpp @@ -320,15 +320,7 @@ Toolkit::Visual::Base VisualFactory::CreateVisual( const Image& image ) if( image ) { - NinePatchImage npatchImage = NinePatchImage::DownCast( image ); - if( npatchImage ) - { - visualPtr = NPatchVisual::New( GetFactoryCache(), npatchImage ); - } - else - { - visualPtr = ImageVisual::New(GetFactoryCache(), GetImageVisualShaderFactory(), image ); - } + visualPtr = ImageVisual::New(GetFactoryCache(), GetImageVisualShaderFactory(), image ); } if( mDebugEnabled ) diff --git a/dali-toolkit/public-api/image-loader/image.cpp b/dali-toolkit/public-api/image-loader/image.cpp index 2645c07..0b26173 100644 --- a/dali-toolkit/public-api/image-loader/image.cpp +++ b/dali-toolkit/public-api/image-loader/image.cpp @@ -39,7 +39,7 @@ std::string GenerateUrl( Dali::FrameBuffer frameBuffer, Pixel::Format pixelForma return Dali::Toolkit::TextureManager::AddTexture( texture ); } -std::string GenerateUrl( const Dali::FrameBuffer frameBuffer, const uint8_t index ) +std::string GenerateUrl( const Dali::FrameBuffer frameBuffer, uint8_t index ) { Texture texture = Dali::DevelFrameBuffer::GetColorTexture( frameBuffer, index ); return Dali::Toolkit::TextureManager::AddTexture( texture ); @@ -58,7 +58,7 @@ std::string GenerateUrl( const Dali::NativeImageSourcePtr nativeImageSource ) return Dali::Toolkit::TextureManager::AddTexture( texture ); } -} // TextureManager +} // Image } // Toolkit diff --git a/dali-toolkit/public-api/image-loader/image.h b/dali-toolkit/public-api/image-loader/image.h index 7d27215..1cf2550 100644 --- a/dali-toolkit/public-api/image-loader/image.h +++ b/dali-toolkit/public-api/image-loader/image.h @@ -1,5 +1,5 @@ -#ifndef DALI_TOOLKIT_DEVEL_API_IMAGE_MANAGER_H -#define DALI_TOOLKIT_DEVEL_API_IMAGE_MANAGER_H +#ifndef DALI_TOOLKIT_IMAGE_H +#define DALI_TOOLKIT_IMAGE_H /* * Copyright (c) 2020 Samsung Electronics Co., Ltd. @@ -60,7 +60,7 @@ DALI_TOOLKIT_API std::string GenerateUrl( const Dali::FrameBuffer frameBuffer, P * @param[in] index the index of the attached color texture. * @return the Url string representing this frame buffer */ -DALI_TOOLKIT_API std::string GenerateUrl( const Dali::FrameBuffer frameBuffer, const uint8_t index ); +DALI_TOOLKIT_API std::string GenerateUrl( const Dali::FrameBuffer frameBuffer, uint8_t index ); /** * @brief Generate a Url from Pixel data. @@ -80,10 +80,10 @@ DALI_TOOLKIT_API std::string GenerateUrl( const Dali::PixelData pixelData ); */ DALI_TOOLKIT_API std::string GenerateUrl( const Dali::NativeImageSourcePtr nativeImageSource ); -} // ImageUtil +} // Image } // Toolkit } // Dali -#endif // DALI_TOOLKIT_DEVEL_API_IMAGE_MANAGER_H +#endif // DALI_TOOLKIT_IMAGE_H