提交 b38ae4ab 编写于 作者: A Adam Barth

Fix corrupted rendering of images

When navigating from one app to another, we create a new Android window and
destroy the old one. Previously, when we destroyed the old window after
creating the new window, we would destroy the Ganesh context after making the
GL context for the new window current, causing us to corrupt the GL state in
the new window. After this CL, we call MakeCurrent before destroying the Ganesh
context so that it interacts with the proper GL context.

R=jackson@google.com

Review URL: https://codereview.chromium.org/1214263002.
上级 ef6ebb7e
......@@ -36,6 +36,7 @@ GaneshContext::GaneshContext(scoped_refptr<gfx::GLContext> gl_context)
}
GaneshContext::~GaneshContext() {
gr_context_->abandonContext();
}
} // namespace shell
......
......@@ -68,6 +68,7 @@ void Rasterizer::DrawPicture(SkPicture* picture) {
}
void Rasterizer::OnOutputSurfaceDestroyed() {
CHECK(context_->MakeCurrent(surface_.get()));
ganesh_surface_.reset();
ganesh_context_.reset();
context_ = nullptr;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册