forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/alpha minimal #3
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
Open
corranwebster
wants to merge
83
commits into
master
Choose a base branch
from
feat/alpha-minimal
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is required for identifying which bits are in which channels for alpha blending. It also has some utility when working with display devices where the display memory is opposite endianness from the microcontroller, as it permits more straightforward translation from colors to bytes.
Add tests for byteswapped RGB565 format.
Without this, we don't know the bits per pixel.
Re-use the rgb565_fill_rect() function to avoid repeated code.
This keeps the internal C code more-or-less unchanged, but exposes the byte-order as "RGB565_LE" and "RGB565_BE" for little and big endian versions. Updates docs and tests and, as a bonus, turns on RGB565 testing for big-endian native systems.
This is mainly adding tests for code branches not currently tested: - exceptions caused by bad masks in blit() - fast exit from certain functons when alpha is 0 - all lines are horizontal in polygon fill (nothing to draw) It also removes a small piece of dead code in polygon outline rendering.. Signed-off-by: Corran Webster <[email protected]>
This adds a handful of tests to ensure that off-screen polygons don't draw anything. Signed-off-by: Corran Webster <[email protected]>
Rather than having separate big-endian and little-endian modes at the C level use native and non-native, allowing RGB565 to be the same as one of RGB565_LE or RGB565_BE as appropriate. Signed-off-by: Corran Webster <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Experiments with minimal alpha blending. Particularly care about code-size on different platforms.
Testing
Nothing yet.
Trade-offs and Alternatives
This can do everything at the cost of having multiple buffers.