Bug 1728152 - Drop unused TextRenderer code. r=aosmond

Differential Revision: https://phabricator.services.mozilla.com/D123968
This commit is contained in:
Jeff Muizelaar 2021-08-30 19:37:34 +00:00
Родитель 1c1c20f331
Коммит 44f613fece
4 изменённых файлов: 0 добавлений и 799 удалений

Просмотреть файл

@ -1,457 +0,0 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// This is explicitly not guarded as we want only 1 file to include this and
// it's good if things break if someone else does.
namespace mozilla {
namespace layers {
namespace consolas_font {
const unsigned char sFontPNG[] = {
0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd,
0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0,
0x8, 0x0, 0x0, 0x0, 0x0, 0x79, 0x19, 0xf7, 0xba, 0x0, 0x0, 0x0,
0x4, 0x67, 0x41, 0x4d, 0x41, 0x0, 0x0, 0xb1, 0x8f, 0xb, 0xfc, 0x61,
0x5, 0x0, 0x0, 0x0, 0x20, 0x63, 0x48, 0x52, 0x4d, 0x0, 0x0, 0x7a,
0x26, 0x0, 0x0, 0x80, 0x84, 0x0, 0x0, 0xfa, 0x0, 0x0, 0x0, 0x80,
0xe8, 0x0, 0x0, 0x75, 0x30, 0x0, 0x0, 0xea, 0x60, 0x0, 0x0, 0x3a,
0x98, 0x0, 0x0, 0x17, 0x70, 0x9c, 0xba, 0x51, 0x3c, 0x0, 0x0, 0x0,
0x2, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x87, 0x8f, 0xcc, 0xbf, 0x0,
0x0, 0x0, 0x9, 0x70, 0x48, 0x59, 0x73, 0x0, 0x0, 0x19, 0xd6, 0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x3, 0xe8, 0xad,
0x40, 0x6f, 0xb9, 0x1, 0xf4, 0x56, 0xa0, 0xb7, 0xdc, 0x0, 0x7a, 0x2b,
0xd0, 0x5b, 0x6e, 0x0, 0xbd, 0x15, 0xe8, 0x2d, 0x37, 0x80, 0xde, 0xa,
0xf4, 0x96, 0x1b, 0x40, 0x6f, 0x5, 0x7a, 0xcb, 0xd, 0xa0, 0xb7, 0x2,
0xbd, 0xe5, 0x6, 0xd0, 0x5b, 0x81, 0xde, 0x72, 0x3, 0xe8, 0xad, 0x40,
0x6f, 0xf9, 0xf5, 0x0, 0xfe, 0x1, 0x35, 0x69, 0x45, 0xec, 0xa0, 0xf0,
0xdf, 0x8c, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61,
0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30,
0x31, 0x37, 0x2d, 0x30, 0x34, 0x2d, 0x30, 0x32, 0x54, 0x31, 0x38, 0x3a,
0x33, 0x39, 0x3a, 0x33, 0x37, 0x2b, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x98,
0xbb, 0xf, 0xb3, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64,
0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32,
0x30, 0x31, 0x37, 0x2d, 0x30, 0x34, 0x2d, 0x30, 0x32, 0x54, 0x31, 0x38,
0x3a, 0x33, 0x39, 0x3a, 0x33, 0x37, 0x2b, 0x30, 0x30, 0x3a, 0x30, 0x30,
0xe9, 0xe6, 0xb7, 0xf, 0x0, 0x0, 0x0, 0x11, 0x74, 0x45, 0x58, 0x74,
0x70, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x0, 0x55, 0x6e, 0x64, 0x65,
0x66, 0x69, 0x6e, 0x65, 0x64, 0xdb, 0xa5, 0x33, 0x1b, 0x0, 0x0, 0x0,
0x4a, 0x74, 0x45, 0x58, 0x74, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75,
0x72, 0x65, 0x0, 0x65, 0x34, 0x39, 0x30, 0x38, 0x64, 0x62, 0x62, 0x30,
0x62, 0x64, 0x38, 0x62, 0x36, 0x62, 0x66, 0x64, 0x32, 0x38, 0x39, 0x33,
0x34, 0x39, 0x38, 0x39, 0x35, 0x39, 0x39, 0x62, 0x66, 0x32, 0x66, 0x61,
0x39, 0x38, 0x63, 0x63, 0x33, 0x64, 0x35, 0x36, 0x35, 0x31, 0x39, 0x66,
0x36, 0x66, 0x36, 0x35, 0x31, 0x64, 0x61, 0x32, 0x65, 0x34, 0x36, 0x30,
0x34, 0x38, 0x38, 0x38, 0x33, 0x34, 0x35, 0xfb, 0xa7, 0xec, 0xfc, 0x0,
0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82};
} // namespace consolas_font
const unsigned int sGlyphWidth = 9;
const unsigned int sTextureWidth = 256;
const unsigned int sTextureHeight = 256;
const unsigned int sCellWidth = 24;
const unsigned int sCellHeight = 24;
const unsigned int sFirstChar = 32;
const FontBitmapInfo sFixedWidthCompositorFont = {
mozilla::Some(9),
mozilla::Nothing(),
256,
256,
24,
24,
32,
consolas_font::sFontPNG,
sizeof(consolas_font::sFontPNG)};
} // namespace layers
} // namespace mozilla

