Bug 1273148: Make name and default methods public, and remove gfxWindowsPlatform as gfxPref's friend. r?dvander
MozReview-Commit-ID: DNqGGDl1Fpy
--- a/gfx/thebes/gfxPrefs.h
+++ b/gfx/thebes/gfxPrefs.h
@@ -57,28 +57,26 @@
// This is true even for 'Once' prefs which otherwise do not change if the
// pref is updated after initialization.
#define DECL_GFX_PREF(Update, Pref, Name, Type, Default) \
public: \
static Type Name() { MOZ_ASSERT(SingletonExists()); return GetSingleton().mPref##Name.mValue; } \
static void Set##Name(Type aVal) { MOZ_ASSERT(SingletonExists()); \
GetSingleton().mPref##Name.Set(UpdatePolicy::Update, Get##Name##PrefName(), aVal); } \
-private: \
static const char* Get##Name##PrefName() { return Pref; } \
static Type Get##Name##PrefDefault() { return Default; } \
+private: \
PrefTemplate<UpdatePolicy::Update, Type, Get##Name##PrefDefault, Get##Name##PrefName> mPref##Name
class PreferenceAccessImpl;
class gfxPrefs;
class gfxPrefs final
{
- friend class gfxWindowsPlatform;
-
-private:
+ private:
/// See Logging.h. This lets Moz2D access preference values it owns.
PreferenceAccessImpl* mMoz2DPrefAccess;
private:
// Enums for the update policy.
enum class UpdatePolicy {
Skip, // Set the value to default, skip any Preferences calls
Once, // Evaluate the preference once, unchanged during the session