This reverts commit c59151b1cd.
This commit is contained in:
@@ -687,9 +687,6 @@ abstract class TestWidgetsFlutterBinding extends BindingBase
|
||||
|
||||
runApp(Container(key: UniqueKey(), child: _preTestMessage)); // Reset the tree to a known state.
|
||||
await pump();
|
||||
// Pretend that the first frame produced in the test body is the first frame
|
||||
// sent to the engine.
|
||||
resetFirstFrameSent();
|
||||
|
||||
final bool autoUpdateGoldensBeforeTest = autoUpdateGoldenFiles && !isBrowser;
|
||||
final TestExceptionReporter reportTestExceptionBeforeTest = reportTestException;
|
||||
@@ -966,31 +963,6 @@ class AutomatedTestWidgetsFlutterBinding extends TestWidgetsFlutterBinding {
|
||||
return result;
|
||||
}
|
||||
|
||||
int _firstFrameDeferredCount = 0;
|
||||
bool _firstFrameSent = false;
|
||||
|
||||
@override
|
||||
bool get sendFramesToEngine => _firstFrameSent || _firstFrameDeferredCount == 0;
|
||||
|
||||
@override
|
||||
void deferFirstFrame() {
|
||||
assert(_firstFrameDeferredCount >= 0);
|
||||
_firstFrameDeferredCount += 1;
|
||||
}
|
||||
|
||||
@override
|
||||
void allowFirstFrame() {
|
||||
assert(_firstFrameDeferredCount > 0);
|
||||
_firstFrameDeferredCount -= 1;
|
||||
// Unlike in RendererBinding.allowFirstFrame we do not force a frame her
|
||||
// to give the test full control over frame scheduling.
|
||||
}
|
||||
|
||||
@override
|
||||
void resetFirstFrameSent() {
|
||||
_firstFrameSent = false;
|
||||
}
|
||||
|
||||
EnginePhase _phase = EnginePhase.sendSemanticsUpdate;
|
||||
|
||||
// Cloned from RendererBinding.drawFrame() but with early-exit semantics.
|
||||
@@ -1007,8 +979,7 @@ class AutomatedTestWidgetsFlutterBinding extends TestWidgetsFlutterBinding {
|
||||
pipelineOwner.flushCompositingBits();
|
||||
if (_phase != EnginePhase.compositingBits) {
|
||||
pipelineOwner.flushPaint();
|
||||
if (_phase != EnginePhase.paint && sendFramesToEngine) {
|
||||
_firstFrameSent = true;
|
||||
if (_phase != EnginePhase.paint) {
|
||||
renderView.compositeFrame(); // this sends the bits to the GPU
|
||||
if (_phase != EnginePhase.composite) {
|
||||
pipelineOwner.flushSemantics();
|
||||
|
||||
Reference in New Issue
Block a user