diff --git a/display_list/dl_builder.cc b/display_list/dl_builder.cc index dc69687293da2..e6ba24ba7f3a3 100644 --- a/display_list/dl_builder.cc +++ b/display_list/dl_builder.cc @@ -76,6 +76,9 @@ sk_sp DisplayListBuilder::Build() { bool is_safe = is_ui_thread_safe_; bool affects_transparency = current_layer_->affects_transparent_layer(); + sk_sp rtree = this->rtree(); + SkRect bounds = rtree ? rtree->bounds() : this->bounds(); + used_ = allocated_ = render_op_count_ = op_index_ = 0; nested_bytes_ = nested_op_count_ = 0; is_ui_thread_safe_ = true; @@ -86,8 +89,8 @@ sk_sp DisplayListBuilder::Build() { current_ = DlPaint(); return sk_sp(new DisplayList( - std::move(storage_), bytes, count, nested_bytes, nested_count, bounds(), - compatible, is_safe, affects_transparency, rtree())); + std::move(storage_), bytes, count, nested_bytes, nested_count, bounds, + compatible, is_safe, affects_transparency, std::move(rtree))); } DisplayListBuilder::DisplayListBuilder(const SkRect& cull_rect, diff --git a/display_list/dl_op_records.h b/display_list/dl_op_records.h index 259102c14251e..d0f12caea0318 100644 --- a/display_list/dl_op_records.h +++ b/display_list/dl_op_records.h @@ -277,7 +277,7 @@ struct SetRuntimeEffectColorSourceOp : DLOp { struct SetSceneColorSourceOp : DLOp { static const auto kType = DisplayListOpType::kSetSceneColorSource; - SetSceneColorSourceOp(const DlSceneColorSource* source) + explicit SetSceneColorSourceOp(const DlSceneColorSource* source) : source(source->scene_node(), source->camera_matrix()) {} const DlSceneColorSource source;