-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Closed
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.r: duplicateIssue is closed as a duplicate of an existing issueIssue is closed as a duplicate of an existing issueteam-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team
Description
Canvas.cc depends on the device pixel ratio of window 0 in Canvas::drawShadow:
// Not using SafeNarrow because DPR will always be a relatively small number.
SkScalar dpr = static_cast<float>(UIDartState::Current()
->platform_configuration()
->get_window(0)
->viewport_metrics()
.device_pixel_ratio);
We need to get rid of the get_window(0) in order to support multi-view.
Analysis:
One trivial solution is to make Canvas provide a DPR or make it tied to a view. However, it's too much of a change that will only be used for this feature.
Deeper analysis shows that this DPR is just multiplied with the provided elevation:
https://github.com/flutter/engine/blob/main/impeller/display_list/dl_dispatcher.cc#L1113
Technically we could make this work today by multiplying elevation by DPR in the framework. But this breaks the API.
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.r: duplicateIssue is closed as a duplicate of an existing issueIssue is closed as a duplicate of an existing issueteam-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team
Type
Projects
Status
Done