Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1090)

Unified Diff: skia/config/sk_ref_cnt_ext_debug.h

Issue 1691073002: Add plumbing in blink to allow overriding the skia font manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/child/font_warmup_win.cc ('k') | skia/config/sk_ref_cnt_ext_release.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/config/sk_ref_cnt_ext_debug.h
diff --git a/skia/config/sk_ref_cnt_ext_debug.h b/skia/config/sk_ref_cnt_ext_debug.h
index 78a39a3789f23cb5cbc2a9f23c74a60ec4a5c5ae..bcfcb451a9c4245fa0ddc70a545fd6d100ee5015 100644
--- a/skia/config/sk_ref_cnt_ext_debug.h
+++ b/skia/config/sk_ref_cnt_ext_debug.h
@@ -11,16 +11,23 @@
#include <atomic>
+class SkRefCnt;
+
+namespace WTF {
+ void adopted(const SkRefCnt*);
+ void requireAdoption(const SkRefCnt*);
+}
+
// Alternate implementation of SkRefCnt for Chromium debug builds
class SK_API SkRefCnt : public SkRefCntBase {
public:
SkRefCnt();
~SkRefCnt() override;
void ref() const { SkASSERT(flags_.load() != AdoptionRequired_Flag); SkRefCntBase::ref(); }
- void adopted() const { flags_ |= Adopted_Flag; }
- void requireAdoption() const { flags_ |= AdoptionRequired_Flag; }
void deref() const { SkRefCntBase::unref(); }
private:
Ilya Kulshin 2016/02/11 20:40:18 Note: the actual change here is moving adopted() a
+ void adopted() const { flags_ |= Adopted_Flag; }
+ void requireAdoption() const { flags_ |= AdoptionRequired_Flag; }
enum {
Adopted_Flag = 0x1,
@@ -28,6 +35,9 @@ private:
};
mutable std::atomic<int> flags_;
+
+ friend void WTF::adopted(const SkRefCnt*);
+ friend void WTF::requireAdoption(const SkRefCnt*);
};
inline SkRefCnt::SkRefCnt() : flags_(0) { }
@@ -49,8 +59,5 @@ namespace WTF {
}
};
-using WTF::adopted;
-using WTF::requireAdoption;
-
#endif
« no previous file with comments | « content/child/font_warmup_win.cc ('k') | skia/config/sk_ref_cnt_ext_release.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698