Painter: sync renderer color
SetDrawState sets the pattern directly and then calls the member functions to update colors. As SetHighColor does not update the renderers if color does not change, that means we lose sync in some corner cases. Change-Id: I5f8771baa58643c559df243dcc1603983941faee Reviewed-on: https://review.haiku-os.org/c/haiku/+/4930 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
parent
5f61e00ab6
commit
1f357f79ca
@ -298,18 +298,19 @@ Painter::SetDrawState(const DrawState* state, int32 xOffset, int32 yOffset)
|
||||
}
|
||||
|
||||
// any of these conditions means we need to use a different drawing
|
||||
// mode instance
|
||||
// mode instance, but when the pattern changes it is already changed
|
||||
// from SetPattern
|
||||
bool updateDrawingMode
|
||||
= !(state->GetPattern() == fPatternHandler.GetPattern())
|
||||
|| state->GetDrawingMode() != fDrawingMode
|
||||
|| (state->GetDrawingMode() == B_OP_ALPHA
|
||||
&& (state->AlphaSrcMode() != fAlphaSrcMode
|
||||
|| state->AlphaFncMode() != fAlphaFncMode));
|
||||
= state->GetPattern() == fPatternHandler.GetPattern()
|
||||
&& (state->GetDrawingMode() != fDrawingMode
|
||||
|| (state->GetDrawingMode() == B_OP_ALPHA
|
||||
&& (state->AlphaSrcMode() != fAlphaSrcMode
|
||||
|| state->AlphaFncMode() != fAlphaFncMode)));
|
||||
|
||||
fDrawingMode = state->GetDrawingMode();
|
||||
fAlphaSrcMode = state->AlphaSrcMode();
|
||||
fAlphaFncMode = state->AlphaFncMode();
|
||||
fPatternHandler.SetPattern(state->GetPattern());
|
||||
SetPattern(state->GetPattern().GetPattern());
|
||||
fPatternHandler.SetOffsets(xOffset, yOffset);
|
||||
fLineCapMode = state->LineCapMode();
|
||||
fLineJoinMode = state->LineJoinMode();
|
||||
|
Loading…
Reference in New Issue
Block a user