This reverts commit a44f174efc.
Reason: start_up tests become flaky.
See https://github.com/flutter/flutter/issues/28374
TBR: xster
Merge on red to fix the tree
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
// Copyright 2015 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// This example shows the draw operations to warm up the GPU shaders by default.
|
||||
|
||||
import 'dart:ui' as ui;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/painting.dart' show DefaultShaderWarmUp;
|
||||
|
||||
void beginFrame(Duration timeStamp) {
|
||||
// PAINT
|
||||
final ui.PictureRecorder recorder = ui.PictureRecorder();
|
||||
final ui.Rect paintBounds = ui.Rect.fromLTRB(0, 0, 1000, 1000);
|
||||
final ui.Canvas canvas = ui.Canvas(recorder, paintBounds);
|
||||
final ui.Paint backgroundPaint = ui.Paint()..color = Colors.white;
|
||||
canvas.drawRect(paintBounds, backgroundPaint);
|
||||
const DefaultShaderWarmUp().warmUpOnCanvas(canvas);
|
||||
final ui.Picture picture = recorder.endRecording();
|
||||
|
||||
// COMPOSITE
|
||||
final ui.SceneBuilder sceneBuilder = ui.SceneBuilder()
|
||||
..pushClipRect(paintBounds)
|
||||
..addPicture(ui.Offset.zero, picture)
|
||||
..pop();
|
||||
ui.window.render(sceneBuilder.build());
|
||||
}
|
||||
|
||||
void main() {
|
||||
ui.window.onBeginFrame = beginFrame;
|
||||
ui.window.scheduleFrame();
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
// Copyright 2017 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:test_api/test_api.dart' hide TypeMatcher, isInstanceOf;
|
||||
|
||||
import '../../../raw/shader_warm_up.dart' as demo;
|
||||
|
||||
void main() {
|
||||
test('layers smoketest for raw/shader_warm_up.dart', () {
|
||||
demo.main();
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user