Chris Bracken 78a1c7ebf9
Revert "Drop last usages of Dart_New from engine (#16838)" (#16915)
We believe this may be implicated in a Windows-specific crash during the
Flutter Gallery integration test.

See:
https://github.com/flutter/flutter/issues/51896

This reverts commit f9b78c5db2bc3087e1793947b11ca643c2d747cf.
2020-03-03 14:52:56 -08:00

43 lines
1.1 KiB
C++

// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef FLUTTER_LIB_UI_PAINTING_CODEC_H_
#define FLUTTER_LIB_UI_PAINTING_CODEC_H_
#include "flutter/lib/ui/dart_wrapper.h"
#include "flutter/lib/ui/painting/frame_info.h"
#include "third_party/skia/include/codec/SkCodec.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkImage.h"
using tonic::DartPersistentValue;
namespace tonic {
class DartLibraryNatives;
} // namespace tonic
namespace flutter {
// A handle to an SkCodec object.
//
// Doesn't mirror SkCodec's API but provides a simple sequential access API.
class Codec : public RefCountedDartWrappable<Codec> {
DEFINE_WRAPPERTYPEINFO();
public:
virtual int frameCount() const = 0;
virtual int repetitionCount() const = 0;
virtual Dart_Handle getNextFrame(Dart_Handle callback_handle) = 0;
void dispose();
static void RegisterNatives(tonic::DartLibraryNatives* natives);
};
} // namespace flutter
#endif // FLUTTER_LIB_UI_PAINTING_CODEC_H_