[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:
@@ -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
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user