From d1eda6a7602b8b6d330a91904768c68d3d0cdbae Mon Sep 17 00:00:00 2001 From: Richard Huang Date: Mon, 13 Jul 2015 14:40:21 +0100 Subject: [PATCH] Change DrawMode::OVERLAY to DrawMode::OVERLAY_2D Change-Id: If2392f95fa4d7ec2e3605d91e6aa9088b48b3104 --- automated-tests/src/dali-devel/utc-Dali-Scripting.cpp | 2 +- automated-tests/src/dali/utc-Dali-Actor.cpp | 10 +++++----- dali/devel-api/scripting/scripting.cpp | 2 +- dali/internal/event/actors/actor-impl.cpp | 6 +++--- dali/internal/update/manager/process-render-tasks.cpp | 2 +- dali/internal/update/manager/update-algorithms.cpp | 2 +- dali/public-api/actors/actor.h | 6 +++--- dali/public-api/actors/draw-mode.h | 6 +++--- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/automated-tests/src/dali-devel/utc-Dali-Scripting.cpp b/automated-tests/src/dali-devel/utc-Dali-Scripting.cpp index 60f90d3..e001a89 100644 --- a/automated-tests/src/dali-devel/utc-Dali-Scripting.cpp +++ b/automated-tests/src/dali-devel/utc-Dali-Scripting.cpp @@ -49,7 +49,7 @@ const unsigned int POSITION_INHERITANCE_MODE_VALUES_COUNT = sizeof( POSITION_INH const StringEnum DRAW_MODE_VALUES[] = { { "NORMAL", DrawMode::NORMAL }, - { "OVERLAY", DrawMode::OVERLAY }, + { "OVERLAY_2D", DrawMode::OVERLAY_2D }, { "STENCIL", DrawMode::STENCIL }, }; const unsigned int DRAW_MODE_VALUES_COUNT = sizeof( DRAW_MODE_VALUES ) / sizeof( DRAW_MODE_VALUES[0] ); diff --git a/automated-tests/src/dali/utc-Dali-Actor.cpp b/automated-tests/src/dali/utc-Dali-Actor.cpp index 86f5e4c..952c82b 100644 --- a/automated-tests/src/dali/utc-Dali-Actor.cpp +++ b/automated-tests/src/dali/utc-Dali-Actor.cpp @@ -2210,11 +2210,11 @@ int UtcDaliActorSetDrawMode(void) DALI_TEST_CHECK( DrawMode::NORMAL == a.GetDrawMode() ); // Ensure overlay is off by default - a.SetDrawMode( DrawMode::OVERLAY ); + a.SetDrawMode( DrawMode::OVERLAY_2D ); app.SendNotification(); app.Render(1); - DALI_TEST_CHECK( DrawMode::OVERLAY == a.GetDrawMode() ); // Check Actor is overlay + DALI_TEST_CHECK( DrawMode::OVERLAY_2D == a.GetDrawMode() ); // Check Actor is overlay a.SetDrawMode( DrawMode::STENCIL ); app.SendNotification(); @@ -2278,7 +2278,7 @@ int UtcDaliActorSetDrawModeOverlayRender(void) // b (9) // c (10) // a (8) - a.SetDrawMode( DrawMode::OVERLAY ); + a.SetDrawMode( DrawMode::OVERLAY_2D ); app.GetGlAbstraction().ClearBoundTextures(); app.SendNotification(); @@ -2468,8 +2468,8 @@ int UtcDaliActorSetGetOverlay(void) tet_infoline(" UtcDaliActorSetGetOverlay"); Actor parent = Actor::New(); - parent.SetDrawMode(DrawMode::OVERLAY ); - DALI_TEST_CHECK( parent.GetDrawMode() == DrawMode::OVERLAY ); + parent.SetDrawMode(DrawMode::OVERLAY_2D ); + DALI_TEST_CHECK( parent.GetDrawMode() == DrawMode::OVERLAY_2D ); END_TEST; } diff --git a/dali/devel-api/scripting/scripting.cpp b/dali/devel-api/scripting/scripting.cpp index a9ed598..98483c5 100644 --- a/dali/devel-api/scripting/scripting.cpp +++ b/dali/devel-api/scripting/scripting.cpp @@ -79,7 +79,7 @@ const unsigned int POSITION_INHERITANCE_MODE_TABLE_COUNT = sizeof( POSITION_INHE const StringEnum DRAW_MODE_TABLE[] = { { "NORMAL", DrawMode::NORMAL }, - { "OVERLAY", DrawMode::OVERLAY }, + { "OVERLAY_2D", DrawMode::OVERLAY_2D }, { "STENCIL", DrawMode::STENCIL }, }; const unsigned int DRAW_MODE_TABLE_COUNT = sizeof( DRAW_MODE_TABLE ) / sizeof( DRAW_MODE_TABLE[0] ); diff --git a/dali/internal/event/actors/actor-impl.cpp b/dali/internal/event/actors/actor-impl.cpp index cb4b4f5..b55aae3 100644 --- a/dali/internal/event/actors/actor-impl.cpp +++ b/dali/internal/event/actors/actor-impl.cpp @@ -1458,16 +1458,16 @@ void Actor::RemoveRenderer( unsigned int index ) void Actor::SetOverlay( bool enable ) { - // Setting STENCIL will override OVERLAY + // Setting STENCIL will override OVERLAY_2D if( DrawMode::STENCIL != mDrawMode ) { - SetDrawMode( enable ? DrawMode::OVERLAY : DrawMode::NORMAL ); + SetDrawMode( enable ? DrawMode::OVERLAY_2D : DrawMode::NORMAL ); } } bool Actor::IsOverlay() const { - return ( DrawMode::OVERLAY == mDrawMode ); + return ( DrawMode::OVERLAY_2D == mDrawMode ); } void Actor::SetDrawMode( DrawMode::Type drawMode ) diff --git a/dali/internal/update/manager/process-render-tasks.cpp b/dali/internal/update/manager/process-render-tasks.cpp index 7495fe0..366db13 100644 --- a/dali/internal/update/manager/process-render-tasks.cpp +++ b/dali/internal/update/manager/process-render-tasks.cpp @@ -160,7 +160,7 @@ static bool AddRenderablesForTask( BufferIndex updateBufferIndex, { layer->stencilRenderables.push_back( renderable ); } - else if( DrawMode::OVERLAY == inheritedDrawMode ) + else if( DrawMode::OVERLAY_2D == inheritedDrawMode ) { layer->overlayRenderables.push_back( renderable ); } diff --git a/dali/internal/update/manager/update-algorithms.cpp b/dali/internal/update/manager/update-algorithms.cpp index 6a2d8ed..232621a 100644 --- a/dali/internal/update/manager/update-algorithms.cpp +++ b/dali/internal/update/manager/update-algorithms.cpp @@ -373,7 +373,7 @@ inline int UpdateNodesAndAttachments( Node& node, // It is important that the modified version of these flags are used by the RenderableAttachment. UpdateNodeTransformValues( node, nodeDirtyFlags, updateBufferIndex ); - // Setting STENCIL will override OVERLAY, if that would otherwise have been inherited. + // Setting STENCIL will override OVERLAY_2D, if that would otherwise have been inherited. inheritedDrawMode |= node.GetDrawMode(); if ( node.HasAttachment() ) diff --git a/dali/public-api/actors/actor.h b/dali/public-api/actors/actor.h index 523dc06..e94955f 100644 --- a/dali/public-api/actors/actor.h +++ b/dali/public-api/actors/actor.h @@ -1022,9 +1022,9 @@ public: * By default a renderable actor will be drawn as a 3D object. It will be depth-tested against * other objects in the world i.e. it may be obscured if other objects are in front. * - * If DrawMode::OVERLAY is used, the actor and its children will be drawn as a 2D overlay. + * If DrawMode::OVERLAY_2D is used, the actor and its children will be drawn as a 2D overlay. * Overlay actors are drawn in a separate pass, after all non-overlay actors within the Layer. - * For overlay actors, the drawing order is determined by the hierachy (depth-first search order), + * For overlay actors, the drawing order is with respect to depth-index property of Renderers, * and depth-testing will not be used. * * If DrawMode::STENCIL is used, the actor and its children will be used to stencil-test other actors @@ -1032,7 +1032,7 @@ public: * actors within the Layer. * * @param[in] drawMode The new draw-mode to use. - * @note Setting STENCIL will override OVERLAY, if that would otherwise have been inherited. + * @note Setting STENCIL will override OVERLAY_2D, if that would otherwise have been inherited. * @note Layers do not inherit the DrawMode from their parents. */ void SetDrawMode( DrawMode::Type drawMode ); diff --git a/dali/public-api/actors/draw-mode.h b/dali/public-api/actors/draw-mode.h index 07f72e3..25ac0a6 100644 --- a/dali/public-api/actors/draw-mode.h +++ b/dali/public-api/actors/draw-mode.h @@ -33,9 +33,9 @@ namespace DrawMode */ enum Type { - NORMAL = 0, ///< binary 00. The default draw-mode - OVERLAY = 1, ///< binary 01. Draw the actor and its children as an overlay - STENCIL = 3 ///< binary 11. Draw the actor and its children into the stencil buffer + NORMAL = 0, ///< binary 00. The default draw-mode + OVERLAY_2D = 1, ///< binary 01. Draw the actor and its children as an overlay + STENCIL = 3 ///< binary 11. Draw the actor and its children into the stencil buffer }; } // namespace DrawMode -- 2.7.4