Bug 126737 - Clear unparented tiled layers on memory pressure.
Summary: Clear unparented tiled layers on memory pressure.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-01-09 23:04 PST by Yongjun Zhang
Modified: 2014-01-10 14:06 PST (History)
6 users (show)

See Also:


Attachments
Patch, immediately clear unparented tiles under memory pressure. (19.54 KB, text/plain)
2014-01-09 23:27 PST, Yongjun Zhang
no flags Details
Fix style issues. (19.51 KB, patch)
2014-01-09 23:31 PST, Yongjun Zhang
simon.fraser: review+
Details | Formatted Diff | Diff
Address review comments before landing. (18.80 KB, patch)
2014-01-10 11:12 PST, Yongjun Zhang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yongjun Zhang 2014-01-09 23:04:34 PST
TileController hold unparented for a short period of time (1 -3 sec); we should clear these unparented tiles immediately if we are under memory pressure.
Comment 1 Yongjun Zhang 2014-01-09 23:05:52 PST
<rdar://problem/15715238>
Comment 2 Yongjun Zhang 2014-01-09 23:27:19 PST
Created attachment 220809 [details]
Patch, immediately clear unparented tiles under memory pressure.
Comment 3 WebKit Commit Bot 2014-01-09 23:28:16 PST
Attachment 220809 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/WebCore.exp.in', u'Source/WebCore/WebCore.xcodeproj/project.pbxproj', u'Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp', u'Source/WebCore/platform/graphics/ca/mac/TileController.h', u'Source/WebCore/platform/graphics/ca/mac/TileController.mm', u'Source/WebCore/platform/ios/TileControllerMemoryHandlerIOS.cpp', u'Source/WebCore/platform/ios/TileControllerMemoryHandlerIOS.h', u'Source/WebKit/mac/ChangeLog', u'Source/WebKit/mac/WebView/WebView.mm', '--commit-queue']" exit_code: 1
ERROR: Source/WebCore/platform/ios/TileControllerMemoryHandlerIOS.h:26:  #ifndef header guard has wrong style, please use: TileControllerMemoryHandlerIOS_h  [build/header_guard] [5]
ERROR: Source/WebCore/platform/ios/TileControllerMemoryHandlerIOS.h:39:  The parameter name "controller" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/platform/ios/TileControllerMemoryHandlerIOS.h:40:  The parameter name "controller" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/platform/ios/TileControllerMemoryHandlerIOS.h:44:  Missing space inside { }.  [whitespace/braces] [5]
Total errors found: 4 in 10 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Yongjun Zhang 2014-01-09 23:31:03 PST
Created attachment 220810 [details]
Fix style issues.
Comment 5 Pratik Solanki 2014-01-09 23:48:36 PST
Comment on attachment 220810 [details]
Fix style issues.

View in context: https://bugs.webkit.org/attachment.cgi?id=220810&action=review

> Source/WebCore/WebCore.xcodeproj/project.pbxproj:17833
> +		};

Odd move by Xcode. Maybe skip this part before commit?

> Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:3032
> +    float maxPixelDimension = systemMemoryLevel() < cMemoryLevelToUseSmallerPixelDimension ? cMaxPixelDimensionLowMemory : cMaxPixelDimension;

This should be int since cMaxPixelDimension is int.
Comment 6 Simon Fraser (smfr) 2014-01-10 08:46:51 PST
Comment on attachment 220810 [details]
Fix style issues.

View in context: https://bugs.webkit.org/attachment.cgi?id=220810&action=review

> Source/WebCore/platform/ios/TileControllerMemoryHandlerIOS.cpp:68
> +void TileControllerMemoryHandler::trimUnparentedTilesToTarget(unsigned target)

Use an int for the argument. Surprising things can happen using unsigned math.

> Source/WebCore/platform/ios/TileControllerMemoryHandlerIOS.h:40
> +    void updateForTileController(TileController*);

I think this would be better named tileControllerGainedUnparentedTiles() or similar.
Comment 7 Yongjun Zhang 2014-01-10 11:12:06 PST
Created attachment 220865 [details]
Address review comments before landing.
Comment 8 WebKit Commit Bot 2014-01-10 14:06:42 PST
Comment on attachment 220865 [details]
Address review comments before landing.

Clearing flags on attachment: 220865

Committed r161675: <http://trac.webkit.org/changeset/161675>
Comment 9 WebKit Commit Bot 2014-01-10 14:06:52 PST
All reviewed patches have been landed.  Closing bug.