1 /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*-
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_ANDROID_H
7 #define GFX_PLATFORM_ANDROID_H
9 #include "gfxPlatform.h"
10 #include "gfxUserFontSet.h"
14 class gfxAndroidPlatform final
: public gfxPlatform
{
17 virtual ~gfxAndroidPlatform();
19 static gfxAndroidPlatform
* GetPlatform() {
20 return (gfxAndroidPlatform
*)gfxPlatform::GetPlatform();
23 already_AddRefed
<gfxASurface
> CreateOffscreenSurface(
24 const IntSize
& aSize
, gfxImageFormat aFormat
) override
;
26 gfxImageFormat
GetOffscreenFormat() override
{ return mOffscreenFormat
; }
28 // platform implementations of font functions
29 bool CreatePlatformFontList() override
;
31 void ReadSystemFontList(mozilla::dom::SystemFontList
*) override
;
33 void GetCommonFallbackFonts(uint32_t aCh
, Script aRunScript
,
34 eFontPresentation aPresentation
,
35 nsTArray
<const char*>& aFontList
) override
;
37 bool FontHintingEnabled() override
;
38 bool RequiresLinearZoom() override
;
40 already_AddRefed
<mozilla::gfx::VsyncSource
> CreateGlobalHardwareVsyncSource()
43 static bool CheckVariationFontSupport();
46 void InitAcceleration() override
;
48 bool AccelerateLayersByDefault() override
{ return true; }
51 gfxImageFormat mOffscreenFormat
;
54 #endif /* GFX_PLATFORM_ANDROID_H */