Flutter Engine
The Flutter Engine
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
MotionBlurEffect.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 SkottieMotionBlurEffect_DEFINED
9#define SkottieMotionBlurEffect_DEFINED
10
12
13namespace skottie {
14namespace internal {
15
16class Animator;
17
19public:
22 size_t samples_per_frame,
23 float shutter_angle, float shutter_phase);
24
25 SG_ATTRIBUTE(T, float, fT)
26
27private:
28 class AutoInvalBlocker;
29
30 const RenderNode* onNodeAt(const SkPoint&) const override;
31
32 SkRect onRevalidate(sksg::InvalidationController* ic, const SkMatrix& ctm) override;
33
34 void onRender(SkCanvas* canvas, const RenderContext* ctx) const override;
35
36 void renderToRaster8888Pow2Samples(SkCanvas* canvas, const RenderContext* ctx) const;
37
38 SkRect seekToSample(size_t sample_idx, const SkMatrix& ctm) const;
39
42 size_t sample_count, float phase, float dt);
43
44 const sk_sp<Animator> fAnimator;
45 const size_t fSampleCount;
46 const float fPhase,
47 fDT;
48
49 float fT = 0;
50 size_t fVisibleSampleCount = 0;
51
53};
54
55} // namespace internal
56} // namespace skottie
57
58#endif // SkottieMotionBlurEffect_DEFINED
SkScalar fPhase
Definition: DashOp.cpp:189
#define SG_ATTRIBUTE(attr_name, attr_type, attr_container)
Definition: SkSGNode.h:100
static sk_sp< MotionBlurEffect > Make(sk_sp< Animator > animator, sk_sp< sksg::RenderNode > child, size_t samples_per_frame, float shutter_angle, float shutter_phase)
friend class RenderNode
Definition: SkSGNode.h:94
#define T
Definition: precompiler.cc:65