mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
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.
43 lines
1.1 KiB
C++
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_
|