mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Use initialized memory for composited bounds (flutter/engine#3291)
SkRect objects need to be manually initialized. Previously, we were using unintialized memory in our bounds calculations.
This commit is contained in:
parent
23e5ad705f
commit
6312be1f15
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user