From c519bcb8c924b177e34d77e4c9137ee647a1c57d Mon Sep 17 00:00:00 2001 From: Richard Huang Date: Mon, 13 Jul 2015 14:40:41 +0100 Subject: [PATCH] Change DrawMode::OVERLAY to DrawMode::OVERLAY_2D Change-Id: I62c18b342d4983f266d26b4dd8f7efa3e33c53f6 --- dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp | 2 +- dali-toolkit/public-api/controls/control-impl.cpp | 4 ++-- .../shared-javascript-and-cpp-documentation/performance-tips.md | 4 ++-- plugins/dali-script-v8/docs/content/actor.js | 8 ++++---- plugins/dali-script-v8/docs/content/constants.js | 2 +- plugins/dali-script-v8/src/constants/constants-wrapper.cpp | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp b/dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp index 1ef1e47..a1bdedf 100755 --- a/dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp +++ b/dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp @@ -175,7 +175,7 @@ ScrollBar::~ScrollBar() void ScrollBar::OnInitialize() { CreateDefaultIndicatorActor(); - Self().SetDrawMode(DrawMode::OVERLAY); + Self().SetDrawMode(DrawMode::OVERLAY_2D); } void ScrollBar::SetScrollPropertySource( Handle handle, Property::Index propertyScrollPosition, Property::Index propertyMinScrollPosition, Property::Index propertyMaxScrollPosition, Property::Index propertyScrollContentSize ) diff --git a/dali-toolkit/public-api/controls/control-impl.cpp b/dali-toolkit/public-api/controls/control-impl.cpp index 74eabcb..6434772 100644 --- a/dali-toolkit/public-api/controls/control-impl.cpp +++ b/dali-toolkit/public-api/controls/control-impl.cpp @@ -584,7 +584,7 @@ void Control::SetBackgroundColor( const Vector4& color ) Actor actor = CreateBackground(Self(), color ); background.actor = actor; mImpl->mAddRemoveBackgroundChild = true; - // use insert to guarantee its the first child (so that OVERLAY mode works) + // use insert to guarantee its the first child (so that OVERLAY_2D mode works) Self().Insert( 0, actor ); mImpl->mAddRemoveBackgroundChild = false; } @@ -619,7 +619,7 @@ void Control::SetBackgroundImage( Image image ) // Set the background actor before adding so that we do not inform derived classes background.actor = actor; mImpl->mAddRemoveBackgroundChild = true; - // use insert to guarantee its the first child (so that OVERLAY mode works) + // use insert to guarantee its the first child (so that OVERLAY_2D mode works) Self().Insert( 0, actor ); mImpl->mAddRemoveBackgroundChild = false; } diff --git a/docs/content/shared-javascript-and-cpp-documentation/performance-tips.md b/docs/content/shared-javascript-and-cpp-documentation/performance-tips.md index 7831c7b..782c05b 100644 --- a/docs/content/shared-javascript-and-cpp-documentation/performance-tips.md +++ b/docs/content/shared-javascript-and-cpp-documentation/performance-tips.md @@ -20,7 +20,7 @@ // In this mode depth testing is turned off and order is determined by the hierachy (depth-first search order). // Not always recommended if there is going to be a lot of overdraw ( if lots of actors are on top of each other) -Actor::SetDrawMode( DrawMode::OVERLAY ); // C++ +Actor::SetDrawMode( DrawMode::OVERLAY_2D ); // C++ ~~~ ~~~{.js} @@ -28,7 +28,7 @@ Actor::SetDrawMode( DrawMode::OVERLAY ); // C++ // In this mode depth testing is turned off and order is determined by the hierachy (depth-first search order). // Not always recommended if there is going to be a lot of overdraw ( if lots of actors are on top of each other) -actor.drawMode = dali.DRAW_MODE_OVERLAY; +actor.drawMode = dali.DRAW_MODE_OVERLAY_2D; ~~~ - Use TextureAtlases ( reduces state changes in the GPU) - Use compressed textures diff --git a/plugins/dali-script-v8/docs/content/actor.js b/plugins/dali-script-v8/docs/content/actor.js index 4938c01..70def0c 100644 --- a/plugins/dali-script-v8/docs/content/actor.js +++ b/plugins/dali-script-v8/docs/content/actor.js @@ -543,7 +543,7 @@ INHERIT_SCALE, * 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 OVERLAY is used, the actor and its children will be drawn as a 2D overlay. + * If 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), * and depth-testing will not be used. @@ -554,9 +554,9 @@ INHERIT_SCALE, * * @example * - * var actor.drawMode = dali.DRAW_MODE_NORMAL; // binary 00. The default draw-mode - * var actor.drawMode = dali.DRAW_MODE_OVERLAY; // binary 01. Draw the actor and its children as an overlay - * var actor.drawMode = dali.DRAW_MODE_STENCIL ;// binary 11. Draw the actor and its children into the stencil buffer + * var actor.drawMode = dali.DRAW_MODE_NORMAL; // binary 00. The default draw-mode + * var actor.drawMode = dali.DRAW_MODE_OVERLAY_2D; // binary 01. Draw the actor and its children as an overlay + * var actor.drawMode = dali.DRAW_MODE_STENCIL ; // binary 11. Draw the actor and its children into the stencil buffer * * * @type Number diff --git a/plugins/dali-script-v8/docs/content/constants.js b/plugins/dali-script-v8/docs/content/constants.js index 51c869a..b10e4e6 100644 --- a/plugins/dali-script-v8/docs/content/constants.js +++ b/plugins/dali-script-v8/docs/content/constants.js @@ -58,7 +58,7 @@ Constants accessible under the dali global object. |**actor.drawMode **| | |DRAW_MODE_NORMAL | integer value | -|DRAW_MODE_OVERLAY | integer value | +|DRAW_MODE_OVERLAY_2D | integer value | |DRAW_MODE_STENCIL | integer value | |**Image load policy **| | diff --git a/plugins/dali-script-v8/src/constants/constants-wrapper.cpp b/plugins/dali-script-v8/src/constants/constants-wrapper.cpp index c3b2043..7f51554 100644 --- a/plugins/dali-script-v8/src/constants/constants-wrapper.cpp +++ b/plugins/dali-script-v8/src/constants/constants-wrapper.cpp @@ -154,7 +154,7 @@ const IntegerPair EnumTable[] = { "POSITION_INHERITANCE_DONT_INHERIT_POSITION", DONT_INHERIT_POSITION }, { "DRAW_MODE_NORMAL", DrawMode::NORMAL }, - { "DRAW_MODE_OVERLAY", DrawMode::OVERLAY }, + { "DRAW_MODE_OVERLAY_2D", DrawMode::OVERLAY_2D }, { "DRAW_MODE_STENCIL", DrawMode::STENCIL }, { "IMAGE_LOAD_POLICY_IMMEDIATE", ResourceImage::IMMEDIATE }, -- 2.7.4