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

Use initialized memory for composited bounds (#3291)

SkRect objects need to be manually initialized. Previously, we were using
unintialized memory in our bounds calculations.
上级 543c39e6
......@@ -25,9 +25,10 @@ void ContainerLayer::Preroll(PrerollContext* context, const SkMatrix& matrix) {
void ContainerLayer::PrerollChildren(PrerollContext* context,
const SkMatrix& matrix) {
SkRect child_paint_bounds;
SkRect child_paint_bounds = SkRect::MakeEmpty();
for (auto& layer : layers_) {
PrerollContext child_context = *context;
FTL_DCHECK(child_context.child_paint_bounds.isEmpty());
layer->Preroll(&child_context, matrix);
if (layer->needs_system_composite())
set_needs_system_composite(true);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册