Clear the background during load (#2710)

Previously we'd draw uninitialized memory. Now we draw black.

Fixes #3447
This commit is contained in:
Adam Barth 2016-05-25 17:45:40 -07:00
parent f5635dbbb2
commit 44429c06eb

View File

@ -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,