Просмотреть файл

@ -1,245 +0,0 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "TextRenderer.h"
#include "FontData.h"
#include "ConsolasFontData.h"
#include "png.h"
#include "mozilla/Base64.h"
#include "mozilla/layers/Compositor.h"
#include "mozilla/layers/TextureHost.h"
#include "mozilla/layers/Effects.h"
namespace mozilla {
namespace layers {
using namespace gfx;
const Float sBackgroundOpacity = 0.8f;
const SurfaceFormat sTextureFormat = SurfaceFormat::B8G8R8A8;
static void PNGAPI info_callback(png_structp png_ptr, png_infop info_ptr) {
png_read_update_info(png_ptr, info_ptr);
}
static void PNGAPI row_callback(png_structp png_ptr, png_bytep new_row,
png_uint_32 row_num, int pass) {
MOZ_ASSERT(sTextureFormat == SurfaceFormat::B8G8R8A8);
TextRenderer::FontCache* cache =
static_cast<TextRenderer::FontCache*>(png_get_progressive_ptr(png_ptr));
uint32_t* dst =
(uint32_t*)(cache->mMap.mData + cache->mMap.mStride * row_num);
for (uint32_t x = 0; x < cache->mInfo->mTextureWidth; x++) {
// We blend to a transparent white background, this will make text readable
// even if it's on a dark background. Without hurting our ability to
// interact with the content behind the text.
Float alphaValue = Float(0xFF - new_row[x]) / 255.0f;
Float baseValue = sBackgroundOpacity * (1.0f - alphaValue);
// FIXME(aosmond): PNGs may have color profiles. Should we be checking for
// that and performing color management?
sRGBColor pixelColor(baseValue, baseValue, baseValue,
baseValue + alphaValue);
dst[x] = pixelColor.ToABGR();
}
}
TextRenderer::~TextRenderer() = default;
TextRenderer::FontCache::~FontCache() { mGlyphBitmaps->Unmap(); }
void TextRenderer::RenderText(Compositor* aCompositor, const std::string& aText,
const IntPoint& aOrigin,
const Matrix4x4& aTransform, uint32_t aTextSize,
uint32_t aTargetPixelWidth, FontType aFontType) {
const FontBitmapInfo* info = GetFontInfo(aFontType);
// For now we only have a bitmap font with a 24px cell size, so we just
// scale it up if the user wants larger text.
Float scaleFactor = Float(aTextSize) / Float(info->mCellHeight);
aTargetPixelWidth /= scaleFactor;
RefPtr<TextureSource> src =
RenderText(aCompositor, aText, aTargetPixelWidth, aFontType);
if (!src) {
return;
}
RefPtr<EffectRGB> effect = new EffectRGB(src, true, SamplingFilter::LINEAR);
EffectChain chain;
chain.mPrimaryEffect = effect;
Matrix4x4 transform = aTransform;
transform.PreScale(scaleFactor, scaleFactor, 1.0f);
IntRect drawRect(aOrigin, src->GetSize());
IntRect clip(-10000, -10000, 20000, 20000);
aCompositor->DrawQuad(Rect(drawRect), clip, chain, 1.0f, transform);
}
IntSize TextRenderer::ComputeSurfaceSize(const std::string& aText,
uint32_t aTargetPixelWidth,
FontType aFontType) {
if (!EnsureInitialized(aFontType)) {
return IntSize();
}
FontCache* cache = mFonts[aFontType].get();
const FontBitmapInfo* info = cache->mInfo;
uint32_t numLines = 1;
uint32_t maxWidth = 0;
uint32_t lineWidth = 0;
// Calculate the size of the surface needed to draw all the glyphs.
for (uint32_t i = 0; i < aText.length(); i++) {
// Insert a line break if we go past the TargetPixelWidth.
// XXX - this has the downside of overrunning the intended width, causing
// things at the edge of a window to be cut off.
if (aText[i] == '\n' ||
(aText[i] == ' ' && lineWidth > aTargetPixelWidth)) {
numLines++;
lineWidth = 0;
continue;
}
lineWidth += info->GetGlyphWidth(aText[i]);
maxWidth = std::max(lineWidth, maxWidth);
}
return IntSize(maxWidth, numLines * info->mCellHeight);
}
RefPtr<TextureSource> TextRenderer::RenderText(TextureSourceProvider* aProvider,
const std::string& aText,
uint32_t aTargetPixelWidth,
FontType aFontType) {
if (!EnsureInitialized(aFontType)) {
return nullptr;
}
IntSize size = ComputeSurfaceSize(aText, aTargetPixelWidth, aFontType);
// Create a DrawTarget to draw our glyphs to.
RefPtr<DrawTarget> dt =
Factory::CreateDrawTarget(BackendType::SKIA, size, sTextureFormat);
RenderTextToDrawTarget(dt, aText, aTargetPixelWidth, aFontType);
RefPtr<SourceSurface> surf = dt->Snapshot();
RefPtr<DataSourceSurface> dataSurf = surf->GetDataSurface();
RefPtr<DataTextureSource> src = aProvider->CreateDataTextureSource();
if (!src->Update(dataSurf)) {
// Upload failed.
return nullptr;
}
return src;
}
void TextRenderer::RenderTextToDrawTarget(DrawTarget* aDrawTarget,
const std::string& aText,
uint32_t aTargetPixelWidth,
FontType aFontType) {
if (!EnsureInitialized(aFontType)) {
return;
}
// Initialize the DrawTarget to transparent white.
// FIXME(aosmond): Should the background be color managed if we color manage
// the glyphs or is this part of a mask?
IntSize size = aDrawTarget->GetSize();
aDrawTarget->FillRect(
Rect(0, 0, size.width, size.height),
ColorPattern(DeviceColor(1.0, 1.0, 1.0, sBackgroundOpacity)),
DrawOptions(1.0, CompositionOp::OP_SOURCE));
IntPoint currentPos;
FontCache* cache = mFonts[aFontType].get();
const FontBitmapInfo* info = cache->mInfo;
const unsigned int kGlyphsPerLine = info->mTextureWidth / info->mCellWidth;
// Copy our glyphs onto the DrawTarget.
for (uint32_t i = 0; i < aText.length(); i++) {
if (aText[i] == '\n' ||
(aText[i] == ' ' && currentPos.x > int32_t(aTargetPixelWidth))) {
currentPos.y += info->mCellHeight;
currentPos.x = 0;
continue;
}
uint32_t index = aText[i] - info->mFirstChar;
uint32_t cellIndexY = index / kGlyphsPerLine;
uint32_t cellIndexX = index - (cellIndexY * kGlyphsPerLine);
uint32_t glyphWidth = info->GetGlyphWidth(aText[i]);
IntRect srcRect(cellIndexX * info->mCellWidth,
cellIndexY * info->mCellHeight, glyphWidth,
info->mCellHeight);
aDrawTarget->CopySurface(cache->mGlyphBitmaps, srcRect, currentPos);
currentPos.x += glyphWidth;
}
}
/* static */ const FontBitmapInfo* TextRenderer::GetFontInfo(FontType aType) {
switch (aType) {
case FontType::Default:
return &sDefaultCompositorFont;
case FontType::FixedWidth:
return &sFixedWidthCompositorFont;
default:
MOZ_ASSERT_UNREACHABLE("unknown font type");
return nullptr;
}
}
bool TextRenderer::EnsureInitialized(FontType aType) {
if (mFonts[aType]) {
return true;
}
const FontBitmapInfo* info = GetFontInfo(aType);
IntSize size(info->mTextureWidth, info->mTextureHeight);
RefPtr<DataSourceSurface> surface =
Factory::CreateDataSourceSurface(size, sTextureFormat);
if (NS_WARN_IF(!surface)) {
return false;
}
DataSourceSurface::MappedSurface map;
if (NS_WARN_IF(!surface->Map(DataSourceSurface::MapType::READ_WRITE, &map))) {
return false;
}
UniquePtr<FontCache> cache = MakeUnique<FontCache>();
cache->mGlyphBitmaps = surface;
cache->mMap = map;
cache->mInfo = info;
png_structp png_ptr = NULL;
png_ptr =
png_create_read_struct(PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr);
png_set_progressive_read_fn(png_ptr, cache.get(), info_callback, row_callback,
nullptr);
png_infop info_ptr = NULL;
info_ptr = png_create_info_struct(png_ptr);
png_process_data(png_ptr, info_ptr, (uint8_t*)info->mPNG, info->mPNGLength);
png_destroy_read_struct(&png_ptr, &info_ptr, nullptr);
mFonts[aType] = std::move(cache);
return true;
}
} // namespace layers
} // namespace mozilla

