From: Agnelo Vaz Date: Tue, 26 Jul 2016 10:48:44 +0000 (+0100) Subject: Updating visual comments and code ontaining "renderer" X-Git-Tag: dali_1.1.45~7 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=cc0aefb3259c6fe818d9949ebf768843cc01e6fd Updating visual comments and code ontaining "renderer" Reverting DebugVisual back to DebugRenderer Changing some parameters from renderer to visual Change-Id: I9a64930d79c57a3d684cebc0497846dba6d4c76c --- diff --git a/dali-toolkit/internal/visuals/border/border-visual.h b/dali-toolkit/internal/visuals/border/border-visual.h index b30f36a..d85ae95 100644 --- a/dali-toolkit/internal/visuals/border/border-visual.h +++ b/dali-toolkit/internal/visuals/border/border-visual.h @@ -34,7 +34,7 @@ namespace Internal { /** - * The renderer which renders a solid color to the control's quad border fixed to a specified size. + * The visual which renders a solid color to the control's quad border fixed to a specified size. * * The following properties are required for create a BorderRender * diff --git a/dali-toolkit/internal/visuals/color/color-visual.h b/dali-toolkit/internal/visuals/color/color-visual.h index bd05356..ea02a2d 100644 --- a/dali-toolkit/internal/visuals/color/color-visual.h +++ b/dali-toolkit/internal/visuals/color/color-visual.h @@ -31,7 +31,7 @@ namespace Internal { /** - * The renderer which renders a solid color to the control's quad + * The visual which renders a solid color to the control's quad * * The following properties are required for create a ColorRender * diff --git a/dali-toolkit/internal/visuals/debug/debug-visual.cpp b/dali-toolkit/internal/visuals/debug/debug-visual.cpp index 679bf3b..d7e3882 100644 --- a/dali-toolkit/internal/visuals/debug/debug-visual.cpp +++ b/dali-toolkit/internal/visuals/debug/debug-visual.cpp @@ -85,14 +85,14 @@ void DebugVisual::DoCreatePropertyMap( Property::Map& map ) const void DebugVisual::InitializeRenderer() { - mImpl->mRenderer = mFactoryCache.GetDebugVisual(); + mImpl->mRenderer = mFactoryCache.GetDebugRenderer(); if( !mImpl->mRenderer ) { Geometry geometry = CreateQuadWireframeGeometry(); Shader shader = Shader::New( VERTEX_SHADER, FRAGMENT_SHADER ); mImpl->mRenderer = Renderer::New( geometry, shader); - mFactoryCache.CacheDebugVisual( mImpl->mRenderer ); + mFactoryCache.CacheDebugRenderer( mImpl->mRenderer ); } } diff --git a/dali-toolkit/internal/visuals/debug/debug-visual.h b/dali-toolkit/internal/visuals/debug/debug-visual.h index 98afd14..e407583 100644 --- a/dali-toolkit/internal/visuals/debug/debug-visual.h +++ b/dali-toolkit/internal/visuals/debug/debug-visual.h @@ -31,7 +31,7 @@ namespace Internal { /** - * The renderer which renders a wireframe outline to the control's quad for debugging + * The visual which renders a wireframe outline to the control's quad for debugging * */ class DebugVisual: public Visual @@ -78,10 +78,10 @@ private: private: // Undefined - DebugVisual( const DebugVisual& debugRenderer ); + DebugVisual( const DebugVisual& debugVisual); // Undefined - DebugVisual& operator=( const DebugVisual& debugRenderer ); + DebugVisual& operator=( const DebugVisual& debugVisual ); }; diff --git a/dali-toolkit/internal/visuals/gradient/gradient-visual.h b/dali-toolkit/internal/visuals/gradient/gradient-visual.h index 6c82b57..6a6c60b 100644 --- a/dali-toolkit/internal/visuals/gradient/gradient-visual.h +++ b/dali-toolkit/internal/visuals/gradient/gradient-visual.h @@ -35,7 +35,7 @@ namespace Internal class Gradient; /** - * The renderer which renders smooth transition of colors to the control's quad. + * The visual which renders smooth transition of colors to the control's quad. * It supports two types of gradients: linear and radial. * * The following properties are essential for create a LINEAR GradientRender @@ -148,10 +148,10 @@ private: static void GetStopOffsets(const Property::Value* value, Vector& stopOffsets); // Undefined - GradientVisual( const GradientVisual& gradientRenderer ); + GradientVisual( const GradientVisual& gradientVisual ); // Undefined - GradientVisual& operator=( const GradientVisual& gradientRenderer ); + GradientVisual& operator=( const GradientVisual& gradientVisual ); private: diff --git a/dali-toolkit/internal/visuals/image/image-visual.cpp b/dali-toolkit/internal/visuals/image/image-visual.cpp index 6934c8e..569646f 100644 --- a/dali-toolkit/internal/visuals/image/image-visual.cpp +++ b/dali-toolkit/internal/visuals/image/image-visual.cpp @@ -352,7 +352,7 @@ Renderer ImageVisual::CreateRenderer() const // Renderer can't be shared between NativeImage and other image types. if( !mNativeFragmentShaderCode.empty() ) { - return CreateNativeImageVisual(); + return CreateNativeImageRenderer(); } if( !mImpl->mCustomShader ) @@ -386,7 +386,7 @@ Renderer ImageVisual::CreateRenderer() const return renderer; } -Renderer ImageVisual::CreateNativeImageVisual() const +Renderer ImageVisual::CreateNativeImageRenderer() const { Geometry geometry; Shader shader; diff --git a/dali-toolkit/internal/visuals/image/image-visual.h b/dali-toolkit/internal/visuals/image/image-visual.h index e55491f..1b9e84a 100644 --- a/dali-toolkit/internal/visuals/image/image-visual.h +++ b/dali-toolkit/internal/visuals/image/image-visual.h @@ -42,7 +42,7 @@ class ImageVisual; typedef IntrusivePtr< ImageVisual > ImageVisualPtr; /** - * The renderer which renders an image to the control's quad + * The visual which renders an image to the control's quad * * The following properties are optional * @@ -142,8 +142,8 @@ public: static Shader GetImageShader( VisualFactoryCache& factoryCache ); /** - * @brief Sets the image of this renderer to the resource at imageUrl - * The renderer will load the Image asynchronously when the associated actor is put on stage, and destroy the image when it is off stage + * @brief Sets the image of this visual to the resource at imageUrl + * The visual will load the Image asynchronously when the associated actor is put on stage, and destroy the image when it is off stage * * @param[in] actor The Actor the renderer is applied to if, empty if the renderer has not been applied to any Actor * @param[in] imageUrl The URL of the image resource to use @@ -158,7 +158,7 @@ public: Dali::SamplingMode::Type samplingMode = SamplingMode::BOX_THEN_LINEAR ); /** - * @brief Sets the image of this renderer to use + * @brief Sets the image to be rendered by this visual * * @param[in] actor The Actor the renderer is applied to if, empty if the renderer has not been applied to any Actor * @param[in] image The image to use @@ -200,7 +200,7 @@ private: * * @return Returns the created Dali::Renderer */ - Renderer CreateNativeImageVisual() const; + Renderer CreateNativeImageRenderer() const; /** * @brief Query whether resources requires to be loaded synchronously. diff --git a/dali-toolkit/internal/visuals/mesh/mesh-visual.cpp b/dali-toolkit/internal/visuals/mesh/mesh-visual.cpp index 638e1ff..e815ae1 100644 --- a/dali-toolkit/internal/visuals/mesh/mesh-visual.cpp +++ b/dali-toolkit/internal/visuals/mesh/mesh-visual.cpp @@ -474,7 +474,7 @@ void MeshVisual::SupplyEmptyGeometry() mShader = Shader::New( SIMPLE_VERTEX_SHADER, SIMPLE_FRAGMENT_SHADER ); mImpl->mRenderer = Renderer::New( mGeometry, mShader ); - DALI_LOG_ERROR( "Initialisation error in mesh renderer.\n" ); + DALI_LOG_ERROR( "Initialisation error in mesh visual.\n" ); } void MeshVisual::UpdateShaderUniforms() @@ -542,7 +542,7 @@ bool MeshVisual::CreateGeometry() return true; } - DALI_LOG_ERROR( "Failed to load geometry in mesh renderer.\n" ); + DALI_LOG_ERROR( "Failed to load geometry in mesh visual.\n" ); return false; } @@ -563,7 +563,7 @@ bool MeshVisual::LoadGeometry() return true; } - DALI_LOG_ERROR( "Failed to find object to load in mesh renderer.\n" ); + DALI_LOG_ERROR( "Failed to find object to load in mesh visual.\n" ); return false; } @@ -579,7 +579,7 @@ bool MeshVisual::LoadMaterial() return true; } - DALI_LOG_ERROR( "Failed to find texture set to load in mesh renderer.\n" ); + DALI_LOG_ERROR( "Failed to find texture set to load in mesh visual.\n" ); mUseTexture = false; return false; } @@ -609,7 +609,7 @@ bool MeshVisual::LoadTextures() } else { - DALI_LOG_ERROR( "Failed to load diffuse map texture in mesh renderer.\n"); + DALI_LOG_ERROR( "Failed to load diffuse map texture in mesh visual.\n"); return false; } } @@ -627,7 +627,7 @@ bool MeshVisual::LoadTextures() } else { - DALI_LOG_ERROR( "Failed to load normal map texture in mesh renderer.\n"); + DALI_LOG_ERROR( "Failed to load normal map texture in mesh visual.\n"); return false; } } @@ -645,7 +645,7 @@ bool MeshVisual::LoadTextures() } else { - DALI_LOG_ERROR( "Failed to load gloss map texture in mesh renderer.\n"); + DALI_LOG_ERROR( "Failed to load gloss map texture in mesh visual.\n"); return false; } } diff --git a/dali-toolkit/internal/visuals/mesh/mesh-visual.h b/dali-toolkit/internal/visuals/mesh/mesh-visual.h index 43e604e..972f24e 100644 --- a/dali-toolkit/internal/visuals/mesh/mesh-visual.h +++ b/dali-toolkit/internal/visuals/mesh/mesh-visual.h @@ -36,9 +36,9 @@ namespace Internal { /** - * The renderer which renders a 3D object to the control's quad + * The visual which renders a 3D object to the control's quad * - * The following Property::Map keys are required to create a MeshRender + * The following Property::Map keys are required to create a MeshVisual * * | %Property Name | Type | Representing | * |-----------------|-------------|-----------------------------------------------------------------------| @@ -116,7 +116,7 @@ public: private: - //Corresponds to the shader that will be used by the mesh renderer. + //Corresponds to the shader that will be used by the mesh visual. enum ShaderType { TEXTURELESS, @@ -125,13 +125,13 @@ private: }; /** - * @brief Provide an empty geometry for the renderer to use. + * @brief Provide an empty geometry for the visual to use. * @details For use in error cases where the initialisation has failed for varying reasons. */ void SupplyEmptyGeometry(); /** - * @brief Initialize the renderer with the geometry and shader from the cache, if not available, create and save to the cache for sharing. + * @brief Initialize the visual with the geometry and shader from the cache, if not available, create and save to the cache for sharing. */ void InitializeRenderer(); @@ -146,19 +146,19 @@ private: void UpdateShaderUniforms(); /** - * @brief Use the object URL stored in the renderer to load and create the geometry of the object. + * @brief Use the object URL stored in the mesh visual to load and create the geometry of the object. * @return Boolean of success of operation. */ bool CreateGeometry(); /** - * @brief Use the object URL stored in the renderer to load the geometry of the object. + * @brief Use the object URL stored in the visual to load the geometry of the object. * @return Boolean of success of operation. */ bool LoadGeometry(); /** - * @brief Use the material URL stored in the renderer to load the material of the object. + * @brief Use the material URL stored in the mesh visual to load the material of the object. * @return Boolean of success of operation. */ bool LoadMaterial(); @@ -172,10 +172,10 @@ private: private: // Undefined - MeshVisual( const MeshVisual& meshRenderer ); + MeshVisual( const MeshVisual& meshVisual ); // Undefined - MeshVisual& operator=( const MeshVisual& meshRenderer ); + MeshVisual& operator=( const MeshVisual& meshVisual ); private: diff --git a/dali-toolkit/internal/visuals/npatch/npatch-visual.h b/dali-toolkit/internal/visuals/npatch/npatch-visual.h index 7f74022..3a43277 100644 --- a/dali-toolkit/internal/visuals/npatch/npatch-visual.h +++ b/dali-toolkit/internal/visuals/npatch/npatch-visual.h @@ -39,7 +39,7 @@ namespace Internal { /** - * The renderer which renders an 9 patch image to the control's quad + * The visual which renders an 9 patch image to the control's quad * * The following properties are optional * @@ -107,8 +107,8 @@ protected: public: /** - * @brief Sets the 9 patch image of this renderer to the resource at imageUrl - * The renderer will load the image synchronously when the associated actor is put on stage, and destroy the image when it is off stage + * @brief Sets the 9 patch image of this visual to the resource at imageUrl + * The visual will load the image synchronously when the associated actor is put on stage, and destroy the image when it is off stage * * @param[in] imageUrl The URL to 9 patch image resource to use * @param[in] borderOnly A Flag to indicate if the image should omit the centre of the n-patch and only render the border @@ -116,7 +116,7 @@ public: void SetImage( const std::string& imageUrl, bool borderOnly = false ); /** - * @brief Sets the 9 patch image of this renderer to the 9 patch image + * @brief Sets the 9 patch image of this viusal to the 9 patch image * * @param[in] image The NinePatchImage to use * @param[in] borderOnly A Flag to indicate if the image should omit the centre of the n-patch and only render the border @@ -204,10 +204,10 @@ private: private: - NinePatchImage mImage; ///< The image to render if the renderer was set from an NinePatchImage, empty otherwise + NinePatchImage mImage; ///< The image to render if the visual was set from an NinePatchImage, empty otherwise Image mCroppedImage; - std::string mImageUrl; ///< The url to the image resource to render if the renderer was set from an image resource url, empty otherwise + std::string mImageUrl; ///< The url to the image resource to render if the visual was set from an image resource url, empty otherwise NinePatchImage::StretchRanges mStretchPixelsX; NinePatchImage::StretchRanges mStretchPixelsY; ImageDimensions mImageSize; diff --git a/dali-toolkit/internal/visuals/primitive/primitive-visual.h b/dali-toolkit/internal/visuals/primitive/primitive-visual.h index b655ee3..ecee880 100644 --- a/dali-toolkit/internal/visuals/primitive/primitive-visual.h +++ b/dali-toolkit/internal/visuals/primitive/primitive-visual.h @@ -58,7 +58,7 @@ namespace Internal { /** - * The renderer which renders a simple 3D shape to the control's quad + * The visual which renders a simple 3D shape to the control's quad * * The following properties are required to create a PrimitiveRender * @@ -83,7 +83,7 @@ namespace Internal * * Note: slices and stacks both have an upper limit of 255. * - * Finally, the following can be used to affect the renderer's shader + * Finally, the following can be used to affect the visual's shader * * | %Property Name | Type | Representing | * |-----------------|-------------|-----------------------------------------| diff --git a/dali-toolkit/internal/visuals/svg/svg-rasterize-thread.cpp b/dali-toolkit/internal/visuals/svg/svg-rasterize-thread.cpp index d328304..53cb7e3 100644 --- a/dali-toolkit/internal/visuals/svg/svg-rasterize-thread.cpp +++ b/dali-toolkit/internal/visuals/svg/svg-rasterize-thread.cpp @@ -144,7 +144,7 @@ RasterizingTaskPtr SvgRasterizeThread::NextCompletedTask() return nextTask; } -void SvgRasterizeThread::RemoveTask( SvgVisual* renderer ) +void SvgRasterizeThread::RemoveTask( SvgVisual* visual ) { // Lock while remove task from the queue ConditionalWait::ScopedLock lock( mConditionalWait ); @@ -152,7 +152,7 @@ void SvgRasterizeThread::RemoveTask( SvgVisual* renderer ) { for( std::vector< RasterizingTaskPtr >::iterator it = mRasterizeTasks.begin(), endIt = mRasterizeTasks.end(); it != endIt; ++it ) { - if( (*it) && (*it)->GetSvgVisual() == renderer ) + if( (*it) && (*it)->GetSvgVisual() == visual ) { mRasterizeTasks.erase( it ); break; diff --git a/dali-toolkit/internal/visuals/svg/svg-rasterize-thread.h b/dali-toolkit/internal/visuals/svg/svg-rasterize-thread.h index 1f426cb..46c6966 100644 --- a/dali-toolkit/internal/visuals/svg/svg-rasterize-thread.h +++ b/dali-toolkit/internal/visuals/svg/svg-rasterize-thread.h @@ -53,7 +53,7 @@ typedef IntrusivePtr< RasterizingTask > RasterizingTaskPtr; * 1. Created by SvgVisual in the main thread * 2. Queued in the worked thread waiting to be processed. * 3. If this task gets its turn to do the rasterization, it triggers main thread to apply the rasterized image to material then been deleted in main thread call back - * Or if this task is been removed ( new image/size set to the renderer or actor off stage) before its turn to be processed, it then been deleted in the worker thread. + * Or if this task is been removed ( new image/size set to the visual or actor off stage) before its turn to be processed, it then been deleted in the worker thread. */ class RasterizingTask : public RefObject { @@ -77,7 +77,7 @@ public: void Rasterize( NSVGrasterizer* rasterizer ); /** - * Get the svg renderer + * Get the svg visual */ SvgVisual* GetSvgVisual() const; @@ -138,13 +138,13 @@ public: RasterizingTaskPtr NextCompletedTask(); /** - * Remove the task with the given renderer from the waiting queue, called by main thread. + * Remove the task with the given visual from the waiting queue, called by main thread. * * Typically called when the actor is put off stage, so the renderer is not needed anymore. * - * @param[in] renderer The renderer pointer. + * @param[in] visual The visual pointer. */ - void RemoveTask( SvgVisual* renderer ); + void RemoveTask( SvgVisual* visual ); /** * Delete the parsed SVG image, called by main thread. diff --git a/dali-toolkit/internal/visuals/svg/svg-visual.h b/dali-toolkit/internal/visuals/svg/svg-visual.h index d674d2f..d6dfef5 100644 --- a/dali-toolkit/internal/visuals/svg/svg-visual.h +++ b/dali-toolkit/internal/visuals/svg/svg-visual.h @@ -34,7 +34,7 @@ namespace Internal { /** - * The renderer which renders a svg image + * The visual which renders a svg image * * The following property is essential * @@ -104,8 +104,8 @@ public: static bool IsSvgUrl( const std::string& url ); /** - * @brief Sets the svg image of this renderer to the resource at imageUrl - * The renderer will parse the svg image once it is set. + * @brief Sets the svg image of this visual to the resource at imageUrl + * The visual will parse the svg image once it is set. * And rasterize it into BufferImage synchronously when the associated actor is put on stage, and destroy the BufferImage when it is off stage * * @param[in] imageUrl The URL to svg resource to use @@ -113,7 +113,7 @@ public: void SetImage( const std::string& imageUrl, ImageDimensions size = ImageDimensions() ); /** - * @bried Apply the rasterized image to the renderer. + * @bried Apply the rasterized image to the visual. * * @param[in] rasterizedPixelData The pixel buffer with the rasterized pixels */ @@ -121,7 +121,7 @@ public: private: /** - * @bried Rasterize the svg with the given size, and add it to the renderer. + * @bried Rasterize the svg with the given size, and add it to the visual. * * @param[in] size The target size of the SVG rasterization. */ diff --git a/dali-toolkit/internal/visuals/visual-factory-cache.cpp b/dali-toolkit/internal/visuals/visual-factory-cache.cpp index 72245ed..6a233cf 100644 --- a/dali-toolkit/internal/visuals/visual-factory-cache.cpp +++ b/dali-toolkit/internal/visuals/visual-factory-cache.cpp @@ -143,14 +143,14 @@ bool VisualFactoryCache::CleanRendererCache( const std::string& key ) return false; } -void VisualFactoryCache::CacheDebugVisual( Renderer& renderer ) +void VisualFactoryCache::CacheDebugRenderer( Renderer& renderer ) { - mDebugVisual = renderer; + mDebugRenderer = renderer; } -Renderer VisualFactoryCache::GetDebugVisual() +Renderer VisualFactoryCache::GetDebugRenderer() { - return mDebugVisual; + return mDebugRenderer; } Geometry VisualFactoryCache::CreateQuadGeometry() diff --git a/dali-toolkit/internal/visuals/visual-factory-cache.h b/dali-toolkit/internal/visuals/visual-factory-cache.h index 46920c5..488be15 100644 --- a/dali-toolkit/internal/visuals/visual-factory-cache.h +++ b/dali-toolkit/internal/visuals/visual-factory-cache.h @@ -154,12 +154,12 @@ public: /** * @brief Cache the debug renderer */ - void CacheDebugVisual( Renderer& renderer ); + void CacheDebugRenderer( Renderer& renderer ); /** * @brief Request the debug renderer; */ - Renderer GetDebugVisual(); + Renderer GetDebugRenderer(); /** * Get the SVG rasterization thread. @@ -220,7 +220,7 @@ private: HashVector mRendererHashes; CachedRenderers mRenderers; - Renderer mDebugVisual; + Renderer mDebugRenderer; SvgRasterizeThread* mSvgRasterizeThread; };