@@ -106,6 +106,29 @@ class FilterContents : public Contents {
106106 // / Entity being rendered.
107107 void SetEffectTransform (const Matrix& effect_transform);
108108
109+ // / @brief Sets the transform used for transforming local canvas geometry
110+ // / (such as `DlBlurImageFilter::bounds_`) into subpass coordinates.
111+ // /
112+ // / In subpass and backdrop filter rendering scenarios, the effect
113+ // / itself (such as blur sigma or matrix filter transformations)
114+ // / operates on the screen-space backdrop and typically only requires
115+ // / the scale and rotation of the canvas CTM (via
116+ // / `SetEffectTransform`) to avoid shifting or double-translating the
117+ // / effect.
118+ // /
119+ // / However, local geometry defined in widget/canvas space (such as a
120+ // / bounded blur rectangle) requires the full current transformation
121+ // / matrix including translation to be mapped accurately to the
122+ // / backdrop texture space (e.g. when rendering bounded blurs inside
123+ // / scrolling views).
124+ // /
125+ // / @see `SetEffectTransform`
126+ void SetLocalToPassTransform (const Matrix& local_to_pass_transform);
127+
128+ const Matrix& GetLocalToPassTransform () const {
129+ return local_to_pass_transform_;
130+ }
131+
109132 // / @brief Create an Entity that renders this filter's output.
110133 std::optional<Entity> GetEntity (
111134 const ContentContext& renderer,
@@ -228,6 +251,7 @@ class FilterContents : public Contents {
228251
229252 FilterInput::Vector inputs_;
230253 Matrix effect_transform_ = Matrix();
254+ Matrix local_to_pass_transform_ = Matrix();
231255
232256 FilterContents (const FilterContents&) = delete ;
233257
0 commit comments