summaryrefslogtreecommitdiff
path: root/gfx
diff options
context:
space:
mode:
authorJob Bautista <jobbautista9@aol.com>2023-04-05 19:36:10 +0800
committerJob Bautista <jobbautista9@protonmail.com>2023-04-05 21:22:18 +0800
commit5e50b32a3c56cea2df0e50524419074075055555 (patch)
tree2b319cbf682d282d8755a13c56ddbb7626c11faa /gfx
parent82bce1935f9dd4a03ed3e91e94b0fac75f636d6f (diff)
downloaduxp-5e50b32a3c56cea2df0e50524419074075055555.tar.gz
Issue #2191 - Remove virtual from gfxFont::GetCairoScaledFont.
Backported from Mozilla bug 1385029.
Diffstat (limited to 'gfx')
-rw-r--r--gfx/thebes/gfxDWriteFonts.cpp6
-rw-r--r--gfx/thebes/gfxDWriteFonts.h4
-rw-r--r--gfx/thebes/gfxFont.h2
3 files changed, 6 insertions, 6 deletions
diff --git a/gfx/thebes/gfxDWriteFonts.cpp b/gfx/thebes/gfxDWriteFonts.cpp
index 2db9dc5aed..22507246e1 100644
--- a/gfx/thebes/gfxDWriteFonts.cpp
+++ b/gfx/thebes/gfxDWriteFonts.cpp
@@ -458,7 +458,7 @@ gfxDWriteFont::GetSpaceGlyph()
bool
gfxDWriteFont::SetupCairoFont(DrawTarget* aDrawTarget)
{
- cairo_scaled_font_t *scaledFont = GetCairoScaledFont();
+ cairo_scaled_font_t *scaledFont = InitCairoScaledFont();
if (cairo_scaled_font_status(scaledFont) != CAIRO_STATUS_SUCCESS) {
// Don't cairo_set_scaled_font as that would propagate the error to
// the cairo_t, precluding any further drawing.
@@ -495,7 +495,7 @@ gfxDWriteFont::CairoFontFace()
cairo_scaled_font_t *
-gfxDWriteFont::GetCairoScaledFont()
+gfxDWriteFont::InitCairoScaledFont()
{
if (!mScaledFont) {
cairo_matrix_t sizeMatrix;
@@ -693,7 +693,7 @@ gfxDWriteFont::GetScaledFont(mozilla::gfx::DrawTarget *aTarget)
if (aTarget->GetBackendType() == BackendType::CAIRO) {
if (!mAzureScaledFont->GetCairoScaledFont()) {
- cairo_scaled_font_t* cairoScaledFont = GetCairoScaledFont();
+ cairo_scaled_font_t* cairoScaledFont = InitCairoScaledFont();
if (!cairoScaledFont) {
return nullptr;
}
diff --git a/gfx/thebes/gfxDWriteFonts.h b/gfx/thebes/gfxDWriteFonts.h
index 964401b43a..f701b26153 100644
--- a/gfx/thebes/gfxDWriteFonts.h
+++ b/gfx/thebes/gfxDWriteFonts.h
@@ -69,9 +69,9 @@ public:
virtual already_AddRefed<mozilla::gfx::ScaledFont>
GetScaledFont(mozilla::gfx::DrawTarget *aTarget) override;
- virtual cairo_scaled_font_t *GetCairoScaledFont() override;
-
protected:
+ cairo_scaled_font_t *InitCairoScaledFont();
+
virtual const Metrics& GetHorizontalMetrics() override;
bool GetFakeMetricsForArialBlack(DWRITE_FONT_METRICS *aFontMetrics);
diff --git a/gfx/thebes/gfxFont.h b/gfx/thebes/gfxFont.h
index 668e0a1d5d..f3e533d339 100644
--- a/gfx/thebes/gfxFont.h
+++ b/gfx/thebes/gfxFont.h
@@ -1452,7 +1452,7 @@ public:
const nsString& GetName() const { return mFontEntry->Name(); }
const gfxFontStyle *GetStyle() const { return &mStyle; }
- virtual cairo_scaled_font_t* GetCairoScaledFont() { return mScaledFont; }
+ cairo_scaled_font_t* GetCairoScaledFont() { return mScaledFont; }
virtual gfxFont* CopyWithAntialiasOption(AntialiasOption anAAOption) {
// platforms where this actually matters should override