Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes MappingMode from LinearGradientBrush in HasRealizationContextChanged #10506

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,19 @@ class CMilLinearGradientBrushDuce : public CMilGradientBrushDuce
__in_ecount(1) const BrushContext *pBrushContext
) const
{
// If a mapping mode is relative to the brush sizing bounds *and* those
// bounds have changed, then the realization context has changed
return ( (m_data.m_MappingMode == MilBrushMappingMode::RelativeToBoundingBox) &&

// Return true if the brush sizing bounds have changed
//
// We use exact equality here because fuzzy checks are expensive, coming up
// with a fuzzy threshold that defines the point at which visible changes
// occur isn't straightforward (i.e., the brush sizing bounds aren't
// in device space), and exact equality handles the case we need to optimize
// for where a brush fills the exact same geometry more than once.
!(IsExactlyEqualRectD(pBrushContext->rcWorldBrushSizingBounds, m_cachedBrushSizingBounds) ));
// If a mapping mode is relative to the brush sizing bounds *and* those
// bounds have changed, then the realization context has changed.
// If a mapping mode is absolute and we perform transformation operations
// on the brush, even then the sizing bounds gets changed and realization context has changed.

// Return true if the brush sizing bounds have changed
//
// We use exact equality here because fuzzy checks are expensive, coming up
// with a fuzzy threshold that defines the point at which visible changes
// occur isn't straightforward (i.e., the brush sizing bounds aren't
// in device space), and exact equality handles the case we need to optimize
// for where a brush fills the exact same geometry more than once.
return ( !(IsExactlyEqualRectD(pBrushContext->rcWorldBrushSizingBounds, m_cachedBrushSizingBounds) ));

}

Expand Down