uifw/AvKon/aknphysics/src/aknphysicsengine.cpp
changeset 54 4e76f14a5917
parent 0 2f259fa3e83a
equal deleted inserted replaced
53:3c67ea82fafc 54:4e76f14a5917
    18 #include <e32debug.h>
    18 #include <e32debug.h>
    19 #include <aknphysics.h>
    19 #include <aknphysics.h>
    20 #include <eikenv.h>
    20 #include <eikenv.h>
    21 #include <eikappui.h>
    21 #include <eikappui.h>
    22 #include <eikapp.h>
    22 #include <eikapp.h>
    23 #include <alf/alfdirectclient.h>
       
    24 
    23 
    25 #include "aknphysicsconstants.h"
    24 #include "aknphysicsconstants.h"
    26 #include "aknphysicsengine.h"
    25 #include "aknphysicsengine.h"
    27 
    26 
    28 // ======== MEMBER FUNCTIONS ========
    27 // ======== MEMBER FUNCTIONS ========
    58 // ---------------------------------------------------------------------------
    57 // ---------------------------------------------------------------------------
    59 //
    58 //
    60 CAknPhysicsEngine::~CAknPhysicsEngine()
    59 CAknPhysicsEngine::~CAknPhysicsEngine()
    61     {
    60     {
    62     DeletePhysics();
    61     DeletePhysics();
    63     delete iAlfClient;
       
    64     }
    62     }
    65 
    63 
    66 
    64 
    67 // ---------------------------------------------------------------------------
    65 // ---------------------------------------------------------------------------
    68 // CAknPhysicsEngine::WorldExists
    66 // CAknPhysicsEngine::WorldExists
   336 // CAknPhysicsEngine::StartFpsLogging
   334 // CAknPhysicsEngine::StartFpsLogging
   337 // ---------------------------------------------------------------------------
   335 // ---------------------------------------------------------------------------
   338 //
   336 //
   339 void CAknPhysicsEngine::StartFpsLogging()
   337 void CAknPhysicsEngine::StartFpsLogging()
   340     {
   338     {
   341     if ( !iAlfClient )
   339     //TODO: add fps logging
   342         {
       
   343         TRAP_IGNORE( iAlfClient = new ( ELeave ) RAlfDirectClient );
       
   344         }
       
   345         
       
   346     if ( iAlfClient )
       
   347         {
       
   348         if ( iLogUid == KNullUid )
       
   349             {
       
   350             CEikonEnv* env = CEikonEnv::Static();
       
   351             
       
   352             if ( env )
       
   353                 {
       
   354                 CEikAppUi* appUi = static_cast<CEikAppUi*>( env->AppUi() );
       
   355                 
       
   356                 if ( appUi && appUi->Application() )
       
   357                     {
       
   358                     iLogUid = appUi->Application()->AppDllUid();
       
   359                     }
       
   360                 }
       
   361             }
       
   362             
       
   363         iAlfClient->MeasureFPS( iLogUid.iUid, ETrue );
       
   364         }
       
   365     }
   340     }
   366 
   341 
   367 
   342 
   368 // ---------------------------------------------------------------------------
   343 // ---------------------------------------------------------------------------
   369 // CAknPhysicsEngine::StopFpsLogging
   344 // CAknPhysicsEngine::StopFpsLogging
   370 // ---------------------------------------------------------------------------
   345 // ---------------------------------------------------------------------------
   371 //
   346 //
   372 void CAknPhysicsEngine::StopFpsLogging()
   347 void CAknPhysicsEngine::StopFpsLogging()
   373     {
   348     {
   374     if ( iAlfClient )
   349     //TODO: stop fps logging
   375         {
       
   376         iAlfClient->MeasureFPS( iLogUid.iUid, EFalse );
       
   377         }
       
   378     }
   350     }
   379 
   351 
   380 
   352 
   381 // ---------------------------------------------------------------------------
   353 // ---------------------------------------------------------------------------
   382 // CAknPhysicsEngine::CAknPhysicsEngine
   354 // CAknPhysicsEngine::CAknPhysicsEngine