X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=docs%2Fcontent%2Fshared-javascript-and-cpp-documentation%2Fperformance-tips.md;h=7a9617f4d00df0b000db1ff19b51705b513200a2;hb=2e0c894df594a13161cc1e59e48e35788f4c666d;hp=e96ae4d9dabdda26113e765a283f2abf46953559;hpb=6843654a76dd5ac486ec3dc69e32798023dda176;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git 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 e96ae4d..7a9617f 100644 --- a/docs/content/shared-javascript-and-cpp-documentation/performance-tips.md +++ b/docs/content/shared-javascript-and-cpp-documentation/performance-tips.md @@ -1,27 +1,34 @@ -/** - * + -# Performance Tips {#performancetips} +# Performance Tips {#performancetips} ## High CPU occupancy - Try to reduce actor count ( less actors == less processing) - Delete any actors that are not visible, or move them off stage - Use TextureAtlases ( reduces OpenGL driver calls to glBindTexture - - Optimise / reduce any constraints used + - Optimize / reduce any constraints used ## High GPU occupancy - Reduce visible actor count ( == less draw calls) - For 2D UI graphics which require no z sorting you can use + ~~~{.cpp} - // 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) +// C++ +// In this mode depth testing is turned off and order is determined by the hierarchy (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_2D ); // C++ +~~~ - Actor::SetDrawMode( DrawMode::OVERLAY ); // C++ -~~~~ ~~~{.js} - actor.drawMode = dali.DRAW_MODE_OVERLAY; // JavaScript +// JavaScript +// In this mode depth testing is turned off and order is determined by the hierarchy (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_2D; ~~~ - Use TextureAtlases ( reduces state changes in the GPU) - Use compressed textures @@ -29,10 +36,11 @@ - Use Dali::NinePatchImage where possible. - Avoid using too many textures which contain alpha and require blending - Avoid using too many Dali::Layer with depth testing enabled. Otherwise the layer has to clear the depth buffer. - - Optimise any shaders used. Pixel shaders should be kept as lean as possible. + - Optimize any shaders used. Pixel shaders should be kept as lean as possible. @class _Guide_Performance_Tips + */