Flutter Engine
 
Loading...
Searching...
No Matches
dl_text_skia.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_DISPLAY_LIST_DL_TEXT_SKIA_H_
6#define FLUTTER_DISPLAY_LIST_DL_TEXT_SKIA_H_
7
10#include "third_party/skia/include/core/SkTextBlob.h"
11
12namespace flutter {
13class DlTextSkia : public DlText {
14 public:
15 static std::shared_ptr<DlTextSkia> Make(const sk_sp<SkTextBlob>& blob);
16
17 ~DlTextSkia() = default;
18
19 explicit DlTextSkia(const sk_sp<SkTextBlob>& blob);
20
21 DlRect GetBounds() const { return ToDlRect(blob_->bounds()); }
22
23 std::shared_ptr<impeller::TextFrame> GetTextFrame() const { return nullptr; }
24
25 const SkTextBlob* GetTextBlob() const { return blob_.get(); }
26
27 private:
28 sk_sp<SkTextBlob> blob_;
29
31};
32} // namespace flutter
33
34#endif // FLUTTER_DISPLAY_LIST_DL_TEXT_SKIA_H_
DlRect GetBounds() const
static std::shared_ptr< DlTextSkia > Make(const sk_sp< SkTextBlob > &blob)
const SkTextBlob * GetTextBlob() const
std::shared_ptr< impeller::TextFrame > GetTextFrame() const
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition macros.h:27
const DlRect & ToDlRect(const SkRect &rect)