forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Drop last usages of Dart_New from engine (flutter#16838)" (fl…
…utter#16915) We believe this may be implicated in a Windows-specific crash during the Flutter Gallery integration test. See: flutter/flutter#51896 This reverts commit f9b78c5.
- Loading branch information
Showing
22 changed files
with
221 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
// 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. | ||
|
||
#include "flutter/lib/ui/painting/frame_info.h" | ||
|
||
#include "third_party/tonic/dart_binding_macros.h" | ||
#include "third_party/tonic/dart_library_natives.h" | ||
|
||
namespace flutter { | ||
|
||
IMPLEMENT_WRAPPERTYPEINFO(ui, FrameInfo); | ||
|
||
#define FOR_EACH_BINDING(V) \ | ||
V(FrameInfo, durationMillis) \ | ||
V(FrameInfo, image) | ||
|
||
FOR_EACH_BINDING(DART_NATIVE_CALLBACK) | ||
|
||
FrameInfo::FrameInfo(fml::RefPtr<CanvasImage> image, int durationMillis) | ||
: image_(std::move(image)), durationMillis_(durationMillis) {} | ||
|
||
FrameInfo::~FrameInfo(){}; | ||
|
||
void FrameInfo::RegisterNatives(tonic::DartLibraryNatives* natives) { | ||
natives->Register({FOR_EACH_BINDING(DART_REGISTER_NATIVE)}); | ||
} | ||
|
||
} // namespace flutter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// 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_FRAME_INFO_H_ | ||
#define FLUTTER_LIB_UI_PAINTING_FRAME_INFO_H_ | ||
|
||
#include "flutter/lib/ui/dart_wrapper.h" | ||
#include "flutter/lib/ui/painting/image.h" | ||
|
||
namespace flutter { | ||
|
||
// A single animation frame. | ||
class FrameInfo final : public RefCountedDartWrappable<FrameInfo> { | ||
DEFINE_WRAPPERTYPEINFO(); | ||
|
||
public: | ||
int durationMillis() { return durationMillis_; } | ||
fml::RefPtr<CanvasImage> image() { return image_; } | ||
|
||
static void RegisterNatives(tonic::DartLibraryNatives* natives); | ||
|
||
private: | ||
FrameInfo(fml::RefPtr<CanvasImage> image, int durationMillis); | ||
|
||
~FrameInfo() override; | ||
|
||
const fml::RefPtr<CanvasImage> image_; | ||
const int durationMillis_; | ||
|
||
FML_FRIEND_MAKE_REF_COUNTED(FrameInfo); | ||
FML_FRIEND_REF_COUNTED_THREAD_SAFE(FrameInfo); | ||
}; | ||
|
||
} // namespace flutter | ||
|
||
#endif // FLUTTER_LIB_UI_PAINTING_FRAME_INFO_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.