1 | |
---|---|
2 | // Copyright 2013 The Flutter Authors. All rights reserved. |
3 | // Use of this source code is governed by a BSD-style license that can be |
4 | // found in the LICENSE file. |
5 | |
6 | #include "flutter/lib/ui/painting/frame_info.h" |
7 | |
8 | #include "third_party/tonic/dart_binding_macros.h" |
9 | #include "third_party/tonic/dart_library_natives.h" |
10 | |
11 | namespace flutter { |
12 | |
13 | IMPLEMENT_WRAPPERTYPEINFO(ui, FrameInfo); |
14 | |
15 | #define FOR_EACH_BINDING(V) \ |
16 | V(FrameInfo, durationMillis) \ |
17 | V(FrameInfo, image) |
18 | |
19 | FOR_EACH_BINDING(DART_NATIVE_CALLBACK) |
20 | |
21 | FrameInfo::FrameInfo(fml::RefPtr<CanvasImage> image, int durationMillis) |
22 | : image_(std::move(image)), durationMillis_(durationMillis) {} |
23 | |
24 | FrameInfo::~FrameInfo(){}; |
25 | |
26 | void FrameInfo::RegisterNatives(tonic::DartLibraryNatives* natives) { |
27 | natives->Register({FOR_EACH_BINDING(DART_REGISTER_NATIVE)}); |
28 | } |
29 | |
30 | } // namespace flutter |
31 |