Просмотреть файл

@ -1,95 +0,0 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GFX_TextRenderer_H
#define GFX_TextRenderer_H
#include "mozilla/EnumeratedArray.h"
#include "mozilla/gfx/2D.h"
#include "mozilla/UniquePtr.h"
#include "nsISupportsImpl.h"
#include <string>
namespace mozilla {
namespace layers {
class Compositor;
class TextureSource;
class TextureSourceProvider;
struct FontBitmapInfo;
class TextRenderer final {
~TextRenderer();
public:
NS_INLINE_DECL_REFCOUNTING(TextRenderer)
enum class FontType { Default, FixedWidth, NumTypes };
TextRenderer() = default;
RefPtr<TextureSource> RenderText(TextureSourceProvider* aProvider,
const std::string& aText,
uint32_t aTargetPixelWidth,
FontType aFontType);
void RenderText(Compositor* aCompositor, const std::string& aText,
const gfx::IntPoint& aOrigin,
const gfx::Matrix4x4& aTransform, uint32_t aTextSize,
uint32_t aTargetPixelWidth,
FontType aFontType = FontType::Default);
gfx::IntSize ComputeSurfaceSize(const std::string& aText,
uint32_t aTargetPixelWidth,
FontType aFontType = FontType::Default);
void RenderTextToDrawTarget(gfx::DrawTarget* aDrawTarget,
const std::string& aText,
uint32_t aTargetPixelWidth,
FontType aFontType = FontType::Default);
struct FontCache {
~FontCache();
RefPtr<gfx::DataSourceSurface> mGlyphBitmaps;
gfx::DataSourceSurface::MappedSurface mMap;
const FontBitmapInfo* mInfo;
};
protected:
// Note that this may still fail to set mGlyphBitmaps to a valid value
// if the underlying CreateDataSourceSurface fails for some reason.
bool EnsureInitialized(FontType aType);
static const FontBitmapInfo* GetFontInfo(FontType aType);
private:
EnumeratedArray<FontType, FontType::NumTypes, UniquePtr<FontCache>> mFonts;
};
struct FontBitmapInfo {
Maybe<unsigned int> mGlyphWidth;
Maybe<const unsigned short*> mGlyphWidths;
unsigned int mTextureWidth;
unsigned int mTextureHeight;
unsigned int mCellWidth;
unsigned int mCellHeight;
unsigned int mFirstChar;
const unsigned char* mPNG;
size_t mPNGLength;
unsigned int GetGlyphWidth(char aGlyph) const {
if (mGlyphWidth) {
return mGlyphWidth.value();
}
MOZ_ASSERT(unsigned(aGlyph) >= mFirstChar);
return mGlyphWidths.value()[unsigned(aGlyph) - mFirstChar];
}
};
} // namespace layers
} // namespace mozilla
#endif

Просмотреть файл

@ -134,7 +134,6 @@ EXPORTS.mozilla.layers += [
"composite/FrameUniformityData.h",
"composite/GPUVideoTextureHost.h",
"composite/ImageComposite.h",
"composite/TextRenderer.h",
"composite/TextureHost.h",
"CompositionRecorder.h",
"Compositor.h",
@ -375,7 +374,6 @@ UNIFIED_SOURCES += [
"composite/FrameUniformityData.cpp",
"composite/GPUVideoTextureHost.cpp",
"composite/ImageComposite.cpp",
"composite/TextRenderer.cpp",
"composite/TextureHost.cpp",
"CompositionRecorder.cpp",
"Compositor.cpp",