Add discardable memory emulation for non-android/mac platforms

Adds support for emulated discardable memory. The memory is managed by a
provider which listens for memory pressure notifications from the platform.

Currently, only android pushes these notifications, but in future patches, we
will apply pressure on other platforms in certain situations (e.g., when a tab
gets backgrounded).

BUG=237681

Review URL: https://codereview.chromium.org/17106004

git-svn-id: http://src.chromium.org/svn/trunk/src/build@231845 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
vollick@chromium.org 2013-10-30 16:33:30 +00:00
Родитель 07c89f1ad4
Коммит d2e01b4168
1 изменённых файлов: 11 добавлений и 6 удалений

Просмотреть файл

@ -557,6 +557,11 @@
'proprietary_codecs%': 0, 'proprietary_codecs%': 0,
}], }],
['OS=="mac"', {
'native_discardable_memory%': 1,
'native_memory_pressure_signals%': 1,
}],
# Enable autofill dialog for Android, Mac and Views-enabled platforms. # Enable autofill dialog for Android, Mac and Views-enabled platforms.
['toolkit_views==1 or (OS=="android" and android_webview_build==0) or OS=="mac"', { ['toolkit_views==1 or (OS=="android" and android_webview_build==0) or OS=="mac"', {
'enable_autofill_dialog%': 1 'enable_autofill_dialog%': 1
@ -2057,6 +2062,12 @@
['enable_hidpi==1', { ['enable_hidpi==1', {
'defines': ['ENABLE_HIDPI=1'], 'defines': ['ENABLE_HIDPI=1'],
}], }],
['native_discardable_memory==1', {
'defines': ['DISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY'],
}],
['native_memory_pressure_signals==1', {
'defines': ['SYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE'],
}],
['fastbuild!=0', { ['fastbuild!=0', {
'xcode_settings': { 'xcode_settings': {
'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO', 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
@ -3467,12 +3478,6 @@
'-B<(PRODUCT_DIR)/../../third_party/gold', '-B<(PRODUCT_DIR)/../../third_party/gold',
], ],
}], }],
['native_discardable_memory', {
'defines': ['DISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY'],
}],
['native_memory_pressure_signals', {
'defines': ['SYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE'],
}],
], ],
}, },
}], }],