aboutsummaryrefslogtreecommitdiff
path: root/src/image
diff options
context:
space:
mode:
authorMike Klein <mtklein@chromium.org>2018-10-30 07:53:43 -0400
committerSkia Commit-Bot <skia-commit-bot@chromium.org>2018-10-30 13:26:12 +0000
commit0fb1ee98cf7dfb87a3b376de8e0dff28c1b95619 (patch)
tree864609c8c71bb5a736a781d213cf8f5de604816c /src/image
parentc23d1ab9b0ae86a81d1c6ec62d0a4d5a70410a1f (diff)
downloadskqp-0fb1ee98cf7dfb87a3b376de8e0dff28c1b95619.tar.gz
replace SkNVRefCnt with SkRefCnt
SkNVRefCnt trades a small amount of code size (vtable) and runtime (vptr) memory usage for a larger amount of code size (templating). It was written back in a time when all we were really thinking about was runtime memory usage, so I'm curious to see where performance, code size, and memory usage all move if it's removed. Looking at the types I've changed here, my guess is that performance and memory usage will be basically unchanged, and that code size will drop a bit. Nothing else it's nicer to have only one ref-counting base class. Change-Id: I7d56a2b9e2b9fb000ff97792159ea1ff4f5e6f13 Reviewed-on: https://skia-review.googlesource.com/c/166203 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
Diffstat (limited to 'src/image')
-rw-r--r--src/image/SkImage_Lazy.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/image/SkImage_Lazy.cpp b/src/image/SkImage_Lazy.cpp
index 2107251687..b5f72e388f 100644
--- a/src/image/SkImage_Lazy.cpp
+++ b/src/image/SkImage_Lazy.cpp
@@ -28,7 +28,7 @@
#endif
// Ref-counted tuple(SkImageGenerator, SkMutex) which allows sharing one generator among N images
-class SharedGenerator final : public SkNVRefCnt<SharedGenerator> {
+class SharedGenerator final : public SkRefCnt {
public:
static sk_sp<SharedGenerator> Make(std::unique_ptr<SkImageGenerator> gen) {
return gen ? sk_sp<SharedGenerator>(new SharedGenerator(std::move(gen))) : nullptr;