Changeset 196712 in webkit


Ignore:
Timestamp:
Feb 17, 2016 12:27:56 PM (8 years ago)
Author:
akling@apple.com
Message:

[iOS] Purge GraphicsServices font cache on memory warning.
<https://webkit.org/b/154343>

Reviewed by Antti Koivisto.

The GS font cache was holding on to the last retain on CSS fonts after they stop being used.
Call SPI to purge it on memory pressure.

  • platform/cocoa/MemoryPressureHandlerCocoa.mm:

(WebCore::MemoryPressureHandler::platformReleaseMemory):

  • platform/spi/ios/GraphicsServicesSPI.h:
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r196711 r196712  
     12016-02-17  Andreas Kling  <akling@apple.com>
     2
     3        [iOS] Purge GraphicsServices font cache on memory warning.
     4        <https://webkit.org/b/154343>
     5
     6        Reviewed by Antti Koivisto.
     7
     8        The GS font cache was holding on to the last retain on CSS fonts after they stop being used.
     9        Call SPI to purge it on memory pressure.
     10
     11        * platform/cocoa/MemoryPressureHandlerCocoa.mm:
     12        (WebCore::MemoryPressureHandler::platformReleaseMemory):
     13        * platform/spi/ios/GraphicsServicesSPI.h:
     14
    1152016-02-17  Chris Dumez  <cdumez@apple.com>
    216
  • trunk/Source/WebCore/platform/cocoa/MemoryPressureHandlerCocoa.mm

    r194318 r196712  
    4141
    4242#if PLATFORM(IOS)
     43#import "GraphicsServicesSPI.h"
    4344#import "SystemMemory.h"
    4445#import "WebCoreThread.h"
     
    6667        ReliefLogger log("Drain IOSurfacePool");
    6768        IOSurfacePool::sharedPool().discardAllSurfaces();
     69    }
     70#endif
     71
     72#if PLATFORM(IOS)
     73    {
     74        ReliefLogger log("Purging GraphicsServices font cache");
     75        GSFontPurgeFontCache();
    6876    }
    6977#endif
  • trunk/Source/WebCore/platform/spi/ios/GraphicsServicesSPI.h

    r191249 r196712  
    4242uint64_t GSCurrentEventTimestamp(void);
    4343CFStringRef GSSystemRootDirectory(void);
     44void GSFontPurgeFontCache(void);
    4445
    4546WTF_EXTERN_C_END
Note: See TracChangeset for help on using the changeset viewer.