Skip to content
Snippets Groups Projects

fb & gfx rework

Merged Mateusz Zalega requested to merge msgctl/gfx_rework into master

This patchset aims to simplify the vendor-provided graphics library and adds a well-defined abstraction layer between the LCD driver, framebuffer and graphics code.

Edited by Mateusz Zalega

Merge request reports

Merge request pipeline #1854 passed

Merge request pipeline passed for 7bd6f1cf

Merged by rahixrahix 5 years ago (Aug 12, 2019 3:23pm UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • rahix
  • rahix
  • rahix
  • rahix
  • rahix
  • rahix
  • rahix
  • Hi @msgctl, thanks for the MR! From taking a quick look, the new graphics API is really great!

    A few general notes, additionally to the comments interleaved with the diff:

    Code-Style

    Now that gfx is part of "our" code, please remove lib/gfx/* from the blacklist in tools/code-style.sh so it also gets properly formatted.

    Inline

    You have used inline or even inline_always for quite a few functions. Please reduce the inline usage as much as possible. The compiler is smart enough to decide on its own when it makes sense to inline calls. There might be some rare cases where there is a considerable performance impact. If we run into such a bottleneck, we can still force inlining the relevant function as an optimization later.

    Float

    As far as I can see, all colors will make a roundtrip through a floating point representation (gfx_color_rgb_f) before being converted to the display format. I don't know exact numbers, but I feel like this is an unnecessary cost in speed and complexity, as almost always the input will be 24-bit RGB.

  • Mateusz Zalega added 59 commits

    added 59 commits

    • 3698939e...6d1686e0 - 47 commits from branch master
    • 848ab0af - fb: gfx: replaced vendor implementation
    • 1a622930 - gfx: fixed splashscreen glitch
    • 796259ed - fb: gfx: switched default color format to RGB888
    • 0cc0ed8f - fb: gfx: dropped forced function inlining
    • f1d9ad31 - gfx: simplified gfx_color
    • cb1ad7ab - gfx: gfx_puts: truncate strings that don't fit the screen
    • 5b6fc7b8 - bootloader: coding style and text color bug
    • e2e927bf - coding style: include order
    • fd4157ab - epicardium: added a TODO note about missing linestyle implementation
    • 538e134e - tools: refactored code-style.sh blacklist code
    • eae26ae9 - tools: code-style.sh: whitelisted lib/gfx/* code
    • 0c53de83 - coding style: reformatted gfx & framebuffer code

    Compare with previous version

  • Mateusz Zalega added 1 commit

    added 1 commit

    • d6c17abe - coding style: reformatted LCD_Driver.c

    Compare with previous version

  • Mateusz Zalega added 1 commit

    added 1 commit

    • 095c0b7c - coding style: reformatted files modified by the fb & gfx refactor

    Compare with previous version

  • Looks good to me! Thanks for keeping our codebase clean.

    However, I'm only a bot - so a human will still have to approve this request.

  • Author Developer

    @rahix Hey, I think I've addressed all the issues you listed. The graphics code appears to be working just fine, but I didn't attempt to test it exhaustively. I've also rebased against the current branch, so unless there's anything else, it's ready for a merge.

  • rahix resolved all threads

    resolved all threads

  • LGTM! Thank you very much!

    There is one more thing but it is something for which you are absolutely not to blame: Because you touched some files in hw-tests which weren't previously formatted, your changes get drowned in the formatting changes. To fix this once and for all, I pushed some commits to master which format all of those file.

    Now, I have to ask you to rebase again but because of my commits this would produce horrible merge-conflicts. To prevent these, you can rebase like this:

    $ git fetch origin
    $ git rebase -X theirs origin/master

    This will unconditionally take your version for all changes (which is ok here because you also applied the formatting script).

    Edited by rahix
  • Mateusz Zalega added 17 commits

    added 17 commits

    • 095c0b7c...1bb79811 - 3 commits from branch master
    • 634bcbae - fb: gfx: replaced vendor implementation
    • b9d1de80 - gfx: fixed splashscreen glitch
    • c4eb791d - fb: gfx: switched default color format to RGB888
    • 4690e9ac - fb: gfx: dropped forced function inlining
    • 78b54eee - gfx: simplified gfx_color
    • 3579c6a5 - gfx: gfx_puts: truncate strings that don't fit the screen
    • ff90df67 - bootloader: coding style and text color bug
    • 79eb6d50 - coding style: include order
    • 6df8fc32 - epicardium: added a TODO note about missing linestyle implementation
    • 1f2b362a - tools: refactored code-style.sh blacklist code
    • 4711278a - tools: code-style.sh: whitelisted lib/gfx/* code
    • d25efa54 - coding style: reformatted gfx & framebuffer code
    • 5aab15b7 - coding style: reformatted LCD_Driver.c
    • ed026d54 - coding style: reformatted files modified by the fb & gfx refactor

    Compare with previous version

  • Author Developer

    @rahix >$ git rebase -X theirs origin/master

    thx!

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading