uiacceltk/hitchcock/coretoolkit/src/HuiCanvasTextureCache.cpp
branchRCL_3
changeset 12 f93c875b566e
parent 9 3ac8bf5c5014
child 15 cd0ae4656946
equal deleted inserted replaced
10:7c5dd702d6d3 12:f93c875b566e
    29 
    29 
    30 #include <e32cmn.h>
    30 #include <e32cmn.h>
    31 #include <bitdev.h>
    31 #include <bitdev.h>
    32 #include <AknLayoutFont.h>
    32 #include <AknLayoutFont.h>
    33 #include <e32property.h>
    33 #include <e32property.h>
       
    34 
       
    35 #include "alfmoduletestconf.h"
       
    36 #ifdef USE_MODULE_TEST_HOOKS_FOR_ALF
       
    37     // Provides TLS object data for test cases.
       
    38     // This is used only if module test hooks are set on.
       
    39     #include "huistatictlsdata.h"
       
    40 #endif // USE_MODULE_TEST_HOOKS_FOR_ALF
       
    41 // Provides module test hook defines.
       
    42 #include "alfmoduletestdefines.h"
    34 
    43 
    35 // Enable this for debugging cache usage
    44 // Enable this for debugging cache usage
    36 //#define HUI_DEBUG_PRINT_CANVAS_TEXTURE_CACHE
    45 //#define HUI_DEBUG_PRINT_CANVAS_TEXTURE_CACHE
    37 //#define HUI_DEBUG_PRINT_CANVAS_TEXTURE_CACHE_EGL
    46 //#define HUI_DEBUG_PRINT_CANVAS_TEXTURE_CACHE_EGL
    38 //#define HUI_DEBUG_PRINT_CANVAS_TEXTURE_CACHE_EXTENDED
    47 //#define HUI_DEBUG_PRINT_CANVAS_TEXTURE_CACHE_EXTENDED
  3506 
  3515 
  3507         // TODO: This could be configurable cenrep or something ?
  3516         // TODO: This could be configurable cenrep or something ?
  3508         iMaxTextureMemoryInKBytes = KHuiMaxRecommendedTextureAmountInKBytes;
  3517         iMaxTextureMemoryInKBytes = KHuiMaxRecommendedTextureAmountInKBytes;
  3509         iMaxRenderBufferMemoryInKBytes = KHuiMaxRecommendedRenderBufferAmountInKBytes;       
  3518         iMaxRenderBufferMemoryInKBytes = KHuiMaxRecommendedRenderBufferAmountInKBytes;       
  3510         }    
  3519         }    
       
  3520 
       
  3521     AMT_MAP_CANVAS_TEXTURE_CACHE_SET_MEMORY_LEVEL();
  3511     }
  3522     }
  3512 
  3523 
  3513 TBool CHuiCanvasTextureCache::IsLowMemoryStateEnabled() const
  3524 TBool CHuiCanvasTextureCache::IsLowMemoryStateEnabled() const
  3514     {
  3525     {
  3515     if (iMemoryLevel < EHuiMemoryLevelReduced)
  3526     if (iMemoryLevel < EHuiMemoryLevelReduced)