Bug 1377328 - part 1 - Annotate some font-related helper classes as MOZ_STACK_CLASS. r=milan

This commit is contained in:
Jonathan Kew 2017-06-29 17:52:38 -07:00
parent ba3aeb0481
commit 4ea7df6c56
5 changed files with 10 additions and 10 deletions

View File

@ -49,7 +49,7 @@ public:
typedef gfxTextRun::Range Range;
typedef mozilla::gfx::DrawTarget DrawTarget;
struct Params
struct MOZ_STACK_CLASS Params
{
nsIAtom* language = nullptr;
bool explicitLanguage = false;

View File

@ -337,7 +337,7 @@ protected:
static gfxFontCache *gGlobalCache;
struct Key {
struct MOZ_STACK_CLASS Key {
const gfxFontEntry* mFontEntry;
const gfxFontStyle* mStyle;
const gfxCharacterMap* mUnicodeRangeMap;
@ -543,7 +543,7 @@ public:
/**
* This record contains all the parameters needed to initialize a textrun.
*/
struct Parameters {
struct MOZ_STACK_CLASS Parameters {
// Shape text params suggesting where the textrun will be rendered
DrawTarget *mDrawTarget;
// Pointer to arbitrary user data (which should outlive the textrun)
@ -2221,7 +2221,7 @@ protected:
// The TextRunDrawParams are set up once per textrun; the FontDrawParams
// are dependent on the specific font, so they are set per GlyphRun.
struct TextRunDrawParams {
struct MOZ_STACK_CLASS TextRunDrawParams {
RefPtr<mozilla::gfx::DrawTarget> dt;
gfxContext *context;
gfxFont::Spacing *spacing;
@ -2240,7 +2240,7 @@ struct TextRunDrawParams {
bool paintSVGGlyphs;
};
struct FontDrawParams {
struct MOZ_STACK_CLASS FontDrawParams {
RefPtr<mozilla::gfx::ScaledFont> scaledFont;
RefPtr<mozilla::gfx::GlyphRenderingOptions> renderingOptions;
mozilla::SVGContextPaint *contextPaint;
@ -2254,7 +2254,7 @@ struct FontDrawParams {
bool haveColorGlyphs;
};
struct EmphasisMarkDrawParams {
struct MOZ_STACK_CLASS EmphasisMarkDrawParams {
gfxContext* context;
gfxFont::Spacing* spacing;
gfxTextRun* mark;

View File

@ -561,7 +561,7 @@ HasNonOpaqueNonTransparentColor(gfxContext *aContext, Color& aCurrentColorOut)
}
// helper class for double-buffering drawing with non-opaque color
struct BufferAlphaColor {
struct MOZ_STACK_CLASS BufferAlphaColor {
explicit BufferAlphaColor(gfxContext *aContext)
: mContext(aContext)
{

View File

@ -241,7 +241,7 @@ public:
virtual uint32_t GetAppUnitsPerDevUnit() const = 0;
};
struct DrawParams
struct MOZ_STACK_CLASS DrawParams
{
gfxContext* context;
DrawMode drawMode = DrawMode::GLYPH_FILL;
@ -464,7 +464,7 @@ public:
uint8_t mMatchType;
};
class GlyphRunIterator {
class MOZ_STACK_CLASS GlyphRunIterator {
public:
GlyphRunIterator(const gfxTextRun *aTextRun, Range aRange)
: mTextRun(aTextRun)

View File

@ -171,7 +171,7 @@ gfxUserFontEntry::CreateFontInstance(const gfxFontStyle* aFontStyle, bool aNeeds
return nullptr;
}
class gfxOTSContext : public ots::OTSContext {
class MOZ_STACK_CLASS gfxOTSContext : public ots::OTSContext {
public:
explicit gfxOTSContext(gfxUserFontEntry* aUserFontEntry)
: mUserFontEntry(aUserFontEntry)