Issue #2191 - Make ScaledFont::SetCairoScaledFont virtual so it can be accessed from outside Moz2D.

Backported from Mozilla bug 1385029.
This commit is contained in:
Job Bautista 2023-04-05 18:31:13 +08:00 committed by roytam1
commit c54e2502b0
2 changed files with 5 additions and 2 deletions

View file

@ -718,6 +718,9 @@ public:
return mUserData.Get(key);
}
virtual cairo_scaled_font_t* GetCairoScaledFont() { return nullptr; }
virtual void SetCairoScaledFont(cairo_scaled_font_t* font) {}
protected:
ScaledFont() {}

View file

@ -48,8 +48,8 @@ public:
#ifdef USE_CAIRO_SCALED_FONT
bool PopulateCairoScaledFont();
cairo_scaled_font_t* GetCairoScaledFont() { return mScaledFont; }
void SetCairoScaledFont(cairo_scaled_font_t* font);
virtual cairo_scaled_font_t* GetCairoScaledFont() { return mScaledFont; }
virtual void SetCairoScaledFont(cairo_scaled_font_t* font);
#endif
protected: