afb7870f75
The Viewer slide list stores the values from repeated calls to Slide::getName().c_str() in a large list for filtering purposes. However, the temporary SkString was being destroyed before the list was complete. This luckily happened to work because SkString's refcounting behavior kept the internal buffer alive past the lifetime of the temporary SkString object, but it's not intended to work. Returning a const-ref to the internal SkString is more efficient, and gives us long-lived SkStrings to work with. Change-Id: I958148ba46332f9ec576ac60d0a9b916284c4761 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306256 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Auto-Submit: John Stiles <johnstiles@google.com> |
||
---|---|---|
animations | ||
bench | ||
bin | ||
build/fuchsia | ||
build_overrides | ||
client_utils/android | ||
demos.skia.org | ||
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.