Bumping manifests a=b2g-bump
[gecko.git] / gfx / thebes / gfxPlatformMac.h
blob11c08e5d18374f66fbf4fd7868e5b1a86776e7f9
1 /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef GFX_PLATFORM_MAC_H
7 #define GFX_PLATFORM_MAC_H
9 #include "nsTArrayForwardDeclare.h"
10 #include "gfxPlatform.h"
12 #define MAC_OS_X_VERSION_10_6_HEX 0x00001060
13 #define MAC_OS_X_VERSION_10_7_HEX 0x00001070
15 #define MAC_OS_X_MAJOR_VERSION_MASK 0xFFFFFFF0U
17 namespace mozilla { namespace gfx { class DrawTarget; }}
19 class gfxPlatformMac : public gfxPlatform {
20 public:
21 gfxPlatformMac();
22 virtual ~gfxPlatformMac();
24 static gfxPlatformMac *GetPlatform() {
25 return (gfxPlatformMac*) gfxPlatform::GetPlatform();
28 virtual already_AddRefed<gfxASurface>
29 CreateOffscreenSurface(const IntSize& size,
30 gfxContentType contentType) MOZ_OVERRIDE;
32 mozilla::TemporaryRef<mozilla::gfx::ScaledFont>
33 GetScaledFontForFont(mozilla::gfx::DrawTarget* aTarget, gfxFont *aFont);
35 nsresult GetStandardFamilyName(const nsAString& aFontName, nsAString& aFamilyName);
37 gfxFontGroup*
38 CreateFontGroup(const mozilla::FontFamilyList& aFontFamilyList,
39 const gfxFontStyle *aStyle,
40 gfxUserFontSet *aUserFontSet);
42 virtual gfxFontEntry* LookupLocalFont(const gfxProxyFontEntry *aProxyEntry,
43 const nsAString& aFontName);
45 virtual gfxPlatformFontList* CreatePlatformFontList();
47 virtual gfxFontEntry* MakePlatformFont(const gfxProxyFontEntry *aProxyEntry,
48 const uint8_t *aFontData,
49 uint32_t aLength);
51 bool IsFontFormatSupported(nsIURI *aFontURI, uint32_t aFormatFlags);
53 nsresult GetFontList(nsIAtom *aLangGroup,
54 const nsACString& aGenericFamily,
55 nsTArray<nsString>& aListOfFonts);
56 nsresult UpdateFontList();
58 virtual void GetCommonFallbackFonts(const uint32_t aCh,
59 int32_t aRunScript,
60 nsTArray<const char*>& aFontList);
62 bool UseAcceleratedCanvas();
64 // lower threshold on font anti-aliasing
65 uint32_t GetAntiAliasingThreshold() { return mFontAntiAliasingThreshold; }
67 private:
68 virtual void GetPlatformCMSOutputProfile(void* &mem, size_t &size);
70 // read in the pref value for the lower threshold on font anti-aliasing
71 static uint32_t ReadAntiAliasingThreshold();
73 uint32_t mFontAntiAliasingThreshold;
76 #endif /* GFX_PLATFORM_MAC_H */