From: Francisco Santos Date: Tue, 19 May 2015 10:05:42 +0000 (+0100) Subject: Merge remote-tracking branch 'origin/tizen' into devel/new_mesh X-Git-Tag: dali_1.0.47~13^2~28 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=2071317d301e9d5af326a3a2efcd2996263fbead Merge remote-tracking branch 'origin/tizen' into devel/new_mesh Conflicts: automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp dali-toolkit/internal/atlas-manager/atlas-manager.h dali-toolkit/internal/controls/bubble-effect/bubble-emitter-impl.h dali-toolkit/internal/controls/scrollable/bouncing-effect-actor.cpp dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp dali-toolkit/internal/controls/text-controls/text-field-impl.cpp dali-toolkit/internal/file.list dali-toolkit/internal/text/decorator/text-decorator.cpp dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp dali-toolkit/internal/text/rendering/basic/text-basic-renderer.cpp dali-toolkit/internal/text/text-controller-impl.cpp dali-toolkit/internal/text/text-controller-impl.h dali-toolkit/internal/text/text-controller.cpp dali-toolkit/internal/text/text-controller.h dali-toolkit/public-api/controls/control-impl.cpp dali-toolkit/public-api/dali-toolkit-version.cpp docs/content/main-page.h docs/content/programming-guide/script-overview.h packaging/dali-toolkit.spec Change-Id: I672b8fe4c79dcabd9a3fe323ad55a1a368cc0b0e --- 2071317d301e9d5af326a3a2efcd2996263fbead diff --cc dali-toolkit/internal/atlas-manager/atlas-manager.h index 2b0c851,2bf79f0..2b8a122 --- a/dali-toolkit/internal/atlas-manager/atlas-manager.h +++ b/dali-toolkit/internal/atlas-manager/atlas-manager.h @@@ -20,9 -20,9 +20,9 @@@ // EXTERNAL INCLUDES #include #include - #include -#include + #include #include +#include namespace Dali { @@@ -409,4 -380,4 +409,4 @@@ private } // namespace Dali --#endif // __DALI_TOOLKIT_ATLAS_MANAGER_H__ ++#endif // __DALI_TOOLKIT_ATLAS_MANAGER_H__ diff --cc dali-toolkit/internal/controls/scrollable/bouncing-effect-actor.cpp index 7225beb,7f38bd4..d78801a --- a/dali-toolkit/internal/controls/scrollable/bouncing-effect-actor.cpp +++ b/dali-toolkit/internal/controls/scrollable/bouncing-effect-actor.cpp @@@ -38,14 -40,14 +38,14 @@@ namespac // Bouncing effect is presented by stacked three layers with same color and opacity const size_t NUM_LAYERS( 3 ); const Vector3 LAYER_HEIGHTS( 1.f, 27.f/42.f, 13.f/42.f); -- ++/* // use the actor color to paint every layer const char* MESH_FRAGMENT_SHADER = "void main()\n" "{\n" " gl_FragColor = uColor;\n" "}\n"; -- ++*/ // Constraint to move the vertices vertically struct VertexPositionConstraint { @@@ -68,6 -70,6 +68,8 @@@ Actor CreateBouncingEffectActor( Property::Index& bouncePropertyIndex ) { ++ Actor meshActor; ++/* Dali::AnimatableMesh mesh; Dali::MeshActor meshActor; @@@ -110,7 -112,7 +112,7 @@@ constraint = Constraint::New( mesh, mesh.GetPropertyIndex(j+3, AnimatableVertex::Property::POSITION), VertexPositionConstraint(-0.5f, LAYER_HEIGHTS[i]) ); constraint.AddSource( Source(meshActor, bouncePropertyIndex) ); constraint.Apply(); -- } ++ }*/ return meshActor; } diff --cc dali-toolkit/internal/controls/tool-bar/tool-bar-impl.cpp index a0ca86e,d8402d7..d9e85c5 --- a/dali-toolkit/internal/controls/tool-bar/tool-bar-impl.cpp +++ b/dali-toolkit/internal/controls/tool-bar/tool-bar-impl.cpp @@@ -19,10 -19,10 +19,10 @@@ #include "tool-bar-impl.h" // EXTERNAL INCLUDES -#include +#include #include #include - #include + #include // INTERNAL INCLUDES #include diff --cc dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp index e3b4827,58f7fc1..9fefd6d --- a/dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp +++ b/dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp @@@ -21,16 -21,18 +21,16 @@@ // EXTERNAL INCLUDES #include #include - //#include - #include + #include -#include -#include + // INTERNAL INCLUDES #include + #include #include #include - #if defined(DEBUG_ENABLED) - Debug::Filter* gLogFilter = Debug::Filter::New(Debug::Concise, true, "LOG_TEXT_ATLAS_RENDERER"); - #endif + #include -#include ++//#include using namespace Dali; using namespace Dali::Toolkit; @@@ -231,8 -181,8 +235,8 @@@ struct AtlasRenderer::Impl : public Con } } - Vector2 position = positions[ i ]; + const Vector2& position = positions[ i ]; - MeshData newMeshData; + AtlasManager::Mesh2D newMesh; mGlyphManager.Cached( glyph.fontId, glyph.index, slot ); if ( slot.mImageId ) @@@ -262,36 -212,38 +266,38 @@@ // Create a new image for the glyph BufferImage bitmap = mFontClient.CreateBitmap( glyph.fontId, glyph.index ); - - // Ensure that the next image will fit into the current block size - bool setSize = false; - if ( bitmap.GetWidth() > mBlockSizes[ currentBlockSize ].mNeededBlockWidth ) + if ( bitmap ) { - setSize = true; - mBlockSizes[ currentBlockSize ].mNeededBlockWidth = bitmap.GetWidth(); - } - if ( bitmap.GetHeight() > mBlockSizes[ currentBlockSize ].mNeededBlockHeight ) - { - setSize = true; - mBlockSizes[ currentBlockSize ].mNeededBlockHeight = bitmap.GetHeight(); - } + // Ensure that the next image will fit into the current block size + bool setSize = false; + if ( bitmap.GetWidth() > mBlockSizes[ currentBlockSize ].mNeededBlockWidth ) + { + setSize = true; + mBlockSizes[ currentBlockSize ].mNeededBlockWidth = bitmap.GetWidth(); + } + if ( bitmap.GetHeight() > mBlockSizes[ currentBlockSize ].mNeededBlockHeight ) + { + setSize = true; + mBlockSizes[ currentBlockSize ].mNeededBlockHeight = bitmap.GetHeight(); + } - if ( setSize ) - { - mGlyphManager.SetNewAtlasSize( DEFAULT_ATLAS_WIDTH, - DEFAULT_ATLAS_HEIGHT, - mBlockSizes[ currentBlockSize ].mNeededBlockWidth, - mBlockSizes[ currentBlockSize ].mNeededBlockHeight ); - } + if ( setSize ) + { + mGlyphManager.SetNewAtlasSize( DEFAULT_ATLAS_WIDTH, + DEFAULT_ATLAS_HEIGHT, + mBlockSizes[ currentBlockSize ].mNeededBlockWidth, + mBlockSizes[ currentBlockSize ].mNeededBlockHeight ); + } - // Locate a new slot for our glyph - mGlyphManager.Add( glyph, bitmap, slot ); + // Locate a new slot for our glyph + mGlyphManager.Add( glyph, bitmap, slot ); - // Generate mesh data for this quad, plugging in our supplied position - if ( slot.mImageId ) - { - mGlyphManager.GenerateMeshData( slot.mImageId, position, newMesh ); - mImageIds.PushBack( slot.mImageId ); + // Generate mesh data for this quad, plugging in our supplied position + if ( slot.mImageId ) + { - mGlyphManager.GenerateMeshData( slot.mImageId, position, newMeshData ); ++ mGlyphManager.GenerateMeshData( slot.mImageId, position, newMesh ); + mImageIds.PushBack( slot.mImageId ); + } } } // Find an existing mesh data object to attach to ( or create a new one, if we can't find one using the same atlas) @@@ -744,14 -694,13 +752,13 @@@ Text::RendererPtr AtlasRenderer::New( return Text::RendererPtr( new AtlasRenderer() ); } -RenderableActor AtlasRenderer::Render( Text::ViewInterface& view ) +Actor AtlasRenderer::Render( Text::ViewInterface& view ) { - UnparentAndReset( mImpl->mActor ); - Text::Length numberOfGlyphs = view.GetNumberOfGlyphs(); + Length numberOfGlyphs = view.GetNumberOfGlyphs(); - if( numberOfGlyphs > 0 ) + if( numberOfGlyphs > 0u ) { Vector glyphs; glyphs.Resize( numberOfGlyphs ); diff --cc dali-toolkit/internal/text/rendering/basic/text-basic-renderer.cpp index d64a03b,5937c91..8011823 --- a/dali-toolkit/internal/text/rendering/basic/text-basic-renderer.cpp +++ b/dali-toolkit/internal/text/rendering/basic/text-basic-renderer.cpp @@@ -18,10 -18,16 +18,14 @@@ // CLASS HEADER #include - // INTERNAL INCLUDES - #include + // EXTERNAL INCLUDES + #include #include - #include -#include + #include -#include + #include + + // INTERNAL INCLUDES + #include #include #include diff --cc dali-toolkit/internal/text/rendering/shaders/text-basic-shadow-shader.cpp index 0000000,f7789f1..89e7a8b mode 000000,100644..100644 --- a/dali-toolkit/internal/text/rendering/shaders/text-basic-shadow-shader.cpp +++ b/dali-toolkit/internal/text/rendering/shaders/text-basic-shadow-shader.cpp @@@ -1,0 -1,63 +1,63 @@@ + /* + * Copyright (c) 2015 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + + // CLASS HEADER + #include + + namespace Dali + { + + namespace Toolkit + { + + namespace Text + { + + namespace BasicShadowShader + { - ++/* + Dali::ShaderEffect New() + { + std::string vertexShader = DALI_COMPOSE_SHADER( + void main()\n + {\n + gl_Position = vec4( aPosition.xy, 0.0, 1.0 );\n + vTexCoord = aTexCoord.xy;\n + }\n + ); + + std::string fragmentShader = DALI_COMPOSE_SHADER( + void main()\n + {\n + mediump vec4 color = texture2D( sTexture, vTexCoord ); + gl_FragColor = vec4(uColor.rgb, uColor.a*color.r); + }\n + ); + + Dali::ShaderEffect shaderEffect = Dali::ShaderEffect::New( vertexShader, fragmentShader, + Dali::GeometryType( Dali::GEOMETRY_TYPE_TEXTURED_MESH ), + Dali::ShaderEffect::GeometryHints( Dali::ShaderEffect::HINT_NONE ) ); + return shaderEffect; + } - ++*/ + } // namespace BasicShadowShader + + } // namespace Text + + } // namespace Toolkit + + } // namespace Dali diff --cc dali-toolkit/public-api/controls/control-impl.cpp index 8355fc6,810a742..0e87de0 --- a/dali-toolkit/public-api/controls/control-impl.cpp +++ b/dali-toolkit/public-api/controls/control-impl.cpp @@@ -23,11 -23,13 +23,11 @@@ #include #include #include -#include #include #include -#include #include - #include - #include + #include + #include #include #include