diff options
author | Nicolas Roard <nicolas@android.com> | 2011-02-01 03:58:44 -0800 |
---|---|---|
committer | Nicolas Roard <nicolas@android.com> | 2011-02-01 04:22:24 -0800 |
commit | 3a3a8a5cdda72d79add3d08082523d5115cb47a8 (patch) | |
tree | d8d0b14c6daad8bef1bf022c996648d77bc7ffad /WebCore/platform/graphics/android/TilesManager.cpp | |
parent | d7c28d82f1f7f97cd9527fc6372596fbf69bd2fd (diff) | |
download | external_webkit-3a3a8a5cdda72d79add3d08082523d5115cb47a8.zip external_webkit-3a3a8a5cdda72d79add3d08082523d5115cb47a8.tar.gz external_webkit-3a3a8a5cdda72d79add3d08082523d5115cb47a8.tar.bz2 |
Implement automatic texture size allocation for layers
This fix several issues (3d transforms, etc.) and in general
makes websites using layers snappier (gmail, etc.)
bug:3367038 bug:3367048
Change-Id: Ib178416209c3636c7700296978a1f35a7a54ee22
Diffstat (limited to 'WebCore/platform/graphics/android/TilesManager.cpp')
-rw-r--r-- | WebCore/platform/graphics/android/TilesManager.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/WebCore/platform/graphics/android/TilesManager.cpp b/WebCore/platform/graphics/android/TilesManager.cpp index 81b0404..8cbca35 100644 --- a/WebCore/platform/graphics/android/TilesManager.cpp +++ b/WebCore/platform/graphics/android/TilesManager.cpp @@ -61,7 +61,9 @@ #define TILE_HEIGHT 300 // Define a maximum amount of ram used by layers -#define MAX_LAYERS_ALLOCATION 20971520 // 20Mb +#define MAX_LAYERS_ALLOCATION 33554432 // 32Mb +// Define a maximum amount of ram used by one layer +#define MAX_LAYER_ALLOCATION 8388608 // 8Mb #define BYTES_PER_PIXEL 4 // 8888 config namespace WebCore { @@ -339,6 +341,16 @@ LayerTexture* TilesManager::createTextureForLayer(LayerAndroid* layer, const Int return texture; } +int TilesManager::maxLayersAllocation() +{ + return MAX_LAYERS_ALLOCATION; +} + +int TilesManager::maxLayerAllocation() +{ + return MAX_LAYER_ALLOCATION; +} + int TilesManager::maxTextureCount() { android::Mutex::Autolock lock(m_texturesLock); |