提交 198094e4 编写于 作者: A Adam Barth

Fix crash with empty rect

Don't attempt to draw with a zero-by-zero window.
上级 a58dc499
......@@ -54,6 +54,11 @@ void RasterizerMojo::Draw(uint64_t layer_tree_ptr,
scoped_ptr<compositor::LayerTree> layer_tree(
reinterpret_cast<compositor::LayerTree*>(layer_tree_ptr));
if (layer_tree->frame_size().isEmpty()) {
callback.Run();
return;
}
MGLResizeSurface(layer_tree->frame_size().width(),
layer_tree->frame_size().height());
SkCanvas* canvas = ganesh_canvas_.GetCanvas(0, layer_tree->frame_size());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册