Bug 1072313: P2 Prevent instanciating MacIOSurfaceLib directly. r=mattwoodrow

This class only contains static members.
This commit is contained in:
Jean-Yves Avenard 2015-09-23 13:34:40 +02:00
Родитель 2720809fc5
Коммит 6162494721
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -62,7 +62,7 @@ enum CGContextType {
CGContextType GetContextType(CGContextRef ref); CGContextType GetContextType(CGContextRef ref);
class MacIOSurface : public mozilla::external::AtomicRefCounted<MacIOSurface> { class MacIOSurface final : public mozilla::external::AtomicRefCounted<MacIOSurface> {
public: public:
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(MacIOSurface) MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(MacIOSurface)
typedef mozilla::gfx::SourceSurface SourceSurface; typedef mozilla::gfx::SourceSurface SourceSurface;
@ -82,7 +82,7 @@ public:
explicit MacIOSurface(const void *aIOSurfacePtr, explicit MacIOSurface(const void *aIOSurfacePtr,
double aContentsScaleFactor = 1.0, double aContentsScaleFactor = 1.0,
bool aHasAlpha = true); bool aHasAlpha = true);
virtual ~MacIOSurface(); ~MacIOSurface();
IOSurfaceID GetIOSurfaceID(); IOSurfaceID GetIOSurfaceID();
void *GetBaseAddress(); void *GetBaseAddress();
void *GetBaseAddressOfPlane(size_t planeIndex); void *GetBaseAddressOfPlane(size_t planeIndex);
@ -125,9 +125,9 @@ private:
bool mHasAlpha; bool mHasAlpha;
}; };
class MacIOSurfaceLib: public MacIOSurface { class MacIOSurfaceLib {
public: public:
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(MacIOSurfaceLib) MacIOSurfaceLib() = delete;
static void *sIOSurfaceFramework; static void *sIOSurfaceFramework;
static void *sOpenGLFramework; static void *sOpenGLFramework;
static void *sCoreGraphicsFramework; static void *sCoreGraphicsFramework;