Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
impeller
typographer
backends
skia
typeface_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_IMPELLER_TYPOGRAPHER_BACKENDS_SKIA_TYPEFACE_SKIA_H_
6
#define FLUTTER_IMPELLER_TYPOGRAPHER_BACKENDS_SKIA_TYPEFACE_SKIA_H_
7
8
#include "flutter/fml/macros.h"
9
#include "
impeller/base/backend_cast.h
"
10
#include "
impeller/typographer/typeface.h
"
11
#include "
third_party/skia/include/core/SkRefCnt.h
"
12
#include "
third_party/skia/include/core/SkTypeface.h
"
13
14
namespace
impeller
{
15
16
class
TypefaceSkia
final :
public
Typeface
,
17
public
BackendCast
<TypefaceSkia, Typeface> {
18
public
:
19
explicit
TypefaceSkia
(
sk_sp<SkTypeface>
typeface);
20
21
~TypefaceSkia
()
override
;
22
23
// |Typeface|
24
bool
IsValid
()
const override
;
25
26
// |Comparable<Typeface>|
27
std::size_t
GetHash
()
const override
;
28
29
// |Comparable<Typeface>|
30
bool
IsEqual
(
const
Typeface
& other)
const override
;
31
32
const
sk_sp<SkTypeface>
&
GetSkiaTypeface
()
const
;
33
34
private
:
35
sk_sp<SkTypeface>
typeface_;
36
37
TypefaceSkia
(
const
TypefaceSkia
&) =
delete
;
38
39
TypefaceSkia
& operator=(
const
TypefaceSkia
&) =
delete
;
40
};
41
42
}
// namespace impeller
43
44
#endif
// FLUTTER_IMPELLER_TYPOGRAPHER_BACKENDS_SKIA_TYPEFACE_SKIA_H_
SkRefCnt.h
SkTypeface.h
backend_cast.h
impeller::BackendCast
Definition
backend_cast.h:11
impeller::TypefaceSkia
Definition
typeface_skia.h:17
impeller::TypefaceSkia::~TypefaceSkia
~TypefaceSkia() override
impeller::TypefaceSkia::GetHash
std::size_t GetHash() const override
Definition
typeface_skia.cc:18
impeller::TypefaceSkia::GetSkiaTypeface
const sk_sp< SkTypeface > & GetSkiaTypeface() const
Definition
typeface_skia.cc:31
impeller::TypefaceSkia::IsEqual
bool IsEqual(const Typeface &other) const override
Definition
typeface_skia.cc:26
impeller::TypefaceSkia::IsValid
bool IsValid() const override
Definition
typeface_skia.cc:14
impeller::Typeface
A typeface, usually obtained from a font-file, on disk describes the intrinsic properties of the font...
Definition
typeface.h:20
sk_sp
Definition
SkRefCnt.h:220
impeller
Definition
texture.h:18
typeface.h
Generated on Fri Apr 26 2024 06:14:15 for Flutter Engine by
1.9.8