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"
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_
static std::shared_ptr< DlTextImpeller > MakeFromBlob(const sk_sp< SkTextBlob > &blob)
DlTextImpeller(const std::shared_ptr< impeller::TextFrame > &frame)
const SkTextBlob * GetTextBlob() const
static std::shared_ptr< DlTextImpeller > Make(const std::shared_ptr< impeller::TextFrame > &frame)
std::shared_ptr< impeller::TextFrame > GetTextFrame() const
flutter::DlRect DlRect
Definition: dl_dispatcher.h:25