DescriptionFor non-opaque SkBitmapDevices, replace malloc-then-zero with calloc.
There seem about a zillion possible ways to slice this.
This adds and uses SkMallocPixelRef::ZeroedPRFactory.
I'm not married to it.
This appears to clear up a hot spot in the benchmark referenced in this bug:
BUG=516426
I'm not confident enough on Windows to declare that definitively yet.
It probably helps all other non-opaque layers too. Possibly significantly.
So I don't forget, I profiled this:
out/Release/performance_browser_tests.exe --gtest_filter=TabCapturePerformanceTest.Performance/2 --single-process
No diffs:
https://gold.skia.org/search2?issue=1430593007&unt=true&query=source_type%3Dgm&master=false
TBR=reed@google.com
Committed: https://skia.googlesource.com/skia/+/cd4954152490c7492284a7914571531ba8c75b4a
Patch Set 1 #
Messages
Total messages: 16 (9 generated)
|