mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Add a fixed-width font for the compositor's debug overlay. (bug 1352151 part 9, r=bas)
--HG-- extra : rebase_source : dc65a2bfb0bb166b5f116f04e2b5ecc395578ba5
This commit is contained in:
parent
3ffc9da44f
commit
fc959f3460
34
gfx/layers/composite/ConsolasFontData.h
Normal file
34
gfx/layers/composite/ConsolasFontData.h
Normal file
File diff suppressed because one or more lines are too long
@ -638,8 +638,9 @@ LayerManagerComposite::RenderDebugOverlay(const IntRect& aBounds)
|
||||
text,
|
||||
IntPoint(2, 5),
|
||||
Matrix4x4(),
|
||||
30,
|
||||
650);
|
||||
24,
|
||||
600,
|
||||
TextRenderer::FontType::FixedWidth);
|
||||
|
||||
if (mUnusedApzTransformWarning) {
|
||||
// If we have an unused APZ transform on this composite, draw a 20x20 red box
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
#include "TextRenderer.h"
|
||||
#include "FontData.h"
|
||||
#include "ConsolasFontData.h"
|
||||
#include "png.h"
|
||||
#include "mozilla/Base64.h"
|
||||
#include "mozilla/layers/Compositor.h"
|
||||
@ -186,9 +187,11 @@ TextRenderer::GetFontInfo(FontType aType)
|
||||
switch (aType) {
|
||||
case FontType::Default:
|
||||
return &sDefaultCompositorFont;
|
||||
break;
|
||||
case FontType::FixedWidth:
|
||||
return &sFixedWidthCompositorFont;
|
||||
default:
|
||||
MOZ_ASSERT_UNREACHABLE("unknown font type");
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,6 +28,7 @@ public:
|
||||
|
||||
enum class FontType {
|
||||
Default,
|
||||
FixedWidth,
|
||||
NumTypes
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user