提交 96fc39f1 编写于 作者: C Chinmay Garde

Merge pull request #2136 from chinmaygarde/master

Ensure GL context as soon as the accelerated widget is available
......@@ -53,6 +53,11 @@ void RasterizerDirect::OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widge
surface_ =
gfx::GLSurface::CreateViewGLSurface(widget, gfx::SurfaceConfiguration());
CHECK(surface_) << "GLSurface required.";
// Eagerly create the GL context. For a while after the accelerated widget
// is first available (after startup), the process is busy setting up dart
// isolates. During this time, we are free to create the context. Thus
// avoiding a delay when the first frame is painted.
EnsureGLContext();
}
void RasterizerDirect::Draw(uint64_t layer_tree_ptr,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册