aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkRefCnt.h
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-06-22 12:41:43 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-06-22 12:41:43 +0000
commit15c0fea699b25343fe6f49668a5632866e1a0306 (patch)
tree0616bf4168b4d98e02ae7cabf95623ef7ccb4fa5 /include/core/SkRefCnt.h
parent5e2412983183f9c4075a795278f3ca4ffee0ed79 (diff)
AutoScratchTexture can now release its texture and it will return to the texture cache when freed
Diffstat (limited to 'include/core/SkRefCnt.h')
-rw-r--r--include/core/SkRefCnt.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/core/SkRefCnt.h b/include/core/SkRefCnt.h
index a00bc3e3f1..28a475bfd6 100644
--- a/include/core/SkRefCnt.h
+++ b/include/core/SkRefCnt.h
@@ -80,7 +80,10 @@ private:
#endif
SkDELETE(this);
}
+
friend class SkWeakRefCnt;
+ friend class GrTexture; // to allow GrTexture's internal_dispose to
+ // call SkRefCnt's & directly set fRefCnt (to 1)
mutable int32_t fRefCnt;