Flutter Engine
The Flutter Engine
third_party
skia
modules
sksg
src
SkSGTransformPriv.h
Go to the documentation of this file.
1
/*
2
* Copyright 2019 Google Inc.
3
*
4
* Use of this source code is governed by a BSD-style license that can be
5
* found in the LICENSE file.
6
*/
7
8
#ifndef SkSGTransformPriv_DEFINED
9
#define SkSGTransformPriv_DEFINED
10
11
#include "
include/core/SkM44.h
"
12
#include "
include/core/SkMatrix.h
"
13
#include "
modules/sksg/include/SkSGTransform.h
"
14
15
namespace
sksg
{
16
17
// Helper for accessing implementation-private Transform methods.
18
class
TransformPriv
final {
19
public
:
20
21
static
bool
Is44
(
const
sk_sp<Transform>
&t) {
return
t->is44(); }
22
23
template <typename T, typename = std::enable_if<std::is_same<T, SkMatrix>::value
||
24
std::is_same<T, SkM44 >::value
>>
25
static
T
As
(
const
sk_sp<Transform>
&);
26
27
private
:
28
TransformPriv
() =
delete
;
29
};
30
31
template
<>
32
inline
SkMatrix
TransformPriv::As<SkMatrix>(
const
sk_sp<Transform>
& t) {
33
return
t->asMatrix();
34
}
35
36
template
<>
37
inline
SkM44
TransformPriv::As<SkM44>(
const
sk_sp<Transform>
& t) {
38
return
t->asM44();
39
}
40
41
}
// namespace sksg
42
43
#endif
// SkSGTransformPriv_DEFINED
SkM44.h
SkMatrix.h
SkSGTransform.h
SkM44
Definition:
SkM44.h:150
SkMatrix
Definition:
SkMatrix.h:54
sk_sp
Definition:
SkRefCnt.h:220
sksg::TransformPriv
Definition:
SkSGTransformPriv.h:18
sksg::TransformPriv::As
static T As(const sk_sp< Transform > &)
sksg::TransformPriv::Is44
static bool Is44(const sk_sp< Transform > &t)
Definition:
SkSGTransformPriv.h:21
value
uint8_t value
Definition:
fl_standard_message_codec.cc:36
sksg
Definition:
Skottie.h:32
T
#define T
Definition:
precompiler.cc:65
Generated on Sun Jun 23 2024 21:56:07 for Flutter Engine by
1.9.4