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
13using tonic::DartInvoke;
14using tonic::DartPersistentValue;
15using tonic::ToDart;
16
17namespace flutter {
18
19IMPLEMENT_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
27FOR_EACH_BINDING(DART_NATIVE_CALLBACK)
28
29void Codec::dispose() {
30 ClearDartWrapper();
31}
32
33void Codec::RegisterNatives(tonic::DartLibraryNatives* natives) {
34 natives->Register({FOR_EACH_BINDING(DART_REGISTER_NATIVE)});
35}
36
37} // namespace flutter
38