From e982526e88d97eb0b290d2d8c26bd0a1e231fe4d Mon Sep 17 00:00:00 2001 From: Zachary Anderson Date: Fri, 4 Feb 2022 15:29:58 -0800 Subject: [PATCH] Compensate for change to saveLayer (#6) --- impeller/display_list/display_list_dispatcher.cc | 6 ++++-- impeller/display_list/display_list_dispatcher.h | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/impeller/display_list/display_list_dispatcher.cc b/impeller/display_list/display_list_dispatcher.cc index f5eebf2326982..1724ecf258942 100644 --- a/impeller/display_list/display_list_dispatcher.cc +++ b/impeller/display_list/display_list_dispatcher.cc @@ -137,8 +137,10 @@ static std::optional ToRect(const SkRect* rect) { // |flutter::Dispatcher| void DisplayListDispatcher::saveLayer(const SkRect* bounds, - bool restore_with_paint) { - canvas_.SaveLayer(restore_with_paint ? paint_ : Paint{}, ToRect(bounds)); + const flutter::SaveLayerOptions options) { + canvas_.SaveLayer( + options.renders_with_attributes() ? paint_ : Paint{}, + ToRect(bounds)); } // |flutter::Dispatcher| diff --git a/impeller/display_list/display_list_dispatcher.h b/impeller/display_list/display_list_dispatcher.h index c32f295f6e4dd..139ed5c6858fd 100644 --- a/impeller/display_list/display_list_dispatcher.h +++ b/impeller/display_list/display_list_dispatcher.h @@ -75,7 +75,8 @@ class DisplayListDispatcher final : public flutter::Dispatcher { void save() override; // |flutter::Dispatcher| - void saveLayer(const SkRect* bounds, bool restore_with_paint) override; + void saveLayer(const SkRect* bounds, + const flutter::SaveLayerOptions options) override; // |flutter::Dispatcher| void restore() override;