From 59f33898919391d3aa4baa6849556965ae7d08ce Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Tue, 9 Aug 2011 14:10:05 +0300 Subject: Default graphics memory quota for Symbian applications The graphics memory quota, which is a new feature in S60 5.4, now gets default value of 24MB. User can override the default value using RSS_RULES: RSS_RULES += "graphics_memory=<# of kB>;" Task-number: QT-4963 Reviewed-by: Sami Merila --- doc/src/development/qmake-manual.qdoc | 17 +++++++++++++++++ doc/src/snippets/code/doc_src_qmake-manual.pro | 4 ++++ mkspecs/features/symbian/default_post.prf | 12 ++++++++++++ 3 files changed, 33 insertions(+) diff --git a/doc/src/development/qmake-manual.qdoc b/doc/src/development/qmake-manual.qdoc index 184a881..329bac5 100644 --- a/doc/src/development/qmake-manual.qdoc +++ b/doc/src/development/qmake-manual.qdoc @@ -3116,6 +3116,23 @@ platform application shell. In addition it will make the application to be launched in background. + From S60 version 5.4 onwards, you can specify \c graphics_memory value using \c RSS_RULES + to specify the graphics memory quota for the application. The value is in kilobytes and + defaults to 24576 (i.e. 24MB) for applications that link against QtGui. The default for all + other applications is zero. + + The graphics memory quota tells the operating system how much graphics memory the + application is likely to need so that it can free up enough graphics memory prior to + application launch. If the value is too small, it can cause random slowdowns later when + the memory is freed on on-demand basis. On the other hand, too large values can delay + the application launch unnecessarily. + + For example: + + \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 159 + + This example sets the graphics memory quota to 12MB. + For detailed list of possible \c APP_REGISTRATION_INFO statements, please refer to the Symbian platform help. diff --git a/doc/src/snippets/code/doc_src_qmake-manual.pro b/doc/src/snippets/code/doc_src_qmake-manual.pro index ee35b77..042ca0e 100644 --- a/doc/src/snippets/code/doc_src_qmake-manual.pro +++ b/doc/src/snippets/code/doc_src_qmake-manual.pro @@ -1023,3 +1023,7 @@ packagesExist(sqlite3 QtNetwork QtDeclarative) { // Use the fancy UI, as we have extra packages available #endif #! [158] + +#! [159] +RSS_RULES += "graphics_memory=12288;" +#! [159] diff --git a/mkspecs/features/symbian/default_post.prf b/mkspecs/features/symbian/default_post.prf index 470372e..c8fd33b 100644 --- a/mkspecs/features/symbian/default_post.prf +++ b/mkspecs/features/symbian/default_post.prf @@ -19,7 +19,19 @@ contains(TEMPLATE, ".*app") { default_bin_deployment.path += /sys/bin load(application_icon.prf) + + # Specify default graphics memory quota for applications unless explicitly set by developer. + !contains(S60_VERSION, 5.0):!contains(S60_VERSION, 5.1):!contains(S60_VERSION, 5.2):!contains(S60_VERSION, 5.3) { + !contains(RSS_RULES, .*graphics_memory.*) { + contains(QT, gui) { + RSS_RULES += "graphics_memory=24576;" + } else { + RSS_RULES += "graphics_memory=0;" + } + } + } } + contains(TEMPLATE, lib): { contains(CONFIG, staticlib)|contains(CONFIG, static): { # Static libs should not have LIBRARY statements in S60 -- cgit v0.12