Compensate for change to saveLayer (flutter/engine#6)

This commit is contained in:
Zachary Anderson 2022-02-04 15:29:58 -08:00 committed by Dan Field
parent a7c3fab3d8
commit fe169020a0
2 changed files with 6 additions and 3 deletions

View File

@ -137,8 +137,10 @@ static std::optional<Rect> 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|

View File

@ -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;