[Impeller] Move TextRenderContext::Create symbol into the text backend (flutter/engine#41067)

Moves the `TextRenderContext::Create` symbol into the backend, so that
we can easily swap out the backend when building the 2D renderer in
impeller-cmake.
This commit is contained in:
Brandon DeRosier
2023-04-11 10:09:28 -07:00
committed by GitHub
parent d56e587985
commit 29585b2482
2 changed files with 6 additions and 8 deletions

View File

@@ -22,6 +22,12 @@
namespace impeller {
std::unique_ptr<TextRenderContext> TextRenderContext::Create(
std::shared_ptr<Context> context) {
// There is only one backend today.
return std::make_unique<TextRenderContextSkia>(std::move(context));
}
// TODO(bdero): We might be able to remove this per-glyph padding if we fix
// the underlying causes of the overlap.
// https://github.com/flutter/flutter/issues/114563

View File

@@ -6,16 +6,8 @@
#include <utility>
#include "impeller/typographer/backends/skia/text_render_context_skia.h"
namespace impeller {
std::unique_ptr<TextRenderContext> TextRenderContext::Create(
std::shared_ptr<Context> context) {
// There is only one backend today.
return std::make_unique<TextRenderContextSkia>(std::move(context));
}
TextRenderContext::TextRenderContext(std::shared_ptr<Context> context)
: context_(std::move(context)) {
if (!context_ || !context_->IsValid()) {