зеркало из https://github.com/mozilla/gecko-dev.git
Bug 942268 - Add RecordedEvent::GetEventName. r=mstange
This commit is contained in:
Родитель
976a163b61
Коммит
823e01695d
|
@ -64,6 +64,69 @@ RecordedEvent::LoadEventFromStream(std::istream &aStream, EventType aType)
|
|||
}
|
||||
}
|
||||
|
||||
string
|
||||
RecordedEvent::GetEventName(EventType aType)
|
||||
{
|
||||
switch (aType) {
|
||||
case DRAWTARGETCREATION:
|
||||
return "DrawTarget Creation";
|
||||
case DRAWTARGETDESTRUCTION:
|
||||
return "DrawTarget Destruction";
|
||||
case FILLRECT:
|
||||
return "FillRect";
|
||||
case STROKERECT:
|
||||
return "StrokeRect";
|
||||
case STROKELINE:
|
||||
return "StrokeLine";
|
||||
case CLEARRECT:
|
||||
return "ClearRect";
|
||||
case COPYSURFACE:
|
||||
return "CopySurface";
|
||||
case SETTRANSFORM:
|
||||
return "SetTransform";
|
||||
case PUSHCLIP:
|
||||
return "PushClip";
|
||||
case PUSHCLIPRECT:
|
||||
return "PushClipRect";
|
||||
case POPCLIP:
|
||||
return "PopClip";
|
||||
case FILL:
|
||||
return "Fill";
|
||||
case FILLGLYPHS:
|
||||
return "FillGlyphs";
|
||||
case MASK:
|
||||
return "Mask";
|
||||
case STROKE:
|
||||
return "Stroke";
|
||||
case DRAWSURFACE:
|
||||
return "DrawSurface";
|
||||
case DRAWSURFACEWITHSHADOW:
|
||||
return "DrawSurfaceWithShadow";
|
||||
case PATHCREATION:
|
||||
return "PathCreation";
|
||||
case PATHDESTRUCTION:
|
||||
return "PathDestruction";
|
||||
case SOURCESURFACECREATION:
|
||||
return "SourceSurfaceCreation";
|
||||
case SOURCESURFACEDESTRUCTION:
|
||||
return "SourceSurfaceDestruction";
|
||||
case GRADIENTSTOPSCREATION:
|
||||
return "GradientStopsCreation";
|
||||
case GRADIENTSTOPSDESTRUCTION:
|
||||
return "GradientStopsDestruction";
|
||||
case SNAPSHOT:
|
||||
return "Snapshot";
|
||||
case SCALEDFONTCREATION:
|
||||
return "ScaledFontCreation";
|
||||
case SCALEDFONTDESTRUCTION:
|
||||
return "ScaledFontDestruction";
|
||||
case MASKSURFACE:
|
||||
return "MaskSurface";
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
RecordedEvent::RecordPatternData(std::ostream &aStream, const PatternStorage &aPattern) const
|
||||
{
|
||||
|
|
|
@ -164,6 +164,10 @@ public:
|
|||
MASKSURFACE
|
||||
};
|
||||
|
||||
static const uint32_t kTotalEventTypes = RecordedEvent::MASKSURFACE + 1;
|
||||
|
||||
static std::string GetEventName(EventType aType);
|
||||
|
||||
virtual void PlayEvent(Translator *aTranslator) const {}
|
||||
|
||||
virtual void RecordToStream(std::ostream &aStream) const {}
|
||||
|
|
Загрузка…
Ссылка в новой задаче