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 | #include "flutter/lib/ui/painting/codec.h" |
6 | |
7 | #include "third_party/tonic/dart_binding_macros.h" |
8 | #include "third_party/tonic/dart_library_natives.h" |
9 | #include "third_party/tonic/dart_state.h" |
10 | #include "third_party/tonic/logging/dart_invoke.h" |
11 | #include "third_party/tonic/typed_data/typed_list.h" |
12 | |
13 | using tonic::DartInvoke; |
14 | using tonic::DartPersistentValue; |
15 | using tonic::ToDart; |
16 | |
17 | namespace flutter { |
18 | |
19 | IMPLEMENT_WRAPPERTYPEINFO(ui, Codec); |
20 | |
21 | #define FOR_EACH_BINDING(V) \ |
22 | V(Codec, getNextFrame) \ |
23 | V(Codec, frameCount) \ |
24 | V(Codec, repetitionCount) \ |
25 | V(Codec, dispose) |
26 | |
27 | FOR_EACH_BINDING(DART_NATIVE_CALLBACK) |
28 | |
29 | void Codec::dispose() { |
30 | ClearDartWrapper(); |
31 | } |
32 | |
33 | void Codec::RegisterNatives(tonic::DartLibraryNatives* natives) { |
34 | natives->Register({FOR_EACH_BINDING(DART_REGISTER_NATIVE)}); |
35 | } |
36 | |
37 | } // namespace flutter |
38 |