未验证 提交 25d99cd2 编写于 作者: C Chris Bracken 提交者: GitHub

Use software renderer in embedder unittests (#6928)

Reduces spurious error log messages in GLContextMakeCurrent() attempting
set up the GR context:

  [ERROR:flutter/shell/gpu/gpu_surface_gl.cc(42)] Could not make the context current to setup the gr context.
上级 99e73d8c
......@@ -16,19 +16,18 @@ TEST(EmbedderTest, MustNotRunWithInvalidArgs) {
}
TEST(EmbedderTest, CanLaunchAndShutdownWithValidProjectArgs) {
FlutterOpenGLRendererConfig renderer = {};
renderer.struct_size = sizeof(FlutterOpenGLRendererConfig);
renderer.make_current = [](void*) { return false; };
renderer.clear_current = [](void*) { return false; };
renderer.present = [](void*) { return false; };
renderer.fbo_callback = [](void*) -> uint32_t { return 0; };
FlutterSoftwareRendererConfig renderer;
renderer.struct_size = sizeof(FlutterSoftwareRendererConfig);
renderer.surface_present_callback = [](void*, const void*, size_t, size_t) {
return false;
};
std::string main =
std::string(testing::GetFixturesPath()) + "/simple_main.dart";
FlutterRendererConfig config = {};
config.type = FlutterRendererType::kOpenGL;
config.open_gl = renderer;
config.type = FlutterRendererType::kSoftware;
config.software = renderer;
FlutterProjectArgs args = {};
args.struct_size = sizeof(FlutterProjectArgs);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册