equal
deleted
inserted
replaced
36 #ifdef HUI_DEBUG_TRACK_DRAWING |
36 #ifdef HUI_DEBUG_TRACK_DRAWING |
37 #include "alfloggingconfiguration.h" |
37 #include "alfloggingconfiguration.h" |
38 #include "alfcommanddebug.h" |
38 #include "alfcommanddebug.h" |
39 #endif |
39 #endif |
40 |
40 |
|
41 #ifdef __WINSCW__ |
|
42 #define HUISTATIC_USE_TLS |
|
43 #endif |
|
44 |
41 // Global writeable data, used in HW instead of TLS which relatively slow |
45 // Global writeable data, used in HW instead of TLS which relatively slow |
42 #ifndef __WINSCW__ |
46 #ifndef HUISTATIC_USE_TLS |
43 TTlsData globalWriteableData; |
47 TTlsData* globalWriteableDataPtr = 0; |
44 #endif |
48 #endif |
45 |
49 |
46 void CleanupWg(TAny* aWg) |
50 void CleanupWg(TAny* aWg) |
47 { |
51 { |
48 RWindowGroup* wg = static_cast<RWindowGroup*>(aWg); |
52 RWindowGroup* wg = static_cast<RWindowGroup*>(aWg); |
394 |
398 |
395 #ifdef HUI_DEBUG_TRACK_DRAWING |
399 #ifdef HUI_DEBUG_TRACK_DRAWING |
396 iData->iCommandDebugger = CAlfCommandDebug::NewL(); |
400 iData->iCommandDebugger = CAlfCommandDebug::NewL(); |
397 #endif |
401 #endif |
398 |
402 |
399 #ifndef __WINSCW__ |
403 #ifndef HUISTATIC_USE_TLS |
400 globalWriteableData = *iData; |
404 globalWriteableDataPtr = iData; |
401 #ifdef USE_MODULE_TEST_HOOKS_FOR_ALF |
405 #ifdef USE_MODULE_TEST_HOOKS_FOR_ALF |
402 // For testing purposes, test data needs to be included into TLS |
406 // For testing purposes, test data needs to be included into TLS |
403 // because test cases require information stored in TLS. |
407 // because test cases require information stored in TLS. |
404 if ( !Dll::Tls() ) |
408 if ( !Dll::Tls() ) |
405 { |
409 { |
436 delete iData->iAppFwProxy; |
440 delete iData->iAppFwProxy; |
437 iData->Disconnect(); |
441 iData->Disconnect(); |
438 } |
442 } |
439 iChangeNotifier->Cancel(); |
443 iChangeNotifier->Cancel(); |
440 delete iChangeNotifier; |
444 delete iChangeNotifier; |
441 #if defined( __WINSCW__ ) || defined( USE_MODULE_TEST_HOOKS_FOR_ALF ) |
445 #ifndef HUISTATIC_USE_TLS |
|
446 globalWriteableDataPtr = 0; |
|
447 #ifdef USE_MODULE_TEST_HOOKS_FOR_ALF |
|
448 Dll::FreeTls(); |
|
449 #endif |
|
450 #else |
442 Dll::FreeTls(); |
451 Dll::FreeTls(); |
443 #endif |
452 #endif |
444 delete iData; |
453 delete iData; |
445 } |
454 } |
446 |
455 |
447 |
456 |
448 EXPORT_C TTlsData* CHuiStatic::Data() |
457 EXPORT_C TTlsData* CHuiStatic::Data() |
449 { |
458 { |
450 #ifndef __WINSCW__ |
459 #ifndef HUISTATIC_USE_TLS |
451 return &globalWriteableData; |
460 return globalWriteableDataPtr; |
452 #else |
461 #else |
453 return static_cast<TTlsData*>(Dll::Tls()); |
462 return static_cast<TTlsData*>(Dll::Tls()); |
454 #endif |
463 #endif |
455 } |
464 } |
456 |
465 |