Flutter Engine
 
Loading...
Searching...
No Matches
paragraph_builder.cc
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "paragraph_builder.h"
6
8#include "paragraph_style.h"
9#include "third_party/icu/source/common/unicode/unistr.h"
10
11namespace txt {
12
13//------------------------------------------------------------------------------
14/// @brief Creates a |ParagraphBuilder| based on Skia's text layout module.
15///
16/// @param[in] style The style to use for the paragraph.
17/// @param[in] font_collection The font collection to use for the paragraph.
18/// @param[in] impeller_enabled Whether Impeller is enabled in the runtime.
19std::unique_ptr<ParagraphBuilder> ParagraphBuilder::CreateSkiaBuilder(
20 const ParagraphStyle& style,
21 const std::shared_ptr<FontCollection>& font_collection,
22 const bool impeller_enabled) {
23 return std::make_unique<ParagraphBuilderSkia>(style, font_collection,
24 impeller_enabled);
25}
26
27} // namespace txt
static std::unique_ptr< ParagraphBuilder > CreateSkiaBuilder(const ParagraphStyle &style, const std::shared_ptr< FontCollection > &font_collection, const bool impeller_enabled)
Creates a |ParagraphBuilder| based on Skia's text layout module.