Bug 1874684 - Part 28: Return DateDuration from DifferenceISODateTime. r=mgaudet
[gecko.git] / gfx / thebes / gfxAndroidPlatform.h
blob598acdb571fb6b66265602e18d0e2a2cac524af3
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"
11 #include "nsCOMPtr.h"
12 #include "nsTArray.h"
14 class gfxAndroidPlatform final : public gfxPlatform {
15 public:
16 gfxAndroidPlatform();
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()
41 override;
43 static bool CheckVariationFontSupport();
45 protected:
46 void InitAcceleration() override;
48 bool AccelerateLayersByDefault() override { return true; }
50 private:
51 gfxImageFormat mOffscreenFormat;
54 #endif /* GFX_PLATFORM_ANDROID_H */