Skip to content

Commit 73c7e63

Browse files
authored
Merge pull request #10506 from dipeshmsft/fixing-lineargradientbrush-caching
Removes MappingMode from LinearGradientBrush in HasRealizationContextChanged
2 parents 270b79a + aa4abb8 commit 73c7e63

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Microsoft.DotNet.Wpf/src/WpfGfx/core/resources/lineargradient.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,11 @@ class CMilLinearGradientBrushDuce : public CMilGradientBrushDuce
8080
__in_ecount(1) const BrushContext *pBrushContext
8181
) const
8282
{
83-
// If a mapping mode is relative to the brush sizing bounds *and* those
84-
// bounds have changed, then the realization context has changed
85-
return ( (m_data.m_MappingMode == MilBrushMappingMode::RelativeToBoundingBox) &&
83+
// If a mapping mode is relative to the brush
84+
// *or* or when a relative transform is used
85+
// *and* bounds have changed, then the realization context has changed
86+
return ( ((m_data.m_MappingMode == MilBrushMappingMode::RelativeToBoundingBox)
87+
|| (m_data.m_pRelativeTransform != NULL)) &&
8688

8789
// Return true if the brush sizing bounds have changed
8890
//

0 commit comments

Comments
 (0)