| Flutter Impeller |

dl_text_impeller.h
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 #ifndef FLUTTER_IMPELLER_DISPLAY_LIST_DL_TEXT_IMPELLER_H_
6 #define FLUTTER_IMPELLER_DISPLAY_LIST_DL_TEXT_IMPELLER_H_
7
8 #include "flutter/display_list/dl_text.h"
9 #include "flutter/impeller/typographer/text_frame.h"
10
11 class SkTextBlob;
12
13 namespace flutter {
14 class DlTextImpeller : public DlText {
15 public:
16 static std::shared_ptr<DlTextImpeller> Make(
17 const std::shared_ptr<impeller::TextFrame>& frame);
18 static std::shared_ptr<DlTextImpeller> MakeFromBlob(
19 const sk_sp<SkTextBlob>& blob);
20
21 ~DlTextImpeller() = default;
22
23 explicit DlTextImpeller(const std::shared_ptr<impeller::TextFrame>& frame);
24
25 DlRect GetBounds() const { return frame_->GetBounds(); }
26
27 std::shared_ptr<impeller::TextFrame> GetTextFrame() const { return frame_; }
28
29 const SkTextBlob* GetTextBlob() const { return nullptr; }
30
31 private:
32 std::shared_ptr<impeller::TextFrame> frame_;
33
34 FML_DISALLOW_COPY_AND_ASSIGN(DlTextImpeller);
35 };
36 } // namespace flutter
37
38 #endif // FLUTTER_IMPELLER_DISPLAY_LIST_DL_TEXT_IMPELLER_H_
flutter::DlTextImpeller
Definition: dl_text_impeller.h:14
flutter::DlTextImpeller::MakeFromBlob
static std::shared_ptr< DlTextImpeller > MakeFromBlob(const sk_sp< SkTextBlob > &blob)
Definition: dl_text_impeller.cc:16
flutter::DlTextImpeller::DlTextImpeller
DlTextImpeller(const std::shared_ptr< impeller::TextFrame > &frame)
Definition: dl_text_impeller.cc:21
flutter::DlTextImpeller::GetTextBlob
const SkTextBlob * GetTextBlob() const
Definition: dl_text_impeller.h:29
flutter::DlTextImpeller::Make
static std::shared_ptr< DlTextImpeller > Make(const std::shared_ptr< impeller::TextFrame > &frame)
Definition: dl_text_impeller.cc:11
flutter::DlTextImpeller::GetTextFrame
std::shared_ptr< impeller::TextFrame > GetTextFrame() const
Definition: dl_text_impeller.h:27
flutter::DlTextImpeller::~DlTextImpeller
~DlTextImpeller()=default
flutter::DlTextImpeller::GetBounds
DlRect GetBounds() const
Definition: dl_text_impeller.h:25
flutter
Definition: dl_golden_blur_unittests.cc:16
impeller::DlRect
flutter::DlRect DlRect
Definition: dl_dispatcher.h:25
text_frame.h