X Tutup
Skip to content

GRAPHICS: Remove deprecated uses of primitives#6401

Merged
lephilousophe merged 14 commits intoscummvm:masterfrom
lephilousophe:macgui-primitives
Jan 24, 2025
Merged

GRAPHICS: Remove deprecated uses of primitives#6401
lephilousophe merged 14 commits intoscummvm:masterfrom
lephilousophe:macgui-primitives

Conversation

@lephilousophe
Copy link
Member

@lephilousophe lephilousophe commented Jan 11, 2025

This removes the deprecation warnings introduced by PR #6374.
I also removed casts which were noxious because the types got changed with this PR. (already committed by digitall)

The Primitives objects are preallocated to avoid allocation for every draw operation.

We could easily optimize the code by providing a drawHLine primitive but that's pending a clarification of the behaviour when thickness is greater than 1 and the invert flag is set.
In this case, the current code overlaps the writes and some patterns may appear.

@lephilousophe lephilousophe force-pushed the macgui-primitives branch 2 times, most recently from afe03b3 to c9817d4 Compare January 12, 2025 19:39
@lephilousophe lephilousophe changed the title GRAPHICS: MACGUI: Implement primitives GRAPHICS: Remove deprecated uses of primitives Jan 12, 2025
@lephilousophe
Copy link
Member Author

I just migrated a bunch of obsolete primitives.
In the end, I wonder if this change really worth it: a lot of calls were not really optimizable.

BTW, I think we miss an optimization in drawLine to call drawHLine or drawVLine for a range of points.

@lephilousophe lephilousophe force-pushed the macgui-primitives branch 2 times, most recently from 976cee6 to cac81af Compare January 12, 2025 20:40
@rvanlaar
Copy link
Contributor

Looked through the changes that were director related. I don't have comments about them.

I just migrated a bunch of obsolete primitives.
In the end, I wonder if this change really worth it: a lot of calls were not really optimizable.

I do wonder if we should continue with the PR or revert it. I'll leave that up to others.

@lephilousophe
Copy link
Member Author

Merging now.
Thank you for the reviews!

@lephilousophe lephilousophe merged commit 3b62b55 into scummvm:master Jan 24, 2025
8 checks passed
@lephilousophe lephilousophe deleted the macgui-primitives branch January 24, 2025 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

X Tutup