DescriptionUse preferred format to allocate memory for decoded images
We use fixed color format (kN32_SkColorType) to decode images. Since the default
preferred format is 16-bit color on low-end devices, we can reduce memory
footprint by storing decoded image in 16-bit color format when we use the
default settings for the preferred format. This CL makes
SoftwareImageDecodeController allocate memory based on the preferred format.
I ran memory.blink_memory_mobile 20 times. The results can be found at [1].
I removed SimulateMemoryPressureNotification() so that I can observe memory usage in
common patterns (still, memory pressure notifications would be sent if memory
usage is high). According to the results, we could reduce ~40% discardable
memory on average.
Note that Blink still uses fixed 32-bit color for decoding. This means that
skia/cc will convert decoded images when we store decoded image in 16-bit color.
We might want to make Blink's decoding format configurable in the future.
[1] https://drive.google.com/file/d/0B6NYyLPujP4TaWItc3lsZXR6TTg/view?usp=sharing
BUG=519146
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Committed: https://crrev.com/0c87a7ea398b77020298f09abe3fd946a0627603
Cr-Commit-Position: refs/heads/master@{#381859}
Patch Set 1 #
Total comments: 2
Patch Set 2 : Addressed comment #
Total comments: 5
Patch Set 3 : #
Total comments: 1
Messages
Total messages: 20 (7 generated)
|