-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: multi windowIssues related to multi window supportIssues related to multi window supportengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.team-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team
Description
Canvas.drawShadow requires DPR to calculate shadow length, and currently it gets the DPR implicitly from the first window:
// lib/ui/painting/canvas.cc
SkScalar dpr = static_cast<float>(UIDartState::Current()
->platform_configuration()
->get_window(0)
->viewport_metrics()
.device_pixel_ratio);This is not compatible with multi-view, because in multi-view there might not be a window 0 if the platform disables implicit view. This DPR should come from the target view of this drawing command.
However, the drawShadow signature does not allow inserting a view ID or DPR anywhere. There's an elevation parameter, but it's a pre-DPR length.
void drawShadow(Path path, Color color, double elevation, bool transparentOccluder);To solve this in a non-breaking way, we can either
- create a new
drawShadowWithDprthat has an additional parameterfloat dpr, or - create a new
drawShadowOnViewthat has an additional parameterint viewId.
Either way, we'll need to deprecate drawShadow afterwards.
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: multi windowIssues related to multi window supportIssues related to multi window supportengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.team-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team
Type
Projects
Status
In Progress