39da10b556
Pushing the zero-initialization into the sk_malloc_etc call can be more efficient than a two-step malloc-and-then-memset, e.g. if the memory allocator gives us something from an already-known-zeroed region. Some microbenchmark numbers (milliseconds per decode) from running Chromium's image_decode_bench program on a few GIF files: Before After Ratio Filename Width x Height = Pixels 0.109 0.107 1.02 hat.gif 90 x 112 = 10080 7.062 6.879 1.03 harvesters.gif 1165 x 859 = 1000735 33.342 30.544 1.09 droids.gif 2560 x 1920 = 4915200 Ratio > 1.00 means a performance improvement. image_decode_bench comes from: https://cs.chromium.org/chromium/src/third_party/blink/renderer/platform/testing/image_decode_bench.cc hat.gif and harvesters.gif come from: https://github.com/google/wuffs/tree/master/test/data droids.gif comes from: https://cs.chromium.org/chromium/src/third_party/blink/perf_tests/image_decoder/resources/ These are x86_64 Broadwell numbers. I don't have ARM numbers readily available, but nothing about this commit should be arch-specific. Bug: skia:8235 Change-Id: Icf45b7ac5b7194eaab455628e44d4aedf30ddbfe Reviewed-on: https://skia-review.googlesource.com/c/skia/+/254836 Commit-Queue: Leon Scroggins <scroggo@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com> |
||
---|---|---|
animations | ||
bench | ||
bin | ||
build/fuchsia | ||
build_overrides | ||
dm | ||
docker | ||
docs/examples | ||
example | ||
experimental | ||
fuzz | ||
gm | ||
gn | ||
include | ||
infra | ||
modules | ||
platform_tools | ||
resources | ||
samplecode | ||
site | ||
specs | ||
src | ||
tests | ||
third_party | ||
tools | ||
.clang-format | ||
.clang-tidy | ||
.gitignore | ||
.gn | ||
AUTHORS | ||
BUILD.gn | ||
codereview.settings | ||
CONTRIBUTING | ||
CQ_COMMITTERS | ||
DEPS | ||
go.mod | ||
go.sum | ||
LICENSE | ||
OWNERS | ||
PRESUBMIT.py | ||
public.bzl | ||
README | ||
README.chromium | ||
RELEASE_NOTES.txt | ||
whitespace.txt |
Skia is a complete 2D graphic library for drawing Text, Geometries, and Images. See full details, and build instructions, at https://skia.org.