mUnitsPerEM(0.0f),
mUnderlinePosition(0.0f),
mUnderlineThickness(0.0f),
- mPadAdjust(0.0f)
+ mPadAdjust(0.0f),
+ mAtlasId( 0 )
{
}
}
LightAttachment::LightAttachment( Stage& stage )
-: ActorAttachment( stage )
+: ActorAttachment( stage ),
+ mSceneObject( NULL )
{
mCachedLight = new Internal::Light( "Unnamed" );
}
MeshAttachment::MeshAttachment( Stage& stage )
: RenderableAttachment( stage ),
+ mSceneObject( NULL ),
mAffectedByLighting( true )
{
}
TextAttachment::TextAttachment( Stage& stage )
: RenderableAttachment( stage ),
+ mSceneObject( NULL ),
mTextRequestHelper( *this ),
mTextColor( NULL ),
mTextChanged( true ),
void TextAttachment::SetTextChanges()
{
- // record the natural size of the text
- mTextSize = mVertexBuffer->mVertexMax;
+ if( mVertexBuffer )
+ {
+ // record the natural size of the text
+ mTextSize = mVertexBuffer->mVertexMax;
- // remember the texture id, so we can detect atlas resizes / splits
- mTextureId = mVertexBuffer->mTextureId;
+ // remember the texture id, so we can detect atlas resizes / splits
+ mTextureId = mVertexBuffer->mTextureId;
- EventToUpdate& eventToUpdate( mStage->GetUpdateInterface() );
- const SceneGraph::TextAttachment& attachment( *mSceneObject );
+ EventToUpdate& eventToUpdate( mStage->GetUpdateInterface() );
+ const SceneGraph::TextAttachment& attachment( *mSceneObject );
- if( mTextChanged || mFontChanged )
- {
- DALI_LOG_INFO(Debug::Filter::gResource, Debug::General, "TextAttachment::SetTextChanges() Sending VertexBuffer to attachment:%p textureId:%d\n", &attachment, mVertexBuffer->mTextureId);
+ if( mTextChanged || mFontChanged )
+ {
+ DALI_LOG_INFO(Debug::Filter::gResource, Debug::General, "TextAttachment::SetTextChanges() Sending VertexBuffer to attachment:%p textureId:%d\n", &attachment, mVertexBuffer->mTextureId);
- // release the vertex buffer to pass ownership to the scene-graph-text-attachment
- SetTextVertexBufferMessage( eventToUpdate, attachment, *mVertexBuffer.Release() );
+ // release the vertex buffer to pass ownership to the scene-graph-text-attachment
+ SetTextVertexBufferMessage( eventToUpdate, attachment, *mVertexBuffer.Release() );
- if( mFontChanged )
- {
- SetTextFontSizeMessage( eventToUpdate, attachment, mFont->GetPixelSize() );
+ if( mFontChanged )
+ {
+ SetTextFontSizeMessage( eventToUpdate, attachment, mFont->GetPixelSize() );
+ }
}
}
}
*/
// CLASS HEADER
+#include <dali/internal/event/events/actor-observer.h>
#include <dali/integration-api/debug.h>
#include <dali/internal/event/actors/actor-impl.h>
-#include <dali/internal/event/events/actor-observer.h>
namespace Dali
{
#endif // defined(DEBUG_ENABLED)
}
-ActorObserver::ActorObserver::ActorObserver()
+ActorObserver::ActorObserver()
: mActor ( NULL ),
mActorDisconnected(false)
{
DALI_LOG_TRACE_METHOD( gLogFilter );
}
-ActorObserver::ActorObserver::~ActorObserver()
+ActorObserver::~ActorObserver()
{
DALI_LOG_TRACE_METHOD( gLogFilter );
SetActor( NULL );
}
-Actor* ActorObserver::ActorObserver::GetActor()
+Actor* ActorObserver::GetActor()
{
return mActorDisconnected ? NULL : mActor;
}
-void ActorObserver::ActorObserver::SetActor( Actor* actor )
+void ActorObserver::SetActor( Actor* actor )
{
DALI_LOG_TRACE_METHOD( gLogFilter );
mActorDisconnected = false;
}
-void ActorObserver::ActorObserver::ResetActor()
+void ActorObserver::ResetActor()
{
if ( mActor )
{
}
}
-void ActorObserver::ActorObserver::SceneObjectRemoved( ProxyObject& proxy )
+void ActorObserver::SceneObjectRemoved( ProxyObject& proxy )
{
DALI_LOG_TRACE_METHOD( gLogFilter );
}
}
-void ActorObserver::ActorObserver::ProxyDestroyed(ProxyObject& proxy)
+void ActorObserver::ProxyDestroyed(ProxyObject& proxy)
{
DALI_LOG_TRACE_METHOD( gLogFilter );
ar << t.GetEntityName();
ar << t.GetDuration();
+ unsigned int count = 0;
+
const KeyFrameVector3* positionKeyFrames = NULL;
GetSpecialization(GetImplementation(t.GetPositionKeyFrames()), positionKeyFrames);
- unsigned int count = positionKeyFrames->GetNumberOfKeyFrames();
- ar << count;
- if( count )
+ if( positionKeyFrames )
{
- for( unsigned int i = 0; i < count; ++i)
+ count = positionKeyFrames->GetNumberOfKeyFrames();
+ ar << count;
+ if( count )
{
- float progress;
- Vector3 position;
- positionKeyFrames->GetKeyFrame(i, progress, position);
+ for( unsigned int i = 0; i < count; ++i)
+ {
+ float progress;
+ Vector3 position;
+ positionKeyFrames->GetKeyFrame(i, progress, position);
- ar << progress << position;
+ ar << progress << position;
+ }
}
}
+ else
+ {
+ ar << 0;
+ }
const KeyFrameVector3* scaleKeyFrames = NULL;
GetSpecialization(GetImplementation(t.GetScaleKeyFrames()), scaleKeyFrames);
- count = scaleKeyFrames->GetNumberOfKeyFrames();
- ar << count;
- if( count )
+ if( scaleKeyFrames )
{
- for( unsigned int i = 0; i < count; ++i)
+ count = scaleKeyFrames->GetNumberOfKeyFrames();
+ ar << count;
+ if( count )
{
- float progress;
- Vector3 scale;
- scaleKeyFrames->GetKeyFrame(i, progress, scale);
+ for( unsigned int i = 0; i < count; ++i)
+ {
+ float progress;
+ Vector3 scale;
+ scaleKeyFrames->GetKeyFrame(i, progress, scale);
- ar << progress << scale;
+ ar << progress << scale;
+ }
}
}
+ else
+ {
+ ar << 0;
+ }
const KeyFrameQuaternion* rotationKeyFrames = NULL;
GetSpecialization(GetImplementation(t.GetRotationKeyFrames()), rotationKeyFrames);
- count = rotationKeyFrames->GetNumberOfKeyFrames();
- ar << count;
- if( count )
+ if( rotationKeyFrames )
{
- for( unsigned int i = 0; i < count; ++i)
+ count = rotationKeyFrames->GetNumberOfKeyFrames();
+ ar << count;
+ if( count )
{
- float progress;
- Quaternion rotation;
- rotationKeyFrames->GetKeyFrame(i, progress, rotation);
+ for( unsigned int i = 0; i < count; ++i)
+ {
+ float progress;
+ Quaternion rotation;
+ rotationKeyFrames->GetKeyFrame(i, progress, rotation);
- ar << progress << rotation;
+ ar << progress << rotation;
+ }
}
}
+ else
+ {
+ ar << 0;
+ }
ar.CloseChunk(); // EANI
return ar;
GlyphAtlas* atlas = FindAtlas( text, format, fontId, bestRank);
DALI_ASSERT_DEBUG( atlas && "Find atlas should always return a valid atlas." );
+ if( atlas )
+ {
+ // if the atlas is full, create a new larger one
+ if( bestRank.GetSpaceStatus() == AtlasRanking::FULL_CAN_BE_RESIZED )
+ {
+ atlas = CreateLargerAtlas( atlas );
+ }
- // if the atlas is full, create a new larger one
- if( bestRank.GetSpaceStatus() == AtlasRanking::FULL_CAN_BE_RESIZED )
+ // assign the text to it
+ return atlas->AssignText( text, format, fontId, metrics );
+ }
+ else
{
- atlas = CreateLargerAtlas( atlas );
+ return NULL;
}
-
- // assign the text to it
- return atlas->AssignText( text, format, fontId, metrics );
}
void GlyphAtlasManager::TextNotRequired( const Integration::TextArray& text,
}
FontLayout::FontLayout()
+ :mUnitsPerEM(0.0f)
{
}
using Integration::TextResourceType;
+GlyphResourceRequest::GlyphResourceRequest()
+:mFontId( 0 ),
+ mQuality( LOW_QUALITY )
+{
+
+}
GlyphResourceRequest::GlyphResourceRequest( FontId fontId, GlyphQuality quality )
:mFontId( fontId ),
/**
* constructor
*/
- GlyphResourceRequest()
- {
- }
+ GlyphResourceRequest();
FontId mFontId; ///< font id
GlyphQuality mQuality; ///< quality
// get the vertex buffer required to display the text
TextVertexBuffer* buffer = mFont->TextRequired( mText, format );
+ if( buffer )
+ {
+ // keep track of the texture id, ( texture id == atlas id)
+ mTextureId = buffer->mTextureId;
- // keep track of the texture id, ( texture id == atlas id)
- mTextureId = buffer->mTextureId;
-
- return buffer;
+ return buffer;
+ }
}
else if( 0u == mText.Count() )
{
resourcePostProcessQueue( resourcePostProcessQ ),
instructions(),
backgroundColor( Dali::Stage::DEFAULT_BACKGROUND_COLOR ),
+ frameTime( 0.0f ),
+ lastFrameTime( 0.0f ),
frameCount( 0 ),
renderBufferIndex( SceneGraphBuffers::INITIAL_UPDATE_BUFFER_INDEX ),
defaultSurfaceRect(),
mClearColor(Color::WHITE), // initial color, never used until it's been set by the user
mCullFaceMode(CullNone),
mViewPort( 0, 0, 0, 0 ),
- mCurrentProgram( NULL )
+ mCurrentProgram( NULL ),
+ mFrameCount( 0 ),
+ mCulledCount( 0 ),
+ mRendererCount( 0 )
{
}
{
RenderTaskList::RenderTaskList(CompleteStatusManager& completeStatusManager)
-: mCompleteStatusManager( completeStatusManager )
+: mNotificationObject( NULL ),
+ mCompleteStatusManager( completeStatusManager )
{
}
mPostProcessResourceDispatcher(postProcessResourceDispatcher),
mDiscardQueue(discardQueue),
mRenderQueue(renderQueue),
- mNotificationCount(0)
+ mNotificationCount(0),
+ cacheUpdated(false)
{
}
// Allocate space for symbol
char *mangledSymbol = (char*)malloc(tokenLength+1u);
- strncpy(mangledSymbol, startOfToken, tokenLength);
- mangledSymbol[tokenLength] = '\0';
-
- size_t size;
- int status;
- char* demangled=NULL;
- demangled = abi::__cxa_demangle( mangledSymbol, NULL, &size, &status );
- if( demangled != NULL )
+ if(mangledSymbol != NULL)
{
- result = demangled;
- free(demangled); // demangle() allocates returned string, so free it
+ strncpy(mangledSymbol, startOfToken, tokenLength);
+ mangledSymbol[tokenLength] = '\0';
+
+ size_t size;
+ int status;
+ char* demangled=NULL;
+ demangled = abi::__cxa_demangle( mangledSymbol, NULL, &size, &status );
+ if( demangled != NULL )
+ {
+ result = demangled;
+ free(demangled); // demangle() allocates returned string, so free it
+ }
+ else
+ {
+ result = symbol;
+ }
+ free(mangledSymbol);
}
- else
- {
- result = symbol;
- }
- free(mangledSymbol);
}
}
keyPressed(""),
keyCode(KEY_INVALID_CODE),
keyModifier(0),
+ time(0),
state(KeyEvent::Down)
{
}
const float initialDistance( source[i] + SQUARE( i ) );
int parabola = parabolas[rightmost];
float newDistance( (initialDistance - (source[parabola] + SQUARE( parabola ))) / (2 * i - 2 * parabola) );
- while( newDistance <= edge[rightmost] )
+ while( rightmost > 0 && newDistance <= edge[rightmost] )
{
rightmost--;
parabola = parabolas[rightmost];
CallbackBase::Impl::Impl()
: mObjectPointer( NULL ),
- mMemberFunctionDispatcher( NULL )
+ mMemberFunctionDispatcher( NULL ),
+ mDestructorDispatcher( NULL )
{
}