Skip to content

Commit f831896

Browse files
committed
Extra changes
1 parent b891a9f commit f831896

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

shell/common/animator.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,6 @@ void Animator::EnqueueTraceFlowId(uint64_t trace_flow_id) {
6060

6161
void Animator::BeginFrame(
6262
std::unique_ptr<FrameTimingsRecorder> frame_timings_recorder) {
63-
// Both frame_timings_recorder_ and layer_trees_tasks_ must be empty if not
64-
// between BeginFrame and EndFrame.
65-
FML_DCHECK(frame_timings_recorder_ == nullptr);
66-
FML_DCHECK(layer_trees_tasks_.empty());
6763
TRACE_EVENT_ASYNC_END0("flutter", "Frame Request Pending",
6864
frame_request_number_);
6965
// Clear layer trees rendered out of a frame. Only Animator::Render called
@@ -192,6 +188,8 @@ void Animator::EndFrame() {
192188
void Animator::Render(int64_t view_id,
193189
std::unique_ptr<flutter::LayerTree> layer_tree,
194190
float device_pixel_ratio) {
191+
has_rendered_ = true;
192+
195193
if (!frame_timings_recorder_) {
196194
// Framework can directly call render with a built scene. A major reason is
197195
// to render warm up frames.

shell/platform/darwin/macos/framework/Source/FlutterEngine.mm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,10 @@ - (instancetype)initWithName:(NSString*)labelPrefix
549549
object:nil];
550550

551551
_platformViewController = [[FlutterPlatformViewController alloc] init];
552+
_macOSCompositor = std::make_unique<flutter::FlutterCompositor>(
553+
[[FlutterViewEngineProvider alloc] initWithEngine:self],
554+
[[FlutterTimeConverter alloc] initWithEngine:self], _platformViewController);
555+
552556
_threadSynchronizer = [[FlutterThreadSynchronizer alloc] init];
553557
[self setUpPlatformViewChannel];
554558
[self setUpAccessibilityChannel];
@@ -881,10 +885,6 @@ - (FlutterViewController*)viewController {
881885
}
882886

883887
- (FlutterCompositor*)createFlutterCompositor {
884-
_macOSCompositor = std::make_unique<flutter::FlutterCompositor>(
885-
[[FlutterViewEngineProvider alloc] initWithEngine:self],
886-
[[FlutterTimeConverter alloc] initWithEngine:self], _platformViewController);
887-
888888
_compositor = {};
889889
_compositor.struct_size = sizeof(FlutterCompositor);
890890
_compositor.user_data = _macOSCompositor.get();

0 commit comments

Comments
 (0)