提交 f627e734 编写于 作者: A Adam Barth 提交者: GitHub

Cull offscreen child views (#3267)

There's no reason to present offscreen child views to Mozart.
上级 77e1a952
......@@ -207,6 +207,12 @@ void SceneBuilder::addChildScene(double dx,
#if defined(OS_FUCHSIA)
if (!m_currentLayer)
return;
SkRect sceneRect = SkRect::MakeXYWH(dx, dy, physicalWidth / devicePixelRatio,
physicalHeight / devicePixelRatio);
if (!SkRect::Intersects(sceneRect, m_cullRects.top()))
return;
std::unique_ptr<flow::ChildSceneLayer> layer(new flow::ChildSceneLayer());
layer->set_offset(SkPoint::Make(dx, dy));
layer->set_device_pixel_ratio(devicePixelRatio);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册