Skip to content

Commit b22410e

Browse files
Include SkParagraph headers only when the enable-skshaper flag is on (#9758)
These headers are currently causing errors in MSVC-based Windows builds.
1 parent 2cd650d commit b22410e

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

‎third_party/txt/src/txt/font_collection.h‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,13 @@
2727
#include "third_party/googletest/googletest/include/gtest/gtest_prod.h" // nogncheck
2828
#include "third_party/skia/include/core/SkFontMgr.h"
2929
#include "third_party/skia/include/core/SkRefCnt.h"
30-
#include "third_party/skia/modules/skparagraph/include/FontCollection.h"
3130
#include "txt/asset_font_manager.h"
3231
#include "txt/text_style.h"
3332

33+
#if FLUTTER_ENABLE_SKSHAPER
34+
#include "third_party/skia/modules/skparagraph/include/FontCollection.h"
35+
#endif
36+
3437
namespace txt {
3538

3639
class FontCollection : public std::enable_shared_from_this<FontCollection> {

‎third_party/txt/src/txt/paragraph_builder.cc‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,14 @@
1515
*/
1616

1717
#include "paragraph_builder.h"
18-
#include "flutter/third_party/txt/src/skia/paragraph_builder_skia.h"
1918
#include "paragraph_builder_txt.h"
2019
#include "paragraph_style.h"
2120
#include "third_party/icu/source/common/unicode/unistr.h"
2221

22+
#if FLUTTER_ENABLE_SKSHAPER
23+
#include "flutter/third_party/txt/src/skia/paragraph_builder_skia.h"
24+
#endif
25+
2326
namespace txt {
2427

2528
std::unique_ptr<ParagraphBuilder> ParagraphBuilder::CreateTxtBuilder(

0 commit comments

Comments
 (0)