mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Clear the background during load (#2710)
Previously we'd draw uninitialized memory. Now we draw black. Fixes #3447
This commit is contained in:
parent
f5635dbbb2
commit
44429c06eb
@ -62,6 +62,10 @@ void RasterizerDirect::OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widge
|
||||
// isolates. During this time, we are free to create the context. Thus
|
||||
// avoiding a delay when the first frame is painted.
|
||||
EnsureGLContext();
|
||||
CHECK(context_->MakeCurrent(surface_.get()));
|
||||
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
surface_->SwapBuffers();
|
||||
}
|
||||
|
||||
void RasterizerDirect::Draw(uint64_t layer_tree_ptr,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user