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 "Migrate flutter_runner from flutter_runner::{Thread,Loop} to …
…fml::{Thread,MessageLoop} (flutter#15118)" (flutter#16277) This reverts commit 41e8ed0.
- Loading branch information
George Wright
authored
Jan 31, 2020
1 parent
4641a09
commit f5de1ac
Showing
21 changed files
with
448 additions
and
75 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,47 @@ | ||
// 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 "loop.h" | ||
|
||
#include <lib/async-loop/loop.h> | ||
#include <lib/async/default.h> | ||
|
||
#include "task_observers.h" | ||
|
||
namespace flutter_runner { | ||
|
||
namespace { | ||
|
||
static void LoopEpilogue(async_loop_t*, void*) { | ||
ExecuteAfterTaskObservers(); | ||
} | ||
|
||
constexpr async_loop_config_t kAttachedLoopConfig = { | ||
.default_accessors = | ||
{ | ||
.getter = async_get_default_dispatcher, | ||
.setter = async_set_default_dispatcher, | ||
}, | ||
.make_default_for_current_thread = true, | ||
.epilogue = &LoopEpilogue, | ||
}; | ||
|
||
constexpr async_loop_config_t kDetachedLoopConfig = { | ||
.default_accessors = | ||
{ | ||
.getter = async_get_default_dispatcher, | ||
.setter = async_set_default_dispatcher, | ||
}, | ||
.make_default_for_current_thread = false, | ||
.epilogue = &LoopEpilogue, | ||
}; | ||
|
||
} // namespace | ||
|
||
async::Loop* MakeObservableLoop(bool attachToThread) { | ||
return new async::Loop( | ||
&(attachToThread ? kAttachedLoopConfig : kDetachedLoopConfig)); | ||
} | ||
|
||
} // namespace flutter_runner |
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,17 @@ | ||
// 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_SHELL_PLATFORM_FUCHSIA_LOOP_H_ | ||
#define FLUTTER_SHELL_PLATFORM_FUCHSIA_LOOP_H_ | ||
|
||
#include <lib/async-loop/cpp/loop.h> | ||
|
||
namespace flutter_runner { | ||
|
||
// Creates a loop which allows task observers to be attached to it. | ||
async::Loop* MakeObservableLoop(bool attachToThread); | ||
|
||
} // namespace flutter_runner | ||
|
||
#endif // FLUTTER_SHELL_PLATFORM_FUCHSIA_LOOP_